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 meta.id to meta.sample for early tests on sample sheet #760

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
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## nf-core/ampliseq version 2.11.0dev

### `Added`

### `Changed`

### `Fixed`

- [#760](https://github.com/nf-core/ampliseq/pull/760) - Some sample sheet checks were not applied due to changes in the metadata ["meta"] structure in version 2.9.0

### `Dependencies`

### `Removed`

## nf-core/ampliseq version 2.10.0 - 2024-06-27

### `Added`
Expand Down
4 changes: 2 additions & 2 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
report_comment: >
This report has been generated by the <a href="https://github.com/nf-core/ampliseq/releases/tag/2.10.0" target="_blank">nf-core/ampliseq</a>
This report has been generated by the <a href="https://github.com/nf-core/ampliseq/tree/dev" target="_blank">nf-core/ampliseq</a>
analysis pipeline. For information about how to interpret these results, please see the
<a href="https://nf-co.re/ampliseq/2.10.0/docs/output" target="_blank">documentation</a>.
<a href="https://nf-co.re/ampliseq/dev/docs/output" target="_blank">documentation</a>.
report_section_order:
"nf-core-ampliseq-methods-description":
order: -1000
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ manifest {
description = """Amplicon sequencing analysis workflow using DADA2 and QIIME2"""
mainScript = 'main.nf'
nextflowVersion = '!>=23.04.0'
version = '2.10.0'
version = '2.11.0dev'
doi = '10.5281/zenodo.1493841,10.3389/fmicb.2020.550420'
}

Expand Down
8 changes: 4 additions & 4 deletions workflows/ampliseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,13 @@ workflow AMPLISEQ {
ch_input_reads = Channel.empty()
if ( params.input ) {
// See the documentation https://nextflow-io.github.io/nf-validation/samplesheets/fromSamplesheet/
ch_input_reads = Channel.fromSamplesheet("input")
ch_input_reads = Channel.fromSamplesheet("input") // meta: meta.sample, meta.run
.map{ meta, readfw, readrv ->
meta.single_end = single_end.toBoolean()
def reads = single_end ? readfw : [readfw,readrv]
if ( !meta.single_end && !readrv ) { error("Entry `reverseReads` is missing in $params.input for $meta.id, either correct the samplesheet or use `--single_end`, `--pacbio`, or `--iontorrent`") } // make sure that reverse reads are present when single_end isnt specified
if ( !meta.single_end && ( readfw.getSimpleName() == meta.id || readrv.getSimpleName() == meta.id ) ) { error("Entry `sampleID` cannot be identical to simple name of `forwardReads` or `reverseReads`, please change `sampleID` in $params.input for sample $meta.id") } // sample name and any file name without extensions arent identical, because rename_raw_data_files.nf would forward 3 files (2 renamed +1 input) instead of 2 in that case
if ( meta.single_end && ( readfw.getSimpleName() == meta.id+"_1" || readfw.getSimpleName() == meta.id+"_2" ) ) { error("Entry `sampleID`+ `_1` or `_2` cannot be identical to simple name of `forwardReads`, please change `sampleID` in $params.input for sample $meta.id") } // sample name and file name without extensions arent identical, because rename_raw_data_files.nf would forward 2 files (1 renamed +1 input) instead of 1 in that case
if ( !meta.single_end && !readrv ) { error("Entry `reverseReads` is missing in $params.input for $meta.sample, either correct the samplesheet or use `--single_end`, `--pacbio`, or `--iontorrent`") } // make sure that reverse reads are present when single_end isnt specified
if ( !meta.single_end && ( readfw.getSimpleName() == meta.sample || readrv.getSimpleName() == meta.sample ) ) { error("Entry `sampleID` cannot be identical to simple name of `forwardReads` or `reverseReads`, please change `sampleID` in $params.input for sample $meta.sample") } // sample name and any file name without extensions arent identical, because rename_raw_data_files.nf would forward 3 files (2 renamed +1 input) instead of 2 in that case
if ( meta.single_end && ( readfw.getSimpleName() == meta.sample+"_1" || readfw.getSimpleName() == meta.sample+"_2" ) ) { error("Entry `sampleID`+ `_1` or `_2` cannot be identical to simple name of `forwardReads`, please change `sampleID` in $params.input for sample $meta.sample") } // sample name and file name without extensions arent identical, because rename_raw_data_files.nf would forward 2 files (1 renamed +1 input) instead of 1 in that case
return [meta, reads] }
} else if ( params.input_fasta ) {
ch_input_fasta = Channel.fromPath(params.input_fasta, checkIfExists: true)
Expand Down
Loading