peterk87 / nf-flu

Influenza genome analysis Nextflow workflow
MIT License
21 stars 17 forks source link

Change samplesheet to specify samples from difference Nanopore runs #10

Closed nhhaidee closed 2 years ago

nhhaidee commented 2 years ago

Instead of the user specifying 2 different parameters for the same thing, we should just have them specify a path to either a FASTQ file or a directory and the workflow should determine what it should do.

If the path is to a directory, then check if there are FASTQ files in the directory and put those on the channel for concatenation. Otherwise, raise an error that no sequences are specified for that sample.

If the path is to a file, then check that the file exists and has the expected file extension (e.g. regex match (\.fastq|\.fq)(\.gz)?)$).

It should be possible for a user to specify samples from different Nanopore runs in the same analysis

sample reads
sample1 /path/to/run1/fastq_pass/barcode01
sample2 /path/to/run2/fastq_pass/barcode99

Sometimes there will be multiple concurrent runs on different flowcells on our GridION and PromethION sequencers, so it would be nice to be able to analyse all samples together rather than running the workflow multiple times on slightly different run paths.

_Originally posted by @peterk87 in https://github.com/peterk87/nf-iav-illumina/pull/8#discussion_r850406599_