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

Allow the user to specify additional fgbio options #105

Open
lbeltrame opened this issue Jan 16, 2025 · 5 comments
Open

Allow the user to specify additional fgbio options #105

lbeltrame opened this issue Jan 16, 2025 · 5 comments
Labels
enhancement New feature or request

Comments

@lbeltrame
Copy link

Description of feature

Many modules support this, but it's not hooked in the pipeline as far as I can tell.
This is important to pass some options in IDT UMI based kits as detailed in https://sfvideo.blob.core.windows.net/sitefinity/docs/default-source/user-guide-manual/analysis-guideline-xgen-udi-umi-adapters-processing-sequence-data-with-unique-molecular-identifiers-(umis).pdf?sfvrsn=d0aa3207_40

@lbeltrame lbeltrame added the enhancement New feature or request label Jan 16, 2025
@SPPearce
Copy link
Contributor

All the modules should have the ability to take an external args via a config, even if not exposed as a parameter in the pipeline.

@lbeltrame
Copy link
Author

lbeltrame commented Jan 16, 2025

I saw a variable called ext.args.fgbio, but I think it's applied to all fgbio modules?

If that's the case, perhaps an example (in the future) might be a good addition to the docs. (I already run custom configurations but I'm never sure I did things correctly).

@SPPearce
Copy link
Contributor

https://nf-co.re/docs/usage/getting_started/configuration#customising-tool-arguments might help.
For instance the pipeline contains FGBIO_FILTERCONSENSUSREADS as a local module.
The code for this module has (focussing on the relevant bits):

    def fgbio_args = task.ext.fgbio_args ?: ''

    fgbio \\
        ...
        FilterConsensusReads \\
        ...
        $fgbio_args \\

which means that if task.ext.fgbio_args is defined, it will pass whatever is given into the fgbio FilterConsensusReads command when it executes.

So if you provide an additional config file with:

process {
    withName: FGBIO_FILTERCONSENSUSREADS {
        ext.fgbio_args= "--reverse-per-base-tags"
  }
}

Then this additional --reverse-per-base-tags will be passed to the fgbio tool.
Note in general nf-core modules it would usually be task.ext.args and task.ext.args2 etc, but in the local module they are fgbio_args and samtools_args for instance here.

@lbeltrame
Copy link
Author

All right, I'll see about this then. Probably this needs to be closed.

@SPPearce
Copy link
Contributor

If there are specific options that would be needed for specific kits, they could be added as a parameter.
A parameter is much more user friendly than requiring a config file

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

No branches or pull requests

2 participants