AstraZeneca-NGS / VarDictJava

VarDict Java port
MIT License
128 stars 57 forks source link

Error when trying to run VarDict Java with the nf-core testing workflow #358

Closed nvnieuwk closed 2 years ago

nvnieuwk commented 2 years ago

I am trying to create a nf-core module for VarDict Java, but I'm having some trouble getting the tests up and running. When I execute the command:

vardict-java \
        $args \
        -b $bam \
        -th $task.cpus \
        -n $prefix \
        -G $reference_fasta \
        $regions_of_interest \
        > ${prefix}.vcf

I get this error:

Exception in thread "main" java.lang.IndexOutOfBoundsException: No group 1                                                                                              
                 at java.base/java.util.regex.Matcher.group(Matcher.java:647)                                                                                                      
                 at com.astrazeneca.vardict.VarDictLauncher.getSampleNames(VarDictLauncher.java:222)                                                                               
                 at com.astrazeneca.vardict.VarDictLauncher.initResources(VarDictLauncher.java:85)                                                                                 
                 at com.astrazeneca.vardict.VarDictLauncher.start(VarDictLauncher.java:49)                                                                                         
                 at com.astrazeneca.vardict.Main.main(Main.java:15)

The variables in the command are:

$args = ' '
$bam = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam'
$task.cpus = 2
$prefix = 'test'
$reference_fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/genome.fasta'
$regions_of_interest = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/genome.bed'

My knowledge in Java is very limited and I am unable to figure out what I did wrong... Hopefully someone with more experience and knowledge can help me solve this issue.