This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:5e2aa6b0192161bf476557fbe7d2307d8e28ab5c3ce5229e942d671d5dd9689b" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Get only code blocks from rst file, use like: | |
# rst2code index.rst | |
# or | |
# cat index.rst | rst2code - | |
# pipe to bash if it is bash code e.g. | |
# rst2code index.rst | bash -x | |
rst2code() { | |
awk 'BEGIN {code=0} | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat ../Batch1.fastq | \ | |
awk -v se=se.fastq -v r1=r1.fastq -v r2=r2.fastq ' | |
BEGIN {l5=0} | |
{ | |
if (l5 == 0) { | |
l1=$0; getline | |
} | |
else { | |
l1=l5 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for row in $(cat nucmer.coords | awk -v OFS=, '{if ($10 == 100.00 && $11 == 100.00 && $7 == 100.00 && $12 != $13) {print $12,$13}}') | |
do | |
echo $row | tr ',' '\n' | sort | tr '\n' ',' | sed 's/,$//' | |
echo | |
done | cut -d, -f2 | sort -u > duplicatecontigs.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
samtools idxstats map.bam | awk '{split ($0, a, "\t")} {if (a[2]>999) SUM+=a[3]} END {print SUM}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
rightpath() { | |
path="" | |
for d in `readlink -f $1 | tr / " "` | |
do | |
path="$path/$d" | |
stat -c "%A %a %U %G %n" $path | |
done | column -t | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
parallel lib1={}';' \ | |
lib2='$('echo {} '|' sed s/_1.fastq.gz/_2.fastq.gz/');' \ | |
base='$('basename {} _1.fastq.gz');' \ | |
sickle pe -f '$lib1' -r '$lib2' -t sanger \ | |
-o '$base'.sickle.pe1.fastq \ | |
-p '$base'.sickle.pe2.fastq \ | |
-s '$base'.sickle.se.fastq \ | |
::: /proj/b2010008/INBOX/A.Andersson_13_06/*/*/*_1.fastq.gz |
NewerOlder