forked from davekk/Scripts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfast_multiqc.sh
64 lines (46 loc) · 1.39 KB
/
fast_multiqc.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
#specify paths to your working directory and your reads directory
WORKING_DIR='/home/dkiambi/Qiime2_limidb/raw_reads/'
cd $WORKING_DIR
#the reads are in pairs in folders, iterate over each pair
for file in $(ls -I "*.sh" -I "*.txt" )
do
OUTPUT_DIR=${file}/fastq_out
#generate a unique slurm script for ec folder
echo \
"#!/bin/bash -e
#SBATCH -p batch
#SBATCH -n 4
#SBATCH -o $OUTPUT_DIR/fastq.%N.%j.out
#SBATCH -e $OUTPUT_DIR/fastq.%N.%j.err
#SBATCH --mail-user=D.Kaimenyi@cgiar.org
#SBATCH --mail-type=END,FAIL
# automatically load module abyss
module load fastqc
fastqc -o $OUTPUT_DIR -t 10 $file/*.gz " > $OUTPUT_DIR/$file'_fastqc_slurm.sh'
sbatch $OUTPUT_DIR/$file'_fastqc_slurm.sh'
done
####
#!/bin/bash
#specify paths to your working directory and your reads directory
WORKING_DIR='/home/dkiambi/Qiime2_limidb/raw_reads/'
cd $WORKING_DIR
#the reads are in pairs in folders, iterate over each pair
for file in $(ls -I "*.sh" -I "*.txt" )
do
OUTPUT_DIR=${file}/fastq_out
#generate a unique slurm script for ec folder
echo \
"#!/bin/bash -e
#SBATCH -p batch
#SBATCH -n 4
#SBATCH -o $OUTPUT_DIR/fastq.%N.%j.out
#SBATCH -e $OUTPUT_DIR/fastq.%N.%j.err
#SBATCH --mail-user=D.Kaimenyi@cgiar.org
#SBATCH --mail-type=END,FAIL
# automatically load module abyss
module load multiqc
cd $OUTPUT_DIR
multiqc . " > $OUTPUT_DIR/$file'_fastqc_slurm.sh'
sbatch $OUTPUT_DIR/$file'_fastqc_slurm.sh'
done