-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathblack.mk
executable file
·198 lines (186 loc) · 9.56 KB
/
black.mk
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#!/usr/bin/make -rRsf
#USAGE:
MEM=5
TRIM=5
CPU=5
RUN=run
READ1=left.fastq
READ2=right.fastq
TRIMMOMATIC ?= $(shell which 'trimmomatic-0.30.jar')
BCODES := /usr/users/1/macmanes/software/barcodes.fa
MUS := /brashear/macmanes/runs/trim/Mus_musculus.GRCm38.71.cdna.all.fa
PFAM := /brashear/macmanes/runs/trim/pfam/Pfam-A.hmm
TRINITY ?= $(shell which 'Trinity.pl')
MAKEDIR := $(dir $(firstword $(MAKEFILE_LIST)))
subsamp10:
python {MAKEDIR}/subsampler.py 10000000 $(READ1) $(READ2)
mv subsamp_1.fastq raw.10M.$(READ1)
mv subsamp_2.fastq raw.10M.$(READ2)
trim10:
@echo About to start trimming
java -XX:ParallelGCThreads=32 -Xmx$(MEM)g -jar ${MAKEDIR}/trimmomatic-0.32.jar PE \
-phred33 -threads $(CPU) \
../raw.10M.$(READ1) \
../raw.10M.$(READ2) \
10M.$$TRIM.pp.1.fq \
10M.$$TRIM.up.1.fq \
10M.$$TRIM.pp.2.fq \
10M.$$TRIM.up.2.fq \
ILLUMINACLIP:$(BCODES):2:40:15 \
LEADING:$$TRIM \
TRAILING:$$TRIM \
SLIDINGWINDOW:4:$$TRIM \
MINLEN:25 2>> trim10.log; \
cat 10M.$$TRIM.pp.1.fq 10M.$$TRIM.up.1.fq > 10M.left.$$TRIM.fq ; \
cat 10M.$$TRIM.pp.2.fq 10M.$$TRIM.up.2.fq > 10M.right.$$TRIM.fq ; \
rm 10M.$$TRIM.pp.2.fq 10M.$$TRIM.up.2.fq 10M.$$TRIM.pp.1.fq 10M.$$TRIM.up.1.fq
trin10:
$(TRINITY)/Trinity.pl --bflyGCThread 25 --full_cleanup --min_kmer_cov 1 --seqType fq --JM $(MEM)G --bflyHeapSpaceMax $(MEM)G \
--left 10M.left.$$TRIM.fq --right 10M.right.$$TRIM.fq --group_pairs_distance 999 --CPU $(CPU) --output 10M.$$TRIM >> 10trin$$TRIM.out
pslx10:
$(TRINITY)/Analysis/FL_reconstruction_analysis/FL_trans_analysis_pipeline.pl --target $(MUS) --query 10M.$$TRIM.Trinity.fasta; rm *maps *selected *summary
pep10:
$(TRINITY)/trinity-plugins/transdecoder/transcripts_to_best_scoring_ORFs.pl --CPU $(CPU) -t 10M.$$TRIM.Trinity.fasta \
--search_pfam $(PFAM) >>pfam10.log; \
rm longest_orfs* *gff3 *dat *scores *cds *bed *inx; mv best_candidates.eclipsed_orfs_removed.pep 10M.$$TRIM.Trinity.fasta.pep
map10:
bowtie2-build -q 10M.$$TRIM.Trinity.fasta index; echo -e '\n' Mapping at PHRED=$$TRIM '\n' >> 10M.$$TRIM.mapping.log; \
bowtie2 -p 12 -X 999 -k 30 -x index -1 $(READ1) -2 $(READ2) 2>>10M.$$TRIM.mapping.log | ${MAKEDIR}/express -o 10M.$$TRIM.xprs -p8 10M.$$TRIM.Trinity.fasta 2>>10M.$$TRIM.mapping.log; rm index*
raw.20M.$(READ1) raw.20M.$(READ2):
python ~/error_correction/scripts/subsampler.py 20000000 $(READ1) $(READ2)
mv subsamp_1.fastq raw.20M.$(READ1)
mv subsamp_2.fastq raw.20M.$(READ2)
trim20:
@echo About to start trimming
java -XX:ParallelGCThreads=32 -Xmx$(MEM)g -jar ${MAKEDIR}/trimmomatic-0.32.jar PE \
-phred33 -threads $(CPU) \
../raw.20M.$(READ1) \
../raw.20M.$(READ2) \
20M.$$TRIM.pp.1.fq \
20M.$$TRIM.up.1.fq \
20M.$$TRIM.pp.2.fq \
20M.$$TRIM.up.2.fq \
ILLUMINACLIP:$(BCODES):2:40:15 \
LEADING:$$TRIM \
TRAILING:$$TRIM \
SLIDINGWINDOW:4:$$TRIM \
MINLEN:25 2>> trim20.log; \
cat 20M.$$TRIM.pp.1.fq 20M.$$TRIM.up.1.fq > 20M.left.$$TRIM.fq ; \
cat 20M.$$TRIM.pp.2.fq 20M.$$TRIM.up.2.fq > 20M.right.$$TRIM.fq ; \
rm 20M.$$TRIM.pp.2.fq 20M.$$TRIM.up.2.fq 20M.$$TRIM.pp.1.fq 20M.$$TRIM.up.1.fq
trin20:
$(TRINITY)/Trinity.pl --bflyGCThread 25 --full_cleanup --min_kmer_cov 1 --seqType fq --JM $(MEM)G --bflyHeapSpaceMax $(MEM)G \
--left 20M.left.$$TRIM.fq --right 20M.right.$$TRIM.fq --group_pairs_distance 999 --CPU $(CPU) --output 20M.$$TRIM >> 20trin$$TRIM.out
pslx20:
$(TRINITY)/Analysis/FL_reconstruction_analysis/FL_trans_analysis_pipeline.pl --target $(MUS) --query 20M.$$TRIM.Trinity.fasta; rm *maps *selected *summary
pep20:
$(TRINITY)/trinity-plugins/transdecoder/transcripts_to_best_scoring_ORFs.pl --CPU $(CPU) -t 20M.$$TRIM.Trinity.fasta \
--search_pfam $(PFAM) >>pfam20.log; \
rm longest_orfs* *gff3 *dat *scores *cds *bed *inx; mv best_candidates.eclipsed_orfs_removed.pep 20M.$$TRIM.Trinity.fasta.pep
map20:
bowtie2-build -q 20M.$$TRIM.Trinity.fasta index; echo -e '\n' Mapping at PHRED=$$TRIM '\n' >> 20M.$$TRIM.mapping.log; \
bowtie2 -p 12 -X 999 -k 30 -x index -1 $(READ1) -2 $(READ2) 2>>20M.$$TRIM.mapping.log | ${MAKEDIR}/express -o 20M.$$TRIM.xprs -p8 20M.$$TRIM.Trinity.fasta 2>>20M.$$TRIM.mapping.log; rm index*
raw.50M.$(READ1) raw.50M.$(READ2):
python ~/error_correction/scripts/subsampler.py 50000000 $(READ1) $(READ2)
mv subsamp_1.fastq raw.50M.$(READ1)
mv subsamp_2.fastq raw.50M.$(READ2)
trim50:
@echo About to start trimming
java -XX:ParallelGCThreads=32 -Xmx$(MEM)g -jar ${MAKEDIR}/trimmomatic-0.32.jar PE \
-phred33 -threads $(CPU) \
../raw.50M.$(READ1) \
../raw.50M.$(READ2) \
50M.$$TRIM.pp.1.fq \
50M.$$TRIM.up.1.fq \
50M.$$TRIM.pp.2.fq \
50M.$$TRIM.up.2.fq \
ILLUMINACLIP:$(BCODES):2:40:15 \
LEADING:$$TRIM \
TRAILING:$$TRIM \
SLIDINGWINDOW:4:$$TRIM \
MINLEN:25 2>> trim50.log; \
cat 50M.$$TRIM.pp.1.fq 50M.$$TRIM.up.1.fq > 50M.left.$$TRIM.fq ; \
cat 50M.$$TRIM.pp.2.fq 50M.$$TRIM.up.2.fq > 50M.right.$$TRIM.fq ; \
rm 50M.$$TRIM.pp.2.fq 50M.$$TRIM.up.2.fq 50M.$$TRIM.pp.1.fq 50M.$$TRIM.up.1.fq
trin50:
$(TRINITY)/Trinity.pl --bflyGCThread 25 --full_cleanup --min_kmer_cov 1 --seqType fq --JM $(MEM)G --bflyHeapSpaceMax $(MEM)G \
--left 50M.left.$$TRIM.fq --right 50M.right.$$TRIM.fq --group_pairs_distance 999 --CPU $(CPU) --output 50M.$$TRIM >> 50trin$$TRIM.out
pslx50:
$(TRINITY)/Analysis/FL_reconstruction_analysis/FL_trans_analysis_pipeline.pl --target $(MUS) --query 50M.$$TRIM.Trinity.fasta; rm *maps *selected *summary
pep50:
$(TRINITY)/trinity-plugins/transdecoder/transcripts_to_best_scoring_ORFs.pl --CPU $(CPU) -t 50M.$$TRIM.Trinity.fasta \
--search_pfam $(PFAM) >>pfam50.log; \
rm longest_orfs* *gff3 *dat *scores *cds *bed *inx; mv best_candidates.eclipsed_orfs_removed.pep 50M.$$TRIM.Trinity.fasta.pep
map50:
bowtie2-build -q 50M.$$TRIM.Trinity.fasta index; echo -e '\n' Mapping at PHRED=$$TRIM '\n' >> 50M.$$TRIM.mapping.log; \
bowtie2 -p 12 -X 999 -k 30 -x index -1 $(READ1) -2 $(READ2) 2>>50M.$$TRIM.mapping.log | ${MAKEDIR}/express -o 50.$$TRIM.xprs -p8 50M.$$TRIM.Trinity.fasta 2>>50M.$$TRIM.mapping.log; rm index*
raw.75M.$(READ1) raw.75M.$(READ2):
python ~/error_correction/scripts/subsampler.py 75000000 $(READ1) $(READ2)
mv subsamp_1.fastq raw.75M.$(READ1)
mv subsamp_2.fastq raw.75M.$(READ2)
trim75:
@echo About to start trimming
mkdir $$TRIM.trim75
cd $$TRIM.trim75
java -XX:ParallelGCThreads=32 -Xmx$(MEM)g -jar ${MAKEDIR}/trimmomatic-0.32.jar PE \
-phred33 -threads $(CPU) \
../raw.75M.$(READ1) \
../raw.75M.$(READ2) \
75M.$$TRIM.pp.1.fq \
75M.$$TRIM.up.1.fq \
75M.$$TRIM.pp.2.fq \
75M.$$TRIM.up.2.fq \
ILLUMINACLIP:$(BCODES):2:40:15 \
LEADING:$$TRIM \
TRAILING:$$TRIM \
SLIDINGWINDOW:4:$$TRIM \
MINLEN:25 2>> trim75.log; \
cat 75M.$$TRIM.pp.1.fq 75M.$$TRIM.up.1.fq > 75M.left.$$TRIM.fq ; \
cat 75M.$$TRIM.pp.2.fq 75M.$$TRIM.up.2.fq > 75M.right.$$TRIM.fq ; \
rm 75M.$$TRIM.pp.2.fq 75M.$$TRIM.up.2.fq 75M.$$TRIM.pp.1.fq 75M.$$TRIM.up.1.fq
trin75:
$(TRINITY)/Trinity.pl --bflyGCThread 25 --full_cleanup --min_kmer_cov 1 --seqType fq --JM $(MEM)G --bflyHeapSpaceMax $(MEM)G \
--left 75M.left.$$TRIM.fq --right 75M.right.$$TRIM.fq --group_pairs_distance 999 --CPU $(CPU) --output 75M.$$TRIM >> 75trin$$TRIM.out
pslx75:
$(TRINITY)/Analysis/FL_reconstruction_analysis/FL_trans_analysis_pipeline.pl --target $(MUS) --query 75M.$$TRIM.Trinity.fasta; rm *maps *selected *summary
pep75:
$(TRINITY)/trinity-plugins/transdecoder/transcripts_to_best_scoring_ORFs.pl --CPU $(CPU) -t 75M.$$TRIM.Trinity.fasta \
--search_pfam $(PFAM) >> pfam75.log; \
rm longest_orfs* *gff3 *dat *scores *cds *bed *inx; mv best_candidates.eclipsed_orfs_removed.pep 75M.$$TRIM.Trinity.fasta.pep
map75:
bowtie2-build -q 75M.$$TRIM.Trinity.fasta index; echo -e '\n' Mapping at PHRED=$$TRIM '\n' >> 75M.$$TRIM.mapping.log; \
bowtie2 -p 12 -X 999 -k 30 -x index -1 ../$(READ1) -2 ../$(READ2) 2>>75M.$$TRIM.mapping.log | ${MAKEDIR}/express -o 75.$$TRIM.xprs -p8 75M.$$TRIM.Trinity.fasta 2>>75M.$$TRIM.mapping.log ; rm index*
raw.100M.$(READ1) raw.100M.$(READ2):
python ~/error_correction/scripts/subsampler.py 100000000 $(READ1) $(READ2)
mv subsamp_1.fastq raw.100M.$(READ1)
mv subsamp_2.fastq raw.100M.$(READ2)
trim100:
@echo About to start trimming
java -XX:ParallelGCThreads=32 -Xmx$(MEM)g -jar ${MAKEDIR}/trimmomatic-0.32.jar PE \
-phred33 -threads $(CPU) \
../raw.100M.$(READ1) \
../raw.100M.$(READ2) \
100M.$$TRIM.pp.1.fq \
100M.$$TRIM.up.1.fq \
100M.$$TRIM.pp.2.fq \
100M.$$TRIM.up.2.fq \
ILLUMINACLIP:$(BCODES):2:40:15 \
LEADING:$$TRIM \
TRAILING:$$TRIM \
SLIDINGWINDOW:4:$$TRIM \
MINLEN:25 2>> trim100.log; \
cat 100M.$$TRIM.pp.1.fq 100M.$$TRIM.up.1.fq > 100M.left.$$TRIM.fq ; \
cat 100M.$$TRIM.pp.2.fq 100M.$$TRIM.up.2.fq > 100M.right.$$TRIM.fq ; \
rm 100M.$$TRIM.pp.2.fq 100M.$$TRIM.up.2.fq 100M.$$TRIM.pp.1.fq 100M.$$TRIM.up.1.fq
trin100:
$(TRINITY)/Trinity.pl --bflyGCThread 25 --full_cleanup --min_kmer_cov 1 --seqType fq --JM $(MEM)G --bflyHeapSpaceMax $(MEM)G \
--left 100M.left.$$TRIM.fq --right 100M.right.$$TRIM.fq --group_pairs_distance 999 --CPU $(CPU) --output 100M.$$TRIM >> 100trin$$TRIM.out
pslx100:
$(TRINITY)/Analysis/FL_reconstruction_analysis/FL_trans_analysis_pipeline.pl --target $(MUS) --query 100M.$$TRIM.Trinity.fasta; rm *maps *selected *summary
pep100:
$(TRINITY)/trinity-plugins/transdecoder/transcripts_to_best_scoring_ORFs.pl --CPU $(CPU) -t 100M.$$TRIM.Trinity.fasta \
--search_pfam $(PFAM) >> pfam100.log; \
rm longest_orfs* *gff3 *dat *scores *cds *bed *inx; mv best_candidates.eclipsed_orfs_removed.pep 100M.$$TRIM.Trinity.fasta.pep
map100:
bowtie2-build -q 100M.$$TRIM.Trinity.fasta index; echo -e '\n' Mapping at PHRED=$$TRIM '\n' >> 100M.$$TRIM.mapping.log
bowtie2 -p 12 -X 999 -k 30 -x index -1 $(READ1) -2 $(READ2) 2>>100M.$$TRIM.mapping.log | ${MAKEDIR}/express -o 100.$$TRIM.xprs -p8 100M.$$TRIM.Trinity.fasta 2>>100M.$$TRIM.mapping.log ; rm index*