Skip to content

Commit

Permalink
Merge branch 'cram_handling' into cram_handling
Browse files Browse the repository at this point in the history
  • Loading branch information
tkchafin authored Oct 1, 2024
2 parents 1e76d93 + c39bb79 commit b089fa8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

process {
withName: SAMTOOLS_FASTQ {
beforeScript = { "export REF_PATH=spoof"}
ext.args = '-F 0x200 -nt'
}

Expand All @@ -20,6 +21,7 @@ process {
}

withName: SAMTOOLS_MERGE {
beforeScript = { "export REF_PATH=spoof"}
ext.args = { "-c -p" }
ext.prefix = { "${meta.id}.merge" }
}
Expand All @@ -31,6 +33,7 @@ process {
}

withName: SAMTOOLS_COLLATETOFASTA {
beforeScript = { "export REF_PATH=spoof"}
ext.args = { (params.use_work_dir_as_temp ? "-T." : "") }
}

Expand All @@ -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"
}

Expand Down Expand Up @@ -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'
}
Expand All @@ -155,6 +160,7 @@ process {
}

withName: SAMTOOLS_STATS {
beforeScript = { "export REF_PATH=spoof"}
ext.prefix = { "${input.baseName}" }
}

Expand All @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions subworkflows/local/filter_pacbio.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 )
Expand All @@ -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 -> \
Expand Down

0 comments on commit b089fa8

Please sign in to comment.