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

nextflow-vep: separate out CLI params configuration #1497

Merged

Conversation

nakib103
Copy link
Contributor

@nakib103 nakib103 commented Sep 14, 2023

nextflow-vep does not allow many-to-many scenario between input VCF and VEP config files. This PR allows for the case where we use nextflow-vep from another pipeline. This is achieved by separating out the processing of CLI params and allocating that jobs to main workflow (which is used when we call nextflow-vep from CLI).

It is the responsibility of the workflow that is calling nextflow-vep to pass the VCF file and related VEP config inside a tuple.

meta map: we also introduce meta map as input parameter to vep workflow -

tuple val(meta), path(vcf), path(vcf_index), path(vep_config)

It is useful to use it instead of long length of parameters list in the process input. Some of which are only passed through to be used by some other downstream process.

Test

You can create a test nextflow pipeline to test the new updates -

include { vep } from "${params.repo_dir}/ensembl-vep/nextflow/workflows/run_vep.nf"

workflow {
	meta = [:]
        meta.one_to_many = 0
        meta.index_type = "tabix"

       ch_vep = Channel.of( [meta, file("path.to.vcf.file"), file("path.to.vcf.file.inedx"), file("path.to.vep_config") ])
}

nextflow-vep should also be tested in CLI mode to see if one-to-one, one-to-many, and many-to-one scenario works.

@nakib103 nakib103 marked this pull request as draft September 14, 2023 08:13
@nuno-agostinho nuno-agostinho self-assigned this Sep 14, 2023
@nakib103 nakib103 added the e112 label Sep 26, 2023
@dbolser
Copy link
Contributor

dbolser commented Oct 26, 2023

Has this been tested?

@nakib103 nakib103 marked this pull request as ready for review November 14, 2023 16:51
@nakib103 nakib103 changed the base branch from postreleasefix/111 to postreleasefix/112 November 14, 2023 16:52
Copy link
Contributor

@nuno-agostinho nuno-agostinho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @nakib103, this PR seems to be working as intended!

All scenarios work when using the main workflow and also the sub-workflow works as expected. Thanks!

nextflow/workflows/run_vep.nf Outdated Show resolved Hide resolved
@nuno-agostinho nuno-agostinho merged commit 1eec1c9 into Ensembl:postreleasefix/112 Jan 5, 2024
1 check failed
@nuno-agostinho
Copy link
Contributor

Merged to main and release/112.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants