lindenb / jvarkit

Java utilities for Bioinformatics
https://jvarkit.readthedocs.io/
Other
476 stars 131 forks source link

[SEVERE][VcfAncestralAllele]Cannot read non-existent file: ***HELP*** #240

Closed Warrenkevin closed 8 months ago

Warrenkevin commented 8 months ago

@lindenb Hi Pierre!

[SEVERE][VcfAncestralAllele]Cannot read non-existent file:

I keep getting an error message when trying to execute the following code:

java -jar dist/jvarkit.jar vcfancestralalleles \ -m /usr3/graduate/warrenkb/Candidate_Genes_AA/Manifest_Example_chr15 \ usr3/graduate/warrenkb/Candidate_Genes_AA/ALDH1A3_37.vcf |\ bcftools annotate -x '^INFO/AA'

Your environment

[warrenkb@scc1 jvarkit]$ module load htslib/1.17 [warrenkb@scc1 jvarkit]$ module load samtools/1.17 [warrenkb@scc1 jvarkit]$ module load bcftools/1.17 [warrenkb@scc1 jvarkit]$ module load java/17.0.8 [warrenkb@scc1 jvarkit]$ java -jar dist/jvarkit.jar vcfancestralalleles \

-m /usr3/graduate/warrenkb/Candidate_Genes_AA/Manifest_Example_chr15 \ usr3/graduate/warrenkb/Candidate_Genes_AA/ALDH1A3_37.vcf |\ bcftools annotate -x '^INFO/AA' [SEVERE][VcfAncestralAllele]Cannot read non-existent file: file:///usr3/graduate/warrenkb/Candidate_Genes_AA/human_ancestor_15.fa htsjdk.samtools.SAMException: Cannot read non-existent file: file:///usr3/graduate/warrenkb/Candidate_Genes_AA/human_ancestor_15.fa at htsjdk.samtools.util.IOUtil.assertFileIsReadable(IOUtil.java:498) at com.github.lindenb.jvarkit.tools.onekgenomes.VcfAncestralAllele.loadManifest(VcfAncestralAllele.java:179) at com.github.lindenb.jvarkit.tools.onekgenomes.VcfAncestralAllele.beforeVcf(VcfAncestralAllele.java:298) at com.github.lindenb.jvarkit.jcommander.OnePassVcfLauncher.doWork(OnePassVcfLauncher.java:123) at com.github.lindenb.jvarkit.util.jcommander.Launcher.instanceMain(Launcher.java:819) at com.github.lindenb.jvarkit.util.jcommander.Launcher.instanceMainWithExit(Launcher.java:982) at com.github.lindenb.jvarkit.tools.onekgenomes.VcfAncestralAllele.main(VcfAncestralAllele.java:314) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at com.github.lindenb.jvarkit.tools.jvarkit.JvarkitCentral$Command.execute(JvarkitCentral.java:276) at com.github.lindenb.jvarkit.tools.jvarkit.JvarkitCentral.run(JvarkitCentral.java:749) at com.github.lindenb.jvarkit.tools.jvarkit.JvarkitCentral.main(JvarkitCentral.java:760) [SEVERE][OnePassVcfLauncher]initialization failed [INFO][Launcher]vcfancestralalleles Exited with failure (-1) Failed to read from standard input: unknown file type [warrenkb@scc1 jvarkit]$

Steps to reproduce

/usr3/graduate/warrenkb/Candidate_Genes_AA $ module load htslib/1.17 $ module load samtools/1.17 $ module load bcftools/1.17 $ module load java/17.0.8 $ git clone "https://github.com/lindenb/jvarkit.git" $ cd jvarkit $ ./gradlew jvarkit $ java -jar dist/jvarkit.jar vcfancestralalleles \ -m /usr3/graduate/warrenkb/Candidate_Genes_AA/Manifest_Example_chr15 \ usr3/graduate/warrenkb/Candidate_Genes_AA/ALDH1A3_37.vcf |\ bcftools annotate -x '^INFO/AA'

Expected behaviour

Ancestral alleles should be assigned.

Actual behavior

Error Message

lindenb commented 8 months ago

what is the output of file /usr3/graduate/warrenkb/Candidate_Genes_AA/human_ancestor_15.fa ?

Warrenkevin commented 8 months ago

@lindenb I am not quite sure I know what you mean.. This particular file is human ancestor ancestral condition for chr. 15.

Warrenkevin commented 8 months ago

@lindenb This is the file I am working with.

human_ancestor_15.fa.zip

lindenb commented 8 months ago

@lindenb I am not quite sure I know what you mean.. This particular file is human ancestor ancestral condition for chr. 15.

I meant, use the file command https://linux.die.net/man/1/file

$ file "/usr3/graduate/warrenkb/Candidate_Genes_AA/human_ancestor_15.fa"
lindenb commented 8 months ago

the chrom15 looks ok.

lindenb commented 8 months ago

"15|chr15 ANCESTOR_for_chromosome:GRCh37:15:1:102531392:1 /usr3/graduate/warrenkb/Candidate_Genes_AA/human_ancestor_15.fa"

expected two columns

yeah, the message is wrong, it expects 3 columns. I fixed the message today.

I cannot see the content of the file, I cannot say anything about it. Just test with the file command, convert the tab with tr, check by yourself.

lindenb commented 8 months ago

, I cannot say anything about it. Just test with the file command, convert the tab with tr, check by yourself.

Warrenkevin commented 8 months ago

@lindenb Hi Pierre, I was able to get it working! Thank you for the help.