Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output bai when using ht mode #78

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Enhancements & fixes

.
- [PR #78](https://github.com/nf-core/fastquorum/pull/78) - Publish the bam index file when using the `ht` mode

## [[1.0.1]](https://github.com/nf-core/fastquorum/releases/tag/1.0.1) -- 2024-09-10

Expand Down
59 changes: 19 additions & 40 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -56,30 +56,23 @@ process {
]
}

withName: '.*FASTQTOBAM' {
withName: 'FASTQTOBAM' {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the .*FASTQTOBAM is so this can still be valid if fastquorum is used as a subworkflow/module in other contexts. We should leave the globs as is for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the .*FASTQTOBAM is so this can still be valid if fastquorum is used as a subworkflow/module in other contexts. We should leave the globs as is for now.

I spent several hours a few months ago trying to debug why my config with 'ALIGN_RAW_BAM' wasn't overriding the current modules.config. It'll always match the name FASTQTOBAM, whether in a subworkflow or not, but this will also match any process including the string "FASTQTOBAM".
You should only use the .* if you want to match multiple processes.

publishDir = [
path: { "${params.outdir}/preprocessing/fastqtobam/${meta.id}" },
mode: params.publish_dir_mode,
pattern: '*.unmapped.bam'
]
}

withName: '.*ALIGN_RAW_BAM' {
withName: 'ALIGN_RAW_BAM' {
publishDir = [
[
path: { "${params.outdir}/preprocessing/align_raw_bam/${meta.id}" },
mode: params.publish_dir_mode,
pattern: '*.mapped.bam'
],
[
path: { "${params.outdir}/preprocessing/align_raw_bam/${meta.id}" },
mode: params.publish_dir_mode,
pattern: '*.mapped.bam.bai'
]
path: { "${params.outdir}/preprocessing/align_raw_bam/${meta.id}" },
mode: params.publish_dir_mode,
pattern: '*.mapped.bam*'
]
}

withName: '.*MERGE_BAM' {
withName: 'MERGE_BAM' {
ext.args = '--template-coordinate'
publishDir = [
path: { "${params.outdir}/preprocessing/merged/${meta.id}" },
Expand All @@ -89,7 +82,7 @@ process {
}

/* This can be removed when https://github.com/samtools/samtools/pull/2062 is merged */
withName: '.*SORTBAM' {
withName: 'SORTBAM' {
ext.args = '--sort-order TemplateCoordinate'
ext.prefix = { "${meta.id}.sorted" }
publishDir = [
Expand All @@ -99,7 +92,7 @@ process {
]
}

withName: '.*GROUPREADSBYUMI' {
withName: 'GROUPREADSBYUMI' {
publishDir = [
[
path: { "${params.outdir}/grouping/groupreadsbyumi/${meta.id}" },
Expand All @@ -115,54 +108,40 @@ process {
}

if (params.duplex_seq) {
withName: '.*COLLECTDUPLEXSEQMETRICS' {
withName: 'COLLECTDUPLEXSEQMETRICS' {
publishDir = [
[
path: { "${params.outdir}/metrics/duplex_seq/${meta.id}" },
mode: params.publish_dir_mode,
pattern: '*duplex_seq_metrics*.txt'
],
[
path: { "${params.outdir}/metrics/duplex_seq/${meta.id}" },
mode: params.publish_dir_mode,
pattern: '*duplex_seq_metrics*.pdf'
]
path: { "${params.outdir}/metrics/duplex_seq/${meta.id}" },
mode: params.publish_dir_mode,
pattern: '*duplex_seq_metrics*'
]
}
}

withName: '.*CALLDDUPLEXCONSENSUSREADS|.*CALLMOLECULARCONSENSUSREADS' {
withName: 'CALLDDUPLEXCONSENSUSREADS|CALLMOLECULARCONSENSUSREADS' {
publishDir = [
path: { "${params.outdir}/consensus_calling/called/${meta.id}" },
mode: params.publish_dir_mode,
pattern: '*.cons.unmapped.bam'
]
}

withName: '.*CALLANDFILTERDUPLEXCONSENSUSREADS|.*CALLANDFILTERMOLECULARCONSENSUSREADS|.*FILTERCONSENSUSREADS' {
withName: 'CALLANDFILTERDUPLEXCONSENSUSREADS|CALLANDFILTERMOLECULARCONSENSUSREADS|FILTERCONSENSUSREADS' {
publishDir = [
[
path: { "${params.outdir}/consensus_filtering/filtered/${meta.id}" },
mode: params.publish_dir_mode,
pattern: '*.cons.filtered.bam'
],
[
path: { "${params.outdir}/consensus_filtering/filtered/${meta.id}" },
mode: params.publish_dir_mode,
pattern: '*.cons.filtered.bam.bai'
]
path: { "${params.outdir}/consensus_filtering/filtered/${meta.id}" },
mode: params.publish_dir_mode,
pattern: '*.cons.filtered.bam*'
]
}

withName:'FILTERCONSENSUSREADS' {
memory = { check_max( 12.GB * task.attempt, 'memory' ) }
}

withName: '.*ALIGN_CONSENSUS_BAM' {
withName: 'ALIGN_CONSENSUS_BAM' {
publishDir = [
path: { "${params.outdir}/filtering/align_consensus_bam/${meta.id}" },
mode: params.publish_dir_mode,
pattern: '*.mapped.bam'
pattern: '*.mapped.bam*'
]
}

Expand Down
Loading