This PR attempts the fix by adding two sanity checks after reading the sample sheet that will raise a clear error with the request to change sampleIDs. I did think about fixing it in the problematic code line of the renaming module that picks up additionally to renamed files also an original input file, but I didn't come up with a feasible solution (all my solutions would require a re-factoring of multiple other modules to correct the sample ID).
Using the sample sheet samplesheet.tsv with content
with
(1)nextflow run nf-core/ampliseq -r 2.6.1 -profile test,singularity --metadata false --input samplesheet.tsv --outdir results will fail with
ERROR ~ Error executing process > 'NFCORE_AMPLISEQ:AMPLISEQ:CUTADAPT_WORKFLOW:CUTADAPT_BASIC (S127_02)'
Caused by:
Process `NFCORE_AMPLISEQ:AMPLISEQ:CUTADAPT_WORKFLOW:CUTADAPT_BASIC (S127_02)` terminated with an error exit status (2)
Command executed:
cutadapt \
--cores 2 \
--minimum-length 1 -O 3 -e 0.1 -g GTGYCAGCMGCCGCGGTAA -G GGACTACNVGGGTWTCTAAT --discard-untrimmed \
-o S127_02.trimmed_1.trim.fastq.gz -p S127_02.trimmed_2.trim.fastq.gz \
S127_02.fastq.gz S127_02_1.fastq.gz S127_02_2.fastq.gz \
> S127_02.trimmed.cutadapt.log
cat <<-END_VERSIONS > versions.yml
"NFCORE_AMPLISEQ:AMPLISEQ:CUTADAPT_WORKFLOW:CUTADAPT_BASIC":
cutadapt: $(cutadapt --version)
END_VERSIONS
Command exit status:
2
Command output:
(empty)
Command error:
Run "cutadapt --help" to see command-line options.
See https://cutadapt.readthedocs.io/ for full documentation.
cutadapt: error: You provided 3 input file names, but either one or two are expected. The file names were:
- 'S127_02.fastq.gz'
- 'S127_02_1.fastq.gz'
- 'S127_02_2.fastq.gz'
Hint: If your path contains spaces, you need to enclose it in quotes
or
(2)nextflow run nf-core/ampliseq -r 2.6.1 -profile test,singularity --metadata false --input samplesheet.tsv --outdir results --single_end
will fail with:
ERROR ~ Error executing process > 'NFCORE_AMPLISEQ:AMPLISEQ:CUTADAPT_WORKFLOW:CUTADAPT_BASIC (S115)'
Caused by:
Process `NFCORE_AMPLISEQ:AMPLISEQ:CUTADAPT_WORKFLOW:CUTADAPT_BASIC (S115)` terminated with an error exit status (2)
Command executed:
cutadapt \
--cores 2 \
--minimum-length 1 -O 3 -e 0.1 -g GTGYCAGCMGCCGCGGTAA --discard-untrimmed \
-o S115.trimmed.trim.fastq.gz \
S115.fastq.gz S115_1.fastq.gz \
> S115.trimmed.cutadapt.log
cat <<-END_VERSIONS > versions.yml
"NFCORE_AMPLISEQ:AMPLISEQ:CUTADAPT_WORKFLOW:CUTADAPT_BASIC":
cutadapt: $(cutadapt --version)
END_VERSIONS
Command exit status:
2
Command output:
(empty)
Command error:
Run "cutadapt --help" to see command-line options.
See https://cutadapt.readthedocs.io/ for full documentation.
cutadapt: error: It appears you want to trim paired-end data because you provided two input files, but then you also need to provide two output files (with -o and -p) or use the --interleaved option.
PR checklist
[x] This comment contains a description of changes (with reason).
[ ] If you've fixed a bug or added code that should be tested, add tests!
[ ] If you've added a new tool - have you followed the pipeline conventions in the contribution docs
[ ] If necessary, also make a PR on the nf-core/ampliseq branch on the nf-core/test-datasets repository.
[x] Make sure your code lints (nf-core lint).
[x] Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
[ ] Usage Documentation in docs/usage.md is updated.
[ ] Output Documentation in docs/output.md is updated.
[x] CHANGELOG.md is updated.
[ ] README.md is updated (including new tool citations and authors/contributors).
Closes https://github.com/nf-core/ampliseq/issues/627
This PR attempts the fix by adding two sanity checks after reading the sample sheet that will raise a clear error with the request to change sampleIDs. I did think about fixing it in the problematic code line of the renaming module that picks up additionally to renamed files also an original input file, but I didn't come up with a feasible solution (all my solutions would require a re-factoring of multiple other modules to correct the sample ID).
Using the sample sheet
samplesheet.tsv
with contentwith (1)
nextflow run nf-core/ampliseq -r 2.6.1 -profile test,singularity --metadata false --input samplesheet.tsv --outdir results
will fail withor (2)
nextflow run nf-core/ampliseq -r 2.6.1 -profile test,singularity --metadata false --input samplesheet.tsv --outdir results --single_end
will fail with:PR checklist
nf-core lint
).nextflow run . -profile test,docker --outdir <OUTDIR>
).docs/usage.md
is updated.docs/output.md
is updated.CHANGELOG.md
is updated.README.md
is updated (including new tool citations and authors/contributors).