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

create template GENERATE_DOWNSTREAM_SAMPLESHEETS for tools #3261

Draft
wants to merge 9 commits into
base: dev
Choose a base branch
from

Conversation

Joon-Klaps
Copy link
Contributor

PR checklist

Solves #3259

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

@Joon-Klaps Joon-Klaps changed the title init create template GENERATE_DOWNSTREAM_SAMPLESHEETS for tools Oct 29, 2024
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'
Copy link
Contributor

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?

Copy link
Member

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.

Copy link
Contributor Author

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.

CHANGELOG.md Outdated Show resolved Hide resolved
Comment on lines 18 to 25
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]
}
Copy link
Contributor

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?

Copy link
Member

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.

nf_core/pipelines/create/template_features.yml Outdated Show resolved Hide resolved
nf_core/pipelines/create/template_features.yml Outdated Show resolved Hide resolved
@ewels ewels added this to the 3.2 milestone Nov 21, 2024
@jfy133
Copy link
Member

jfy133 commented Nov 21, 2024

Pending fix here: nextflow-io/nextflow#5465

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: No status
Development

Successfully merging this pull request may close these issues.

5 participants