File tree 3 files changed +20
-1
lines changed
3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ resolution
16
16
- The ` abyss ` and ` spades ` components emit GFA in a secondary channel.
17
17
- The new ` bandage ` component can accept either FASTA from a primary channel
18
18
or GFA from a secondary channel.
19
+ - The new ` unicycler ` component can accept long reads from a secondary channel.
19
20
20
21
### New components
21
22
Original file line number Diff line number Diff line change @@ -236,8 +236,17 @@ def __init__(self, **kwargs):
236
236
237
237
self .input_type = "fastq"
238
238
self .output_type = "fasta"
239
+
240
+ self .link_end .append ({"link" : "long_reads" , "alias" : "long_reads" })
239
241
self .link_start .append ("gfa1" )
240
242
243
+ self .params = {
244
+ "long_reads" : {
245
+ "default" : "null" ,
246
+ "description" : "FASTQ or FASTA file of long reads"
247
+ },
248
+ }
249
+
241
250
self .directives = {"unicycler" : {
242
251
"cpus" : 4 ,
243
252
"container" : "quay.io/biocontainers/unicycler" ,
Original file line number Diff line number Diff line change
1
+ // True when a long_reads secondary channel is connected to this component.
2
+ has_long_reads_{{pid}} = binding. hasVariable(' long_reads_{{pid}}' )
3
+
1
4
process unicycler_{{pid}} {
2
5
{% include " post.txt" ignore missing % }
3
6
@@ -7,6 +10,9 @@ process unicycler_{{pid}} {
7
10
8
11
input :
9
12
set sample_id, file(fastq_pair) from {{input_channel}}
13
+ file long_reads from has_long_reads_{{pid}} ? long_reads_{{pid}} :
14
+ params. long_reads{{param_id}} ? Channel . fromPath(params. long_reads{{param_id}}) :
15
+ Channel . value(" NA" )
10
16
11
17
output :
12
18
set sample_id, file(' assembly.fasta' ) into {{output_channel}}
@@ -16,7 +22,10 @@ process unicycler_{{pid}} {
16
22
{% endwith % }
17
23
18
24
script :
19
- " unicycler -t $task . cpus -o . --no_correct --no_pilon -1 ${ fastq_pair[0]} -2 ${ fastq_pair[1]} "
25
+ command = " unicycler -t $task . cpus -o . --no_correct --no_pilon -1 ${ fastq_pair[0]} -2 ${ fastq_pair[1]} "
26
+ if (params. long_reads{{param_id}})
27
+ command + = " -l ${ long_reads} "
28
+ command
20
29
}
21
30
22
31
{{forks}}
You can’t perform that action at this time.
0 commit comments