-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path04_preprocessing.sh
More file actions
38 lines (30 loc) · 1.01 KB
/
04_preprocessing.sh
File metadata and controls
38 lines (30 loc) · 1.01 KB
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 --cpus-per-task=4 #cores
#SBATCH --time=02:00:00 #time limit
#SBATCH --mem-per-cpu=2000M #requested memory
#SBATCH --output=/data/users/lwuetschert/rnaseq_course/fastqc_output_%j.o #output
#SBATCH --error=/data/users/lwuetschert/rnaseq_course/fastqc_error_%j.e #error
#SBATCH --job-name=rnaseq_RP_fastqc #job name
#SBATCH --partition=pall
READS_DIR=/data/users/lwuetschert/rnaseq_course/outputFiles
cd $READS_DIR
module load UHTS/Quality_control/cutadapt/2.5
# Clip 3' adapter
for x in $(ls -d *.fastq.gz); do echo ${x}; \
cutadapt \
-j 4 \
-a CTGTAGGCACCATCAAT \
-q 25 \
--minimum-length 25 \
--discard-untrimmed \
-o $(basename ${x} .fastq.gz)_clpd.fastq.gz \
${x} 1> $(basename ${x} .fastq.gz)_clpd_log.txt; done
# Trim 4 nt (randomized bases) from the 3' end
for x in $(ls -d *_clpd.fastq.gz); do echo ${x}; \
cutadapt \
-j 4 \
-q 25 \
--cut -4 \
--minimum-length 25 \
-o $(basename ${x} .fastq.gz)_tr.fastq.gz \
${x} 1> $(basename ${x} .fastq.gz)_tr_log.txt; done