-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexe_rawStatsQC.sh
48 lines (34 loc) · 1.07 KB
/
exe_rawStatsQC.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
#SBATCH --cpus-per-task=4
#SBATCH --mem=2g
#SBATCH --job-name rawQC
#SBATCH --mail-type END
#SBATCH -o slurm_rawQC-log.txt
#SBATCH --time=8:00:00
module load fastqc
module load multiqc
#run this script in the folder with all the fastq.gz files
indir=raw
outdir=rawQC
fqc=fastQC
#create general output dir
if [ ! -d "${indir}/${outdir}" ]; then
mkdir ${indir}/${outdir}/
mkdir ${indir}/${outdir}/${fqc}/
fi
#run fastqc
for i in $(ls ${indir}/*fastq.gz |cut -f1 -d "." ); do
b=$(basename ${i%%})
#ls ${indir}/${outdir}/${fqc}/${b}*html
if [ -s ${indir}/${outdir}/${fqc}/${b}*html ]; then
echo "------- skipping sample ${b}*html, for being done before"
else
echo "------- performing QC for ${b}"
fastqc ${i}.fastq.gz -o ${indir}/${outdir}/${fqc} -t $SLURM_CPUS_PER_TASK
fi
done
multiqc ${indir}/${outdir}/${fqc} -o ${indir}/${outdir} --title rawQC
rm ${indir}/${outdir}/${fqc}/*_fastqc.zip
#will not be using prinseq-lite as it uses uncompressed .fastq files
#poorani says she has a batch script for this:
#https://github.niaid.nih.gov/subramanianp4/runQC