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

Fix AncientDNA results files overwriting #451

Merged
merged 1 commit into from
Jun 7, 2023
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#438](https://github.com/nf-core/mag/pull/438) - Fixed version inconsistency between conda and containers for GTDBTK_CLASSIFYWF (by @jfy133)
- [#439](https://github.com/nf-core/mag/pull/445) - Fix bug in assembly input (by @prototaxites)
- [#447](https://github.com/nf-core/mag/pull/447) - Remove `default: None` from parameter schema (by @drpatelh)
- [#449](https://github.com/nf-core/mag/pull/447) - Fix results file overwriting in Ancient DNA workflow (reported by @alexhbnr, fix by @jfy133)

### `Dependencies`

Expand Down
12 changes: 9 additions & 3 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ process {
}

withName: FREEBAYES {
ext.prefix = { "${meta.assembler}-${meta.id}" }
ext.args = "-p ${params.freebayes_ploidy} -q ${params.freebayes_min_basequality} -F ${params.freebayes_minallelefreq}"
publishDir = [
path: { "${params.outdir}/Ancient_DNA/variant_calling/freebayes" },
Expand All @@ -487,7 +488,7 @@ process {

withName: BCFTOOLS_VIEW {
ext.args = "-v snps,mnps -i 'QUAL>=${params.bcftools_view_high_variant_quality} || (QUAL>=${params.bcftools_view_medium_variant_quality} && FORMAT/AO>=${params.bcftools_view_minimal_allelesupport})'"
ext.prefix = { "${meta.id}.filtered" }
ext.prefix = { "${meta.assembler}-${meta.id}.filtered" }
publishDir = [
path: { "${params.outdir}/Ancient_DNA/variant_calling/filtered" },
mode: params.publish_dir_mode,
Expand All @@ -496,6 +497,7 @@ process {
}

withName: BCFTOOLS_CONSENSUS {
ext.prefix = { "${meta.assembler}-${meta.id}" }
publishDir = [
path: {"${params.outdir}/Ancient_DNA/variant_calling/consensus" },
mode: params.publish_dir_mode,
Expand All @@ -504,6 +506,7 @@ process {
}

withName: BCFTOOLS_INDEX {
ext.prefix = { "${meta.assembler}-${meta.id}" }
ext.args = "-t"
publishDir = [
path: {"${params.outdir}/Ancient_DNA/variant_calling/index" },
Expand All @@ -513,21 +516,24 @@ process {
}

withName: PYDAMAGE_ANALYZE {
ext.prefix = { "${meta.assembler}-${meta.id}" }
publishDir = [
path: {"${params.outdir}/Ancient_DNA/pydamage/analyze/${meta.id}" },
path: {"${params.outdir}/Ancient_DNA/pydamage/analyze/" },
mode: params.publish_dir_mode
]
}

withName: PYDAMAGE_FILTER {
ext.prefix = { "${meta.assembler}-${meta.id}" }
ext.args = "-t ${params.pydamage_accuracy}"
publishDir = [
path: {"${params.outdir}/Ancient_DNA/pydamage/filter/${meta.id}" },
path: {"${params.outdir}/Ancient_DNA/pydamage/filter/" },
mode: params.publish_dir_mode
]
}

withName: SAMTOOLS_FAIDX {
ext.prefix = { "${meta.assembler}-${meta.id}" }
publishDir = [
path: {"${params.outdir}/Ancient_DNA/samtools/faidx" },
mode: params.publish_dir_mode,
Expand Down
10 changes: 5 additions & 5 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -617,9 +617,9 @@ Optional, only running when parameter `-profile ancient_dna` is specified.
<summary>Output files</summary>

- `Ancient_DNA/pydamage/analyze`
- `[sample/group]/pydamage_results/pydamage_results.csv`: PyDamage raw result tabular file in `.csv` format. Format described here: [pydamage.readthedocs.io/en/0.62/output.html](https://pydamage.readthedocs.io/en/0.62/output.html)
- `[assembler]_[sample/group]/pydamage_results/pydamage_results.csv`: PyDamage raw result tabular file in `.csv` format. Format described here: [pydamage.readthedocs.io/en/0.62/output.html](https://pydamage.readthedocs.io/en/0.62/output.html)
- `Ancient_DNA/pydamage/filter`
- `[sample/group]/pydamage_results/pydamage_results.csv`: PyDamage filtered result tabular file in `.csv` format. Format described here: [pydamage.readthedocs.io/en/0.62/output.html](https://pydamage.readthedocs.io/en/0.62/output.html)
- `[assembler]_[sample/group]/pydamage_results/pydamage_results.csv`: PyDamage filtered result tabular file in `.csv` format. Format described here: [pydamage.readthedocs.io/en/0.62/output.html](https://pydamage.readthedocs.io/en/0.62/output.html)

</details>

Expand All @@ -631,11 +631,11 @@ Because of aDNA damage, _de novo_ assemblers sometimes struggle to call a correc
<summary>Output files</summary>

- `variant_calling/consensus`
- `[sample/group].fa`: contigs sequence with re-called consensus from read-to-contig alignment
- `[assembler]_[sample/group].fa`: contigs sequence with re-called consensus from read-to-contig alignment
- `variant_calling/unfiltered`
- `[sample/group].vcf.gz`: raw variant calls of the reads aligned back to the contigs.
- `[assembler]_[sample/group].vcf.gz`: raw variant calls of the reads aligned back to the contigs.
- `variant_calling/filtered`
- `[sample/group].filtered.vcf.gz`: quality filtered variant calls of the reads aligned back to the contigs.
- `[assembler]_[sample/group].filtered.vcf.gz`: quality filtered variant calls of the reads aligned back to the contigs.

</details>

Expand Down