Skip to content

Improved error messages when parameter missing #1

@jfy133

Description

@jfy133

It would be useful that the tool does a check for the number of required parameters (those prior to the list of input VCFs), and give a clear error message when not all the expected parameters are provided.

For example, running the following:

$MULTIVCFANALYZER \
NA \
/projects1/calculus_microbiome/evolution/04-analysis/screening/eager/references/${SPECIES^}/*.fa \
/projects1/calculus_microbiome/evolution/04-analysis/screening/eager/references/${SPECIES^}/*.gff \
/projects1/calculus_microbiome/evolution/04-analysis/screening/multivcfanalyzer/output/$PARAM/$SPECIES \
T \
30 \
1 \
0.9 \
0.9 \
${FILES[*]}

where the 'positions to include' parameter is missing, gives the following error:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3
        at Main.getPositionsToExclude(Main.java:1103)
        at Main.main(Main.java:77)

which for a novice command line/java user would not be clear what the issue would be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions