-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathscripts.sh
114 lines (96 loc) · 3.13 KB
/
scripts.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/bin/bash
set -xe
<< COMMENTOUT
fasterq-dump xxx
trim galore (遅いですが、ikraとoutputを合わせるため)
salmon index
salmon quant
tximport?
STAR -> igv (間に合わないから紹介だけ?)
ikra (紹介だけ)
COMMENTOUT
# 必要ファイルのダウンロード
wget ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_37/gencode.v37.pc_transcripts.fa.gz
wget ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_37/gencode.v37.metadata.HGNC.gz
# fasterq-dump
prefetch SRR10738313
fasterq-dump SRR10738313 --split-files --threads 4 -p
pigz SRR10738313_*.fastq
rm -r SRR10738313
prefetch SRR10738318
fasterq-dump SRR10738318 --split-files --threads 4 -p
pigz SRR10738318_*.fastq
rm -r SRR10738318
prefetch SRR10738253
fasterq-dump SRR10738253 --split-files --threads 4 -p
pigz SRR10738253_*.fastq
rm -r SRR10738253
prefetch SRR10738254
fasterq-dump SRR10738254 --split-files --threads 4 -p
pigz SRR10738254_*.fastq
rm -r SRR10738254
# trim-galore
trim_galore --cores 4 --paired SRR10738313_1.fastq.gz SRR10738313_2.fastq.gz
trim_galore --cores 4 --paired SRR10738318_1.fastq.gz SRR10738318_2.fastq.gz
trim_galore --cores 4 --paired SRR10738253_1.fastq.gz SRR10738253_2.fastq.gz
trim_galore --cores 4 --paired SRR10738254_1.fastq.gz SRR10738254_2.fastq.gz
# salmon index
salmon index --threads 4 --transcripts gencode.v37.pc_transcripts.fa.gz \
--index salmon_index -k 31 --gencode
# salmon quant
salmon quant -i salmon_index \
-l A \
-1 SRR10738313_1_val_1.fq.gz \
-2 SRR10738313_2_val_2.fq.gz \
-p 4 \
-o salmon_output_SRR10738313 \
--gcBias \
--validateMappings
salmon quant -i salmon_index \
-l A \
-1 SRR10738318_1_val_1.fq.gz \
-2 SRR10738318_2_val_2.fq.gz \
-p 4 \
-o salmon_output_SRR10738318 \
--gcBias \
--validateMappings
salmon quant -i salmon_index \
-l A \
-1 SRR10738253_1_val_1.fq.gz \
-2 SRR10738253_2_val_2.fq.gz \
-p 4 \
-o salmon_output_SRR10738253 \
--gcBias \
--validateMappings
salmon quant -i salmon_index \
-l A \
-1 SRR10738254_1_val_1.fq.gz \
-2 SRR10738254_2_val_2.fq.gz \
-p 4 \
-o salmon_output_SRR10738254 \
--gcBias \
--validateMappings
# tximport
Rscript tximport.R
# STAR index (説明のみ)
wget ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_37/GRCh38.primary_assembly.genome.fa.gz
gunzip GRCh38.primary_assembly.genome.fa.gz
STAR \
--runMode genomeGenerate \
--genomeDir STAR_index \
--runThreadN 4 \
--genomeFastaFiles GRCh38.primary_assembly.genome.fa
# STAR align (説明のみ) + index
for SRR in SRR10738313 SRR10738318 SRR10738253 SRR10738254; do
STAR \
--genomeDir STAR_index \
--runThreadN 4 \
--outFileNamePrefix ${SRR}_ \
--outSAMtype BAM SortedByCoordinate \
--readFilesIn ${SRR}_1_val_1.fq.gz ${SRR}_2_val_2.fq.gz \
--readFilesCommand gunzip -c
samtools index ${SRR}_Aligned.sortedByCoord.out.bam
done
# ikra
# git clone https://github.com/yyoshiaki/ikra.git
# ikra/ikra.sh design.csv human --protein-coding --threads 4 --align star --gencode 37