For the tool `vlcust/cluster` , it’s required to g...
# modules
j
For the tool
vlcust/cluster
, it’s required to give a one of the three distances or any combination of, by default it doesn’t work. Should I set a default value- if nothing is given? Looking for some feedback.
Copy code
--tani <float>               Min. total ANI (0-1) [0]
 --gani <float>               Min. global ANI (0-1) [0]
 --ani <float>                Min. ANI (0-1) [0]
I was thinking of doing something like this so that the module works out of the box:
Copy code
input:
    tuple val(meta), path(tsv)
    tuple val(meta2), path(ids)
    val tani
    val gani
    val ani

....

    script:
    def args = task.ext.args ?: ''
    def prefix = task.ext.prefix ?: "${meta.id}"
    def tani_command = tani ? "--tani ${tani}" : ''
    def gani_command = gani ? "--gani ${gani}" : ''
    def ani_command = ani ? "--ani ${ani}" : ''

    def metric_command = tani_command + gani_command + ani_command ?: '--ani 0.95'

    """
    vclust \\
        cluster \\
        $args \\
        ${metric_command} \\
j
I wouldn't set a default, I would say that's a mandatory input parameter
Should error of not provided
j
Ok, so like a sanity check, like we have for ouput.name==input.name?
j
Yeah
👍 1