-
Notifications
You must be signed in to change notification settings - Fork 192
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
create template GENERATE_DOWNSTREAM_SAMPLESHEETS for tools #3261
base: dev
Are you sure you want to change the base?
Conversation
This commit refactors the generate_downstream_samplesheets subworkflow in the pipeline-template. It updates the workflow to a specific pipeline and adds support for more pipelines in the future. The changes include modifying the input parameters and updating the channelToSamplesheet function. This refactoring improves the flexibility and extensibility of the subworkflow.
{% if downstream_samplesheets -%} | ||
// Downstream samplesheets | ||
generate_downstream_samplesheets = true | ||
generate_pipeline_samplesheets = 'rnaseq' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to have that as a default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It think we need to add more TODO statemetns next to this, I'm in two minds whether we should put an example or empty.
The whole thing might not be immediately obvious how to adapt without the example. For example I would actually extend the example to comma separated list as this is supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jfy133 I like that idea. But we should be carefull not to make it to complex.
nf_core/pipeline-template/subworkflows/local/generate_downstream_samplesheets/main.nf
Outdated
Show resolved
Hide resolved
ch_list_for_samplesheet = ch_reads.map { meta, reads -> | ||
def out_path = file(params.outdir).toString() + '/relative/custom/path/' | ||
def sample = meta.id | ||
def fastq_1 = meta.single_end ? out_path + reads.getName() : out_path + reads[0].getName() | ||
def fastq_2 = !meta.single_end ? out_path + reads[1].getName() : "" | ||
def strandedness = "auto" | ||
[sample: sample, fastq_1: fastq_1, fastq_2: fastq_2, strandedness: strandedness] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we sure we want it to make so genomics specific?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See reply above about pros/cons of example code (maybe with more TODOs.
Pending fix here: nextflow-io/nextflow#5465 |
PR checklist
Solves #3259
CHANGELOG.md
is updateddocs
is updated