Skip to content

Commit

Permalink
refactor: use Channel.fromPath(type:'dir') for fastq screen
Browse files Browse the repository at this point in the history
obviates need to mount/bind db dir to container
  • Loading branch information
kelly-sovacool committed Sep 19, 2023
1 parent 9c96c9b commit c3f487b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 0 additions & 6 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,4 @@ process {
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
withName: FASTQ_SCREEN {
// use bind for singularity and volume for docker
containerOptions = { workflow.containerEngine == 'singularity' ?
"--mount type=bind,src=$params.fastq_screen.db_dir,dst=$params.fastq_screen.db_dir" :
"--volume $params.fastq_screen.db_dir:$params.fastq_screen.db_dir "}
}
}
3 changes: 2 additions & 1 deletion modules/local/qc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ process FASTQ_SCREEN {
container = "${params.containers.fastq_screen}"

input:
tuple val(meta), path(fastq), path(conf)
tuple val(meta), path(fastq), path(conf), path(db_dir)

output:
path("${meta.id}*_screen.*"), emit: screen

Expand Down
5 changes: 4 additions & 1 deletion subworkflows/local/qc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ workflow QC {
main:
raw_fastqs.combine(Channel.value("raw")) | FASTQC_RAW
trimmed_fastqs.combine(Channel.value("trimmed")) | FASTQC_TRIMMED
trimmed_fastqs.combine(Channel.fromPath(params.fastq_screen.conf)) | FASTQ_SCREEN
trimmed_fastqs
.combine(Channel.fromPath(params.fastq_screen.conf, checkIfExists: true))
.combine(Channel.fromPath(params.fastq_screen.db_dir,
type: 'dir', checkIfExists: true)) | FASTQ_SCREEN

PRESEQ(aligned_bam)
// when preseq fails, write NAs for the stats that are calculated from its log
Expand Down

0 comments on commit c3f487b

Please sign in to comment.