PharmGKB / PharmCAT

The Pharmacogenomic Clinical Annotation Tool
Mozilla Public License 2.0
120 stars 39 forks source link

Error when providing path to directory containing allele definitions #44

Closed kvergy closed 1 year ago

kvergy commented 3 years ago

bug

I have an eror, when I try to use pharmcat with argument -na (path to definitions dir):

java.lang.NullPointerException
    at sun.nio.fs.UnixPath.normalizeAndCheck(UnixPath.java:77)
    at sun.nio.fs.UnixPath.<init>(UnixPath.java:71)
    at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281)
    at java.nio.file.Paths.get(Paths.java:84)
    at org.pharmgkb.common.io.util.CliHelper.getValidDirectory(CliHelper.java:217)
    at org.pharmgkb.pharmcat.PharmCAT.main(PharmCAT.java:71)

java -jar /home/kvergy/pharmcat/pharmcat-0.7.1-all.jar -na /home/kvergy/CYP/test/2C19 -vcf chip_hg38.vcf -o .

And I have an error:

java.lang.NullPointerException
    at sun.nio.fs.UnixPath.normalizeAndCheck(UnixPath.java:77)
    at sun.nio.fs.UnixPath.<init>(UnixPath.java:71)
    at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281)
    at java.nio.file.Paths.get(Paths.java:84)
    at org.pharmgkb.common.io.util.CliHelper.getValidDirectory(CliHelper.java:217)
    at org.pharmgkb.pharmcat.PharmCAT.main(PharmCAT.java:71)

Then I tried to give -na argument using the path to the default directory from the source code (https://github.com/PharmGKB/PharmCAT/releases/tag/v0.7.1):

java -jar pharmcat-0.7.1-all.jar -vcf chip_hg38.vcf -o . -na /home/kvergy/CYP/test/git/PharmCAT-0.7.1/src/main/resources/org/pharmgkb/pharmcat/definition/alleles/

And I have the same error.

I want to use my custom allele definitions.

markwoon commented 1 year ago

Please try again with the latest version. If this is still a problem, please open a new issue.