Mercurial > repos > davidvanzessen > sff_extract_demultiplex
comparison wrapper.sh @ 8:cd56ce86c4bf draft
Uploaded
| author | davidvanzessen |
|---|---|
| date | Tue, 04 Nov 2014 09:03:22 -0500 |
| parents | 18ede27dc6b0 |
| children | 5a886d753c0a |
comparison
equal
deleted
inserted
replaced
| 7:18ede27dc6b0 | 8:cd56ce86c4bf |
|---|---|
| 62 cat $file.fastq | awk 'NR%4==1{printf ">%s\n", substr($0,2)}NR%4==2{print}' > $file.fasta | 62 cat $file.fastq | awk 'NR%4==1{printf ">%s\n", substr($0,2)}NR%4==2{print}' > $file.fasta |
| 63 python $dir/trim.py --input $file.fasta --output ${file}_trimmed.fasta --start ${trim_start[$barcode]} --end ${trim_end[$barcode]} | 63 python $dir/trim.py --input $file.fasta --output ${file}_trimmed.fasta --start ${trim_start[$barcode]} --end ${trim_end[$barcode]} |
| 64 echo "<tr><td>$barcode</td><td>$count</td><td><a href='$file.fastq'>$file.fastq</a></td><td><a href='$file.fasta'>$file.fasta</a></td><td><a href='${file}_trimmed.fasta'>${file}_trimmed.fasta</a></td><td><a href='${name}_${barcode}_fastqc.html'>Report</a></td></tr>" >> $output | 64 echo "<tr><td>$barcode</td><td>$count</td><td><a href='$file.fastq'>$file.fastq</a></td><td><a href='$file.fasta'>$file.fasta</a></td><td><a href='${file}_trimmed.fasta'>${file}_trimmed.fasta</a></td><td><a href='${name}_${barcode}_fastqc.html'>Report</a></td></tr>" >> $output |
| 65 done < output.txt | 65 done < output.txt |
| 66 echo "</tbody></body></html>" >> $output | 66 echo "</tbody></body></html>" >> $output |
| 67 | |
| 68 :' | |
| 69 mids = "mid\tforward\treverse" | |
| 70 fal = "file with sequenses on single line (no multiline)" | |
| 71 for mid in mids: | |
| 72 forwardmids = len([x for x in fal if re.match("^" + mid[1], x)]) | |
| 73 reversemids = len([x for x in fal if re.match(mid[2] + "$", x)]) | |
| 74 both = len([x for x in fal if re.match("^" + mid[1] + ".*" + mid[2] + "$", x)]) | |
| 75 if (forwardmids + reversemids + both) > 0: | |
| 76 print "%s: %d - %d - %d" % (mid[0], forwardmids, reversemids, both) | |
| 77 ' |
