diff --git a/conf/modules.config b/conf/modules.config index 07d7d5a..342caca 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -12,6 +12,7 @@ process { withName: SAMTOOLS_FASTQ { + beforeScript = { "export REF_PATH=spoof"} ext.args = '-F 0x200 -nt' } @@ -20,6 +21,7 @@ process { } withName: SAMTOOLS_MERGE { + beforeScript = { "export REF_PATH=spoof"} ext.args = { "-c -p" } ext.prefix = { "${meta.id}.merge" } } @@ -31,6 +33,7 @@ process { } withName: SAMTOOLS_COLLATETOFASTA { + beforeScript = { "export REF_PATH=spoof"} ext.args = { (params.use_work_dir_as_temp ? "-T." : "") } } @@ -39,6 +42,7 @@ process { } withName: SAMTOOLS_CONVERT { + beforeScript = { "export REF_PATH=spoof"} ext.args = "-be '[rq]>=0.99' -x fi -x fp -x ri -x rp --write-index" } @@ -132,6 +136,7 @@ process { } withName: '.*:CONVERT_STATS:SAMTOOLS_CRAM' { + beforeScript = { "export REF_PATH=spoof"} ext.prefix = { "${fasta.baseName}.${meta.datatype}.${meta.id}" } ext.args = '--output-fmt cram --write-index' } @@ -155,6 +160,7 @@ process { } withName: SAMTOOLS_STATS { + beforeScript = { "export REF_PATH=spoof"} ext.prefix = { "${input.baseName}" } } @@ -164,6 +170,7 @@ process { } withName: '.*:CONVERT_STATS:SAMTOOLS_.*' { + beforeScript = { "export REF_PATH=spoof"} publishDir = [ path: { "${params.outdir}/read_mapping/${meta.datatype}" }, mode: params.publish_dir_mode, diff --git a/subworkflows/local/filter_pacbio.nf b/subworkflows/local/filter_pacbio.nf index 0f3972f..5edb338 100644 --- a/subworkflows/local/filter_pacbio.nf +++ b/subworkflows/local/filter_pacbio.nf @@ -9,7 +9,7 @@ include { BLAST_BLASTN } from '../../modules/nf-core/blast/ include { PACBIO_FILTER } from '../../modules/local/pacbio_filter' include { SAMTOOLS_FILTERTOFASTQ } from '../../modules/local/samtools_filtertofastq' include { SEQKIT_FQ2FA } from '../../modules/nf-core/seqkit/fq2fa' -include { BBMAP_FILTERBYNAME } from '../../modules/nf-core/bbmap/filterbyname/main' +include { BBMAP_FILTERBYNAME } from '../../modules/nf-core/bbmap/filterbyname' workflow FILTER_PACBIO { @@ -67,7 +67,7 @@ workflow FILTER_PACBIO { ch_versions = ch_versions.mix ( PACBIO_FILTER.out.versions.first() ) - // Filter the BAM files and convert to FASTQ + // Filter the input BAM and output as interleaved FASTA SAMTOOLS_CONVERT.out.bam | join ( SAMTOOLS_CONVERT.out.csi ) | join ( PACBIO_FILTER.out.list ) @@ -81,7 +81,7 @@ workflow FILTER_PACBIO { ch_versions = ch_versions.mix ( SAMTOOLS_FILTERTOFASTQ.out.versions.first() ) - // Filter inputs provided as FASTQ + // Filter inputs provided as FASTQ and output as interleaved FASTQ ch_reads.fastq | join(PACBIO_FILTER.out.list) | multiMap { meta, fastq, list -> \