-
Notifications
You must be signed in to change notification settings - Fork 0
/
cutadapt.sh
45 lines (34 loc) · 1.11 KB
/
cutadapt.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
#!/bin/bash
#SBATCH --job-name="cutadapt"
#SBATCH --chdir=.
#SBATCH --partition=middle_obx
#SBATCH --nodes=10
#SBATCH --ntasks=15
#SBATCH --mem=200G
#SBATCH --output=cutadapt_%j.out
#SBATCH --error=cutadapt_%j.err
# This is where your trimmed reads will be stored
OUTPUT_DIR=/data/obk/microRNAs/trim
# This is where your fastqc of your trimmed and untrimmed reads will be stored
OUTPUT_DIR_FASTQC=/data/obk/microRNAs/fastqc
# This is where your raw reads are stored
INPUT_DIR=/data/obk/microRNAs/raw
# This is your adapter sequence
ADAPTERS="TGGAATTCTCGG"
if [ -d trim ]
then
echo "directory trim exists"
else
mkdir -p trim
fi
if [ -d factqc ]
then
echo "Directory fastqc exists"
else
mkdir -p fastqc
fi
module load cutadapt/4.0
module load FastQC/0.11.9-Java-11
for i in $(ls $INPUT_DIR | grep ".fastq");do fastqc $INPUT_DIR/$i -o $OUTPUT_DIR_FASTQC;done
for i in $(ls $INPUT_DIR| grep ".fastq");do cutadapt -a $ADAPTERS -o $OUTPUT_DIR/cutted_$i --minimum-length 15 $INPUT_DIR/$i; done
for i in $(ls $OUTPUT_DIR | grep ".fastq");do fastqc $OUTPUT_DIR/$i -o $OUTPUT_DIR_FASTQC;done