File tree 4 files changed +64
-0
lines changed
4 files changed +64
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ resolution
22
22
23
23
- Added component ` abyss ` .
24
24
- Added component ` bandage ` .
25
+ - Added component ` porechop ` .
25
26
- Added component ` unicycler ` .
26
27
27
28
### Minor/Other changes
Original file line number Diff line number Diff line change @@ -433,3 +433,37 @@ def __init__(self, **kwargs):
433
433
self .status_channels = [
434
434
"downsample_fastq"
435
435
]
436
+
437
+ class Porechop (Process ):
438
+ """Porechop trims adapters from Oxford Nanopore reads.
439
+
440
+ This process is set with:
441
+
442
+ - ``input_type``: fastq
443
+ - ``output_type``: fastq
444
+ - ``ptype``: pre_assembly
445
+ """
446
+
447
+ def __init__ (self , ** kwargs ):
448
+ super ().__init__ (** kwargs )
449
+
450
+ self .input_type = "fastq"
451
+ self .output_type = "fastq"
452
+
453
+ self .link_end .append ({"link" : "raw_long_reads" , "alias" : "raw_long_reads" })
454
+ self .link_start .append ("long_reads" )
455
+
456
+ self .params = {
457
+ "long_reads" : {
458
+ "default" : "null" ,
459
+ "description" : "FASTQ or FASTA file of long reads"
460
+ },
461
+ }
462
+
463
+ self .directives = {
464
+ "porechop" : {
465
+ "cpus" : 4 ,
466
+ "container" : "quay.io/biocontainers/porechop" ,
467
+ "version" : "0.2.3_seqan2.1.1--py36h2d50403_3"
468
+ }
469
+ }
Original file line number Diff line number Diff line change 88
88
"momps" : typing .Momps ,
89
89
"patho_typing" : typing .PathoTyping ,
90
90
"pilon" : ap .Pilon ,
91
+ "porechop" : readsqc .Porechop ,
91
92
"process_skesa" : ap .ProcessSkesa ,
92
93
"process_spades" : ap .ProcessSpades ,
93
94
"progressive_mauve" :alignment .ProgressiveMauve ,
Original file line number Diff line number Diff line change
1
+ // True when a raw_long_reads secondary channel is connected to this component.
2
+ has_raw_long_reads_{{pid}} = binding. hasVariable(' raw_long_reads_{{pid}}' )
3
+
4
+ process porechop_{{pid}} {
5
+ {% include " post.txt" ignore missing % }
6
+
7
+ publishDir " results/porechop_{{pid}}" , pattern : " *.fastq.gz"
8
+ publishDir " reports/porechop_{{pid}}" , pattern : " *.log"
9
+
10
+ tag { sample_id }
11
+
12
+ input :
13
+ set sample_id, file(fastq_pair) from {{input_channel}}
14
+ file raw_long_reads from has_raw_long_reads{{pid}} ? raw_long_reads_{{pid}} :
15
+ params. long_reads{{param_id}} ? Channel . fromPath(params. long_reads{{param_id}}) :
16
+
17
+ output :
18
+ set sample_id, file(fastq_pair) into {{output_channel}}
19
+ file " ${ sample_id} .fastq.gz" into long_reads_{{pid}}
20
+ {% with task_name= " porechop" % }
21
+ {%- include " compiler_channels.txt" ignore missing -% }
22
+ {% endwith % }
23
+
24
+ script :
25
+ " time porechop -t $task . cpus --format fastq.gz -i ${ long_reads} -o ${ sample_id} .fastq.gz >${ sample_id} .log"
26
+ }
27
+
28
+ {{ forks }}
You can’t perform that action at this time.
0 commit comments