NBISweden / pipelines-nextflow

A set of workflows written in Nextflow for Genome Annotation.
GNU General Public License v3.0
43 stars 18 forks source link

How to unset options in Interproscan? #102

Open gbdias opened 10 months ago

gbdias commented 10 months ago

The interproscan module currently runs the tool with many optional arguments activated.

https://github.com/NBISweden/pipelines-nextflow/blob/8b6c7faf72997ba865ac2992f4abfee12a9ec37a/config/functional_annotation_modules.config#L18C4-L27C6

How do I unset options like: --goterms and -pa?

mahesh-panchal commented 10 months ago

Supply a custom config with the args you want:

process {
    withName: 'INTERPROSCAN' {
        ext.args = '-f TSV --iprlookup -dp -t p'
    }
}

and then run it using nextflow run <script> -c custom.config ....

It's been documented here: https://github.com/NBISweden/pipelines-nextflow/blob/master/subworkflows/functional_annotation/README.md#tool-specific-parameters

How can I make this clearer / better findable?

gbdias commented 10 months ago

Ok great. So if I want all current args except one, I still need to provide the full list? I though ext.args was only for extra arguments, like in addition to the ones already set.

mahesh-panchal commented 10 months ago

No, unfortunately Nextflow doesn't have inheritance, so assigning to a variable overrides it in the config. If you want all except one, then yes, you provide that full list leaving out the one you don't need.