VariantRecalibrator error

frankibfrankib Sherbrooke, CanadaPosts: 41Member

Hi,

I'm now at the VQSR step of the best practices and to my surprise I got the following error related to java (I think):

Error: Could not find or load main class –jar

Here is my command line:

java –jar GenomeAnalysisTK.jar –T VariantRecalibrator –R ../human_g1k_v37.fasta –input ../raw_variants.vcf -resource:hapmap,known=false,training=true,truth=true,prior=15.0 ../hapmap_3.3.b37.vcf -resource:omni,known=false,training=true,truth=false,prior=12.0 ../1000G_omni2.5.b37.vcf -resource:dbsnp,known=true,training=false,truth=false,prior=2.0 ../dbsnp_138.b37.vcf -resource:1000G,known=false,training=true,truth=false,prior=10.0 ../1000G_phase1.snps.high_confidence.b37.vcf -an QD -an MQRankSum -an ReadPosRankSum -an FS --maxGaussians 4 –mode SNP -tranche 100.0 -tranche 99.9 -tranche 99.0 -tranche 90.0 –recalFile raw.SNPs.recal –tranchesFile raw.SNPs.tranches -rscriptFile recal.plots.R

I don't understand what is the problem. Could someone look at it and identify if I made a mistake in my command line?

Thank you for your support

Best Answers

Answers

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 7,424Administrator, GATK Developer admin

    Nothing's jumping out at me but I would recommend re-typing your command line from scratch, at least.

    Geraldine Van der Auwera, PhD

  • frankibfrankib Sherbrooke, CanadaPosts: 41Member

    I got the same error after I having retried.
    Is it possible that the VariantRecalibrator tool is just badly installed? Is there a shorter command line that I can use just to test if the tool can work?

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 7,424Administrator, GATK Developer admin

    No, you wouldn't get that error for just one tool. You can try java -jar GenomeAnalysisTK.jar -T VariantRecalibrator -h to bring up the help message and documentation for the tool.

    Geraldine Van der Auwera, PhD

  • frankibfrankib Sherbrooke, CanadaPosts: 41Member

    I tried to recalibrate indels first with this command:

    java –jar GenomeAnalysisTK.jar –T VariantRecalibrator –R ../human_g1k_v37.fasta –I ../raw_variants.vcf -resource:mills,known=true,training=true,truth=true,prior=12.0 ../Mills_and_1000G_gold_standard.indels.b37.vcf
    -an QD -an MQRankSum -an ReadPosRankSum -an FS
    --maxGaussians 4 –mode INDEL -tranche 100.0 -tranche 99.9 -tranche 99.0 -tranche 90.0
    –recalFile ../raw.indels.recal –tranchesFile ../raw.SNPs.tranches -rscriptFile ../recal.plots.R

    and got the same error. Should I reinstall java and/or GATK?

    Just don't know what to do right now...

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 7,424Administrator, GATK Developer admin

    Is it also happening with other GATK tools? And are you using a version downloaded from our website, or one that you compiled yourself?

    Geraldine Van der Auwera, PhD

  • frankibfrankib Sherbrooke, CanadaPosts: 41Member

    @Geraldine_VdAuwera said:
    Is it also happening with other GATK tools? And are you using a version downloaded from our website, or one that you compiled yourself?

    No. All the tools that I've used so far (I follow the best practices) work properly. I downloaded the latest version on your website (v2.8-1-g932cd3a, Compiled 2013/12/06 16:47:15)

  • frankibfrankib Sherbrooke, CanadaPosts: 41Member

    I'll check if I could find another machine...

  • frankibfrankib Sherbrooke, CanadaPosts: 41Member

    @Geraldine_VdAuwera said:
    Hmm. You can always try downloading the package again but I can't think of why that would make a difference. Do you have access to a different machine you could test on in parallel?

    I finally found what was wrong. The problem was the "-" symbol in front of "jar". The one I used (although I don't know why) was not read by the machine. The one causing problem was a little bit longer than the one it should be used...

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 7,424Administrator, GATK Developer admin

    Ack, I should have thought of that. Did you maybe compose the command line in a word processor? MS Word for example will substitute long dashes for style, but then in the shell it's interpreted as a different character.

    Geraldine Van der Auwera, PhD

  • frankibfrankib Sherbrooke, CanadaPosts: 41Member

    No. In fact if I remember well, I think I copied it from your website since the command line was pretty long...

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 7,424Administrator, GATK Developer admin

    Ah, that could cause character encoding issues. Glad it's resolved anyway.

    Geraldine Van der Auwera, PhD

  • frankibfrankib Sherbrooke, CanadaPosts: 41Member

    Now, I'm having problem to view the plot.r.pdf file. When I try to open it, I got the following message: "File type plain text document (text/plain) is not supported". When I tried to open it under windows with acrobat XI, I'm not able to open it. How can I be sure that the Variantcalibrator worked properly?

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 7,424Administrator, GATK Developer admin

    Did the run complete successfully? And have you tried opening the file on a different machine? It's a plain pdf...

    Geraldine Van der Auwera, PhD

  • frankibfrankib Sherbrooke, CanadaPosts: 41Member

    Also I've found this warning:
    WARN 11:49:58,760 Utils - ********************************************************************************
    WARN 11:49:58,760 Utils - * WARNING:
    WARN 11:49:58,760 Utils - *
    WARN 11:49:58,761 Utils - * Rscript not found in environment path. ../recal.plots.R.pdf will be
    WARN 11:49:58,761 Utils - * generated but PDF plots will not.
    WARN 11:49:58,761 Utils - ********************************************************************************

  • frankibfrankib Sherbrooke, CanadaPosts: 41Member

    Rscript has been installed and no warning showed up when I run again the tool, but I still can't open the plot.R file (by the way it is a plain text document type). However there is a .tranches.pdf that is produced and that one I can open it.
    I tried to run again by adding the extension .pdf to the plot.R file (plot.R.pdf) in the command line but that didn't change anything. I attached the INFO, maybe you'll see what is the issue...

    txt
    txt
    INFO.txt
    8K
  • frankibfrankib Sherbrooke, CanadaPosts: 41Member

    OK. I see. thank you...

Sign In or Register to comment.