File tree Expand file tree Collapse file tree 4 files changed +82
-0
lines changed Expand file tree Collapse file tree 4 files changed +82
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ resolution
2323- Added component ` bandage ` .
2424- Added component ` unicycler ` .
2525- Added component ` prokka ` .
26+ - Added component ` bcalm ` .
2627
2728### Minor/Other changes
2829
Original file line number Diff line number Diff line change 44except ImportError :
55 from flowcraft .generator .process import Process
66
7+ class Bcalm (Process ):
8+ """Bcalm process template interface
9+
10+ This process is set with:
11+
12+ - ``input_type``: fastq
13+ - ``output_type``: assembly
14+ - ``ptype``: assembly
15+
16+ """
17+
18+ def __init__ (self , ** kwargs ):
19+
20+ super ().__init__ (** kwargs )
21+
22+ self .input_type = "fastq"
23+ self .output_type = "fasta"
24+
25+ self .params = {
26+ "bcalmKmerSize" : {
27+ "default" : 31 ,
28+ "description" :
29+ "size of a kmer"
30+ },
31+ "clearInput" : {
32+ "default" : "false" ,
33+ "description" :
34+ "Permanently removes temporary input files. This option "
35+ "is only useful to remove temporary files in large "
36+ "workflows and prevents nextflow's resume functionality. "
37+ "Use with caution."
38+ }
39+ }
40+
41+ self .directives = {"bcalm" : {
42+ "cpus" : 4 ,
43+ "memory" : "{ 5.GB * task.attempt }" ,
44+ "container" : "quay.io/biocontainers/bcalm" ,
45+ "version" : "2.2.0--hd28b015_2" ,
46+ "scratch" : "true"
47+ }}
48+
749
850class Spades (Process ):
951 """Spades process template interface
Original file line number Diff line number Diff line change 5858 "abyss" : assembly .Abyss ,
5959 "abricate" : annotation .Abricate ,
6060 "assembly_mapping" : ap .AssemblyMapping ,
61+ "bcalm" : assembly .Bcalm ,
6162 "bandage" : ap .Bandage ,
6263 "bowtie" : mapping .Bowtie ,
6364 "card_rgi" : annotation .CardRgi ,
Original file line number Diff line number Diff line change 1+ // Check parameter
2+ if ( ! params. bcalmKmerSize{{ param_id }}. toString(). isNumber() ){
3+ exit 1 , " 'bcalmKmerSize{{ param_id }}' parameter must be a number. Provided value: '${ params.bcalmKmes%rSize{{ param_id }}} '"
4+ }
5+
6+ // Clear
7+ clear = params. clearInput{{ param_id }} ? " true" : " false"
8+ checkpointClear_{{ pid }} = Channel . value(clear)
9+
10+ process bcalm_{{ pid }} {
11+ {% include " post.txt" ignore missing % }
12+
13+ tag { sample_id }
14+ publishDir " reports/assembly/quast_{{pid}}/$sample_id "
15+
16+ input :
17+ set sample_id, file(fastq) from {{input_channel}}
18+ val KmerSize from Channel . value(params. bcalmKmerSize{{param_id}})
19+
20+ output :
21+ file " *.unitig.fa"
22+ {% with task_name= " bcalm" % }
23+ {%- include " compiler_channels.txt" ignore missing -% }
24+ {% endwith % }
25+
26+ script :
27+ """
28+ {
29+ bcalm -in $fastq -out unitig -kmer-size $KmerSize "
30+
31+ if [ "$clear " = "true" ];
32+ then
33+ find . -type f -print | egrep "work/.*(h5)|(glue)" | xargs -L 1 rm
34+ fi
35+ }
36+ """
37+ }
38+
You can’t perform that action at this time.
0 commit comments