-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathptx.cfg
executable file
·232 lines (220 loc) · 8.54 KB
/
ptx.cfg
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
#!/usr/bin/env perl
#-----------------------------------------------------------------------------#
# ptx pipeline
ptx => {
jellyfish_bin => "", # assume exported
bowtie2_bin => "", # assume exported
velvet_bin => "", # assume exported
blast_bin => "", # assume exported
phrap_bin => "",
continue => "", # ""=TRUE, undef=FALSE continues your last canceled run
threads => 2, # Number of Threads used by several tasks
kmer_size => 31, # The size of the used kmers
tasks => [
{ # Check dependencies
id => 'dep',
cmd => [qw(%bin%check_dependencies.pl)],
},
{ # run jellyfish
id => 'jf0',
cmd => [qw(
%opt{jellyfish_bin}%jellyfish count
-t %opt{threads}%
-m %opt{kmer_size}%
-s 500M -C
-o %%.jf
%opt{reads}% %opt{mates}%
)]
},
{ # Scale reads data set to 200X
id => 'scr',
parser => parse_csv,
cmd => [qw(
%bin%scale_reads.pl
-1 %opt{reads}%
-2 %opt{mates}%
--ref-cluster %bin%/../data/cds-nr98-core.fa
--kmer-size %opt{kmer_size}%
--out %%
--threads %opt{threads}%
-c %opt{core_config}% %opt{config}%
%opt{_log_level}%
)],
},
{ # run jellyfish
id => 'jf1',
cmd => [qw(
%opt{jellyfish_bin}%jellyfish count
-t %opt{threads}%
-m %opt{kmer_size}%
-s 500M -C
-o %{scr}%.jf
%{scr}%_[12].fq
)]
},
{ # filter kmer based
id => 'kfr1',
cmd => [qw(
%bin%kmer_filter_reads.pl
-1 %{scr}%_1.fq -2 %{scr}%_2.fq
--kmer-hash %{scr}%.jf
--kmer-size %opt{kmer_size}%
--out %%
-c %opt{core_config}% %opt{config}%
%opt{_log_level}%
)]
},
{ # run jellyfish again
id => 'jf2',
cmd => [qw(
%opt{jellyfish_bin}%jellyfish count
-t %opt{threads}%
-m %opt{kmer_size}%
-s 500M -C
-o %[-1]%.jf
%[-1]%_[12].fq
)]
},
{ # filter kmer based again
id => 'kfr2',
cmd => [qw(
%bin%kmer_filter_reads.pl
-1 %[-2]%_1.fq -2 %[-2]%_2.fq
--kmer-hash %[-2]%.jf
--kmer-size %opt{kmer_size}%
--out %%
-c %opt{core_config}% %opt{config}%
%opt{_log_level}%
)]
},
{
id => 'jf3',
cmd => [qw(
%opt{jellyfish_bin}%jellyfish count
-t %opt{threads}%
-m %opt{kmer_size}%
-s 500M -C
-o %[-1]%.jf
%[-1]%_[12].fq
)]
},
{
id => 'kfr:plot',
parser => parse_csv,
cmd => [qw(R --vanilla --slave --args kfr %{scr}%.jf %{kfr1}%.jf %{kfr2}%.jf <%bin%make_plots.R)],
},
{
id => 'mre0',
cmd => [qw(
gs
-dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite
-sOutputFile=ptx.pdf
scr-seeds.pdf
kfr.pdf
)],
},
{ # assemble with spades
id => 'ass',
cmd => [qw(
%bin%assemble_spades.pl
-1 %{kfr2}%_1.fq
-2 %{kfr2}%_2.fq
-o %%
--threads %opt{threads}%
)],
},
{ # find cyclic graph
id => 'fcg',
cmd => [qw(
%bin%find_cyclic_graph.pl
--in ass/assembly_graph.fastg
--blastdb %bin%/../data/cds.nr98.fa
--out %%.fa
)]
},
# { # decontaminate
# id => 'fic',
# cmd => [qw(
# %bin%filter_contigs.pl
# --in %[-1]%.fa
# --blast_db %bin%/../data/cds.nr98.fa
# --blast-bin "%opt{blast_bin}%"
# -c %opt{core_config}% %opt{config}%
# %opt{_log_level}%
# )],
# },
# { # process inverted repeat
# id => 'mir',
# cmd => [qw(
# %bin%make_inverted_repeats.pl
# --in %[-2]%.fil.fa
# --out %%.fa
# %opt{_log_level}%
# )],
# },
{
id => 'mre1',
cmd => [qw(
gs
-dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite
-sOutputFile=ptx.pdf
scr-seeds.pdf
kfr.pdf
)],
},
],
},
#------------------------------------------------------------------------------#
# scale_reads.pl
scr => {
target_coverage => 50,
max_reads => 10000,
# bowtie2 options
bowtie2_params => [qw(
--no-unal
--n-ceil C,0,0
--very-sensitive
)],
},
# kmer_filter
kfr => {
cutoff => "100%",
lower => 30,
upper => 1000,
"penalize-N" => 1,
"kmer-shift" => 1,
"perl-hash" => 1,
},
# reads_ref_map
rrm => {
# bowtie2 options
bowtie2_params => [qw(
--no-unal
--n-ceil C,0,0
--very-sensitive
)],
},
# assemble_reads.pl
asr => {
outkmer => [qw(33 39 45 51 57 63 69 75 81 87 93)],
workingdir => "./",
velveth_parameter => '33,99,6',
velvetg_parameter => '',
velvet_out => "velvet_out",
},
fic => {
blast_db => undef,
blast_options => [qw(-max_target_seqs 1 -evalue 1e-10 -outfmt), "'6 qseqid'"],
seqfilter_options => [qw(--min-length 500)],
},
asc => {
workingdir => './',
overwrite => 1,
},
# extend_contigs.pl
exc => {
min_seq_length => 1000,
bowtie2_log => './bowtie2.log',
},
mir => {
},