-
Notifications
You must be signed in to change notification settings - Fork 0
/
transcription_pipeline
60 lines (51 loc) · 1.29 KB
/
transcription_pipeline
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
###########
01.qc
###########
fastqc 0.rawdata/$1_1.fq.gz \
-o 1.QC/ --noextract
fastqc 0.rawdata/$1_2.fq.gz \
-o 1.QC/ --noextract
trim_galore \
--cores 4
--paired \
--quality 20 \
--fastqc \
--length 25 -j 10 \
--output_dir 2.cleandata \
0.rawdata/$1_1.fq.gz 0.rawdata/$1_2.fq.gz
##########
02. quality control
##########
sortmerna --ref /expt/cfliu/database/RNAseq_db/sortmerna_db/smr_v4.3_default_db.fasta \
--reads 1.cleandata/$1_1_val_1.fq.gz \
--reads 1.cleandata/$1_2_val_2.fq.gz \
--aligned 2.rm_rRNA/$1_aligned \
--other 2.rm_rRNA/$1_filtered \
--fastx --threads 60 -v \
--workdir temp_$1/
gzip 2.rm_rRNA/$1_aligned.fq
gzip 2.rm_rRNA/$1_filtered.fq
rm -rf temp_$1/
########
03.mapping
########
mkdir -p 3.bam
hisat2 -p 30 \
-5 15\
-3 15\
-x /expt/cfliu/database/RNAseq_db/mouse/grcm38_tran \
-U 2.rm_rRNA/$1_filtered.fq.gz \
| tee >(samtools flagstat - > 3.bam/$1.hisat2.flagstat.txt) \
| samtools sort -O BAM \
| tee 3.bam/$1.bam \
| samtools index - 3.bam/$1.bam.bai
########
04.gene count
########
mkdir -p 5.result
featureCounts \
-T 10 \
-g 'gene_name'\
-a /expt/cfliu/database/RNAseq_db/mouse/grcm38_tran/genome_tran.gtf \
-o 5.result/final_featureCounts_gene_name.txt \
3.bam/*.bam