Skip to content

Commit

Permalink
disable & document --list in combination with --fasta
Browse files Browse the repository at this point in the history
  • Loading branch information
MarieLataretu committed Jan 15, 2025
1 parent 73b3a73 commit fb7edd9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ Table of Contents
- [Version control](#version-control)
- [Important input flags (choose one)](#important-input-flags-choose-one)
- [Custom primer bed files](#custom-primer-bed-files)
- [Sample sheet](#sample-sheet)
- [Sample input](#sample-input)
- [Sample sheet](#sample-sheet)
- [--list](#--list)
- [Pangolin Lineage definitions](#pangolin-lineage-definitions)
- [3. Quality Metrics (default)](#3-quality-metrics-default)
- [4. Workflow](#4-workflow)
Expand Down Expand Up @@ -170,7 +172,7 @@ MN908947.3 4240 4262 nCoV-2019_4_RIGHT nCoV-2019_2 -
### Sample input

> [!NOTE]
> For fastq input without `--sample` and `--list`, samples with less then 1500 kB file size after fastq concatenation and size selection, are removed.
> For fastq input without `--sample` and `--list`, samples with less than 1500 kB fastq file size after concatenation and size selection, are removed.
#### Sample sheet
* barcodes can be automatically renamed via `--samples sample_names.csv`
Expand All @@ -189,7 +191,7 @@ Sample_2021,barcode01,good

#### --list

* alternatively, fasta and fastq files can automatically renamed via `--fast[a|q] list.csv --list`
* alternatively fastq files can automatically renamed via `--fastq list.csv --list`
* no header required, example:

```csv
Expand Down
11 changes: 3 additions & 8 deletions poreCov.nf
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ if (!workflow.profile.contains('test_fastq') && !workflow.profile.contains('test
if ( params.fasta && ( params.fastq || params.fast5 || params.fastq_pass)) { exit 1, "Please use [--fasta] without inputs like: [--fastq], [--fastq_pass], [--fast5]" }
if (( params.fastq || params.fastq_pass ) && params.fast5 && !params.nanopolish ) {
exit 1, "Simultaneous fastq and fast5 input is only supported with [--nanopolish]"}
if (params.list && params.fasta) { exit 1, "[--fasta] and [--list] is not supported" }

}
if ( (params.cores.toInteger() > params.max_cores.toInteger()) && workflow.profile.contains('local')) {
Expand Down Expand Up @@ -156,16 +157,10 @@ if (params.samples) {
**************************/

// fasta input
if (!params.list && params.fasta && !workflow.profile.contains('test_fasta')) {
if (params.fasta && !workflow.profile.contains('test_fasta')) {
fasta_input_raw_ch = Channel
.fromPath( params.fasta, checkIfExists: true)
}
else if (params.list && params.fasta && !workflow.profile.contains('test_fasta')) {
fasta_input_raw_ch = Channel
.fromPath( params.fasta, checkIfExists: true )
.splitCsv()
.map { row -> file("${row[1]}", checkIfExists: true) }
}

// consensus qc reference input - auto using git default if not specified
if (params.reference_for_qc) {
Expand Down Expand Up @@ -508,7 +503,7 @@ ${c_yellow}Workflow control (optional)${c_reset}
Status,_id
barcode01,sample2011XY
BC02,thirdsample_run
--list --fast[a|q] is a csv file containing a new sample name and the path (no header), e.g.:
--list --fastq is a csv file containing a new sample name and the path (no header), e.g.:
sample1,path_to_first_sample.fastq.gz
sample2,path_to_second_sample.fastq.gz
--extended poreCov utilizes from --samples these additional headers:
Expand Down

0 comments on commit fb7edd9

Please sign in to comment.