@@ -19,6 +19,24 @@ process REFORMAT {
1919 " reformat.sh in=${ fastq_pair[0]} in2=${ fastq_pair[1]} out=${ sample_id} _reads.fasta"
2020}
2121
22+ process REFORMAT_FASTQ {
23+
24+ tag { sample_id }
25+ label ' process_assembly'
26+
27+ when:
28+ params. strainxpress
29+
30+ input:
31+ tuple val(sample_id), path(fastq_pair)
32+
33+ output:
34+ tuple val(sample_id), file(' *_reads.fq' )
35+
36+ script:
37+ " reformat.sh in=${ fastq_pair[0]} in2=${ fastq_pair[1]} out=${ sample_id} _reads.fq"
38+ }
39+
2240process ABYSS {
2341
2442 tag { sample_id }
@@ -334,6 +352,38 @@ process SPADES {
334352 """
335353}
336354
355+ process STRAINXPRESS {
356+
357+ tag { sample_id }
358+ label ' process_assembly'
359+ publishDir " results/$sample_id /assembly/strainxpress"
360+
361+ when:
362+ params. strainxpress
363+
364+ input:
365+ tuple val(sample_id), path(fasta_reads_single)
366+
367+ output:
368+ tuple val(sample_id), val(' StrainXpress' ), path(' *_strainxpress.fasta' ), emit: assembly
369+ path(' .*version' ), emit: version
370+
371+ script:
372+ """
373+ echo '' > .${ sample_id} _strainxpress_version
374+ {
375+ python3 /NGStools/StrainXpress/scripts/strainxpress.py -fq $fasta_reads_single -t $task . cpus
376+
377+ mv all.contigs_*.fasta ${ sample_id} _strainxpress.fasta
378+ echo pass > .status
379+ } || {
380+ echo fail > .status
381+ :> ${ sample_id} _strainxpress.fasta
382+ }
383+ """
384+
385+ }
386+
337387process UNICYCLER {
338388
339389 tag { sample_id }
@@ -419,6 +469,7 @@ workflow assembly_wf {
419469
420470 main :
421471 REFORMAT (IN_fastq_raw )
472+ REFORMAT_FASTQ (IN_fastq_raw )
422473 ABYSS (IN_fastq_raw , abyssKmerSize, abyssBloomSize)
423474 GATBMINIAPIPELINE (IN_fastq_raw , gatbKmerSize, GATB_error_correction , gatb_besst_iter)
424475 IDBA (REFORMAT . out)
@@ -428,6 +479,7 @@ workflow assembly_wf {
428479 MINIA (IN_fastq_raw , miniaKmerSize)
429480 SKESA (IN_fastq_raw )
430481 SPADES (IN_fastq_raw , spadesKmerSize)
482+ STRAINXPRESS (REFORMAT_FASTQ . out)
431483 UNICYCLER (IN_fastq_raw )
432484 VELVETOPTIMISER (IN_fastq_raw )
433485
@@ -440,6 +492,7 @@ workflow assembly_wf {
440492 MINIA . out. assembly,
441493 SKESA . out. assembly,
442494 SPADES . out. assembly,
495+ STRAINXPRESS . out. assembly,
443496 UNICYCLER . out. assembly,
444497 VELVETOPTIMISER . out. assembly)
445498 all_versions = ABYSS . out. version | mix(GATBMINIAPIPELINE . out. version,
@@ -450,6 +503,7 @@ workflow assembly_wf {
450503 MINIA . out. version,
451504 SKESA . out. version,
452505 SPADES . out. version,
506+ STRAINXPRESS . out. version,
453507 UNICYCLER . out. version,
454508 VELVETOPTIMISER . out. version) | collect
455509
0 commit comments