Last active
December 23, 2015 05:19
-
-
Save mtw/6585930 to your computer and use it in GitHub Desktop.
bam2fastqc
This file contains hidden or 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/bash | |
| fastqcdir="./FastQC" | |
| if [ -d "$fastqcdir" ]; | |
| then | |
| echo "$fastqcdir available" | |
| else | |
| mkdir $fastqcdir | |
| fi | |
| for FQ in $(ls *.bam) | |
| do | |
| #echo $FQ | |
| bn=$(basename $FQ .bam) | |
| echo "processing $bn" | |
| echo | |
| bam2fastq -q $bn.bam -o $bn\#.fastq | |
| for i in 1 2 | |
| do | |
| fastqc --quiet --noextract -o $fastqcdir -t 16 ${bn}_${i}.fastq | |
| gzip -c ${bn}_${i}.fastq > ${bn}_${i}.fq.gz | |
| done | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment