-
Notifications
You must be signed in to change notification settings - Fork 1
/
00_RunFastp.sh
40 lines (31 loc) · 1.06 KB
/
00_RunFastp.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
#!/bin/bash
#$ -M <email>
#$ -m abe
#$ -q long
#$ -N fastp
conda activate rna-seq
#specify output directory
od=.
#make output folder
if [ -d $od/fastp ]; then
echo "directory exists"
else
mkdir $od/fastp
fi
echo "Doing one-step QC and trimming with Fastp..."
for g in Input_files/*_R1*; do #######IF YOUR READS ARE *R1*, please change this to *R1* instead of *_1*
i1=$g
i2=${g%_R1*}"_R2*" #######IF YOUR READS ARE *R1*, please change this to %_R1* and _R2* instead of _1* and _2*
o=${g#Input_files/}
sample=${o%_R1*} #######IF YOUR READS ARE *R1*, please change this to o%R1 instead of *_1*
fastp --in1 $i1 \
--in2 $i2 \
--out1 $od/fastp/$sample\_1.clean.fq \
--out2 $od/fastp/$sample\_2.clean.fq \
--unpaired1 $od/fastp/$sample.unpaired.fq \
--unpaired2 $od/fastp/$sample.unpaired.fq \
--json $od/fastp/$sample.fastp.json \
--html $od/fastp/$sample.fastp.html \
--thread 16
done
echo "Done QC and trimming with Fastp!"