-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQC.sh
37 lines (24 loc) · 1.03 KB
/
QC.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
#!/usr/bin/env bash
#SBATCH --job-name="QC"
#SBATCH --nodes=1
#SBATCH --cpus-per-task=8
#SBATCH --time=08:00:00
#SBATCH --mem=8G
#QC analysis
#User needs to input path to this directory where the input data is (source) and the path to the directory where output data shuld go (destination) when running the script with sbatch
#example: sbatch QC.sh </path/to/source/> </path/to/destination>
source=$1
destination=$2
#load required modules
module load UHTS/Quality_control/fastqc/0.11.9
module load UHTS/Analysis/MultiQC/1.8
#change directory to interim
cd ${destination}
#Create a link to the raw files, in the current directory for qc analysis
#code: for loop that loops over all the files with .fsatq.gz extension in the given path and creates individual links for all the .fastq.gz files in the current directory
for file in ${source}*.fastq.gz; do ln -s "$file" . ; done
for i in `ls -1 *.fastq.gz`;
do fastqc -t 6 $i; rm $i;
done
multiqc .
#You can now download the html files on your local computer to assess the quality of raw reads