Last active
August 29, 2015 13:56
-
-
Save kdm9/8951246 to your computer and use it in GitHub Desktop.
Pete fastqc
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/bash | |
set -e | |
set -x | |
if [ $# -ne 1 ] | |
then | |
echo "USAGE: fastqc.sh SAMPLENAME" | |
fi | |
sample=$1 | |
sample_dir=reads/$sample | |
fastqs="$(ls $sample_dir/*.fastq.gz)" | |
mkdir qc/$sample | |
fastqc -o qc/$sample $fastqs | |
or, more properly:
function findSamples () {
find reads/ -mindepth 1 -maxdepth 1 -type d -exec basename {} \;| tr ' ' '\n'
}
findSamples | parallel .....
But be careful with tr ' ' '\n'
, it will fuck things up if the sample names have spaces in them
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in parallel:
Assuming sample names of
Sample1
andSample2