Hello, I had some problem with gatk haplotypecaller, someone can help me? thats the error:
Error: Could not find or load main class “-Xmx4g”
my command:
./gatk --java-options “-Xmx4g” HaplotypeCaller -R /home/adriel-rosa/STARteste/referência/Oreochromis_niloticus.O_niloticus_UMD_NMBU.dna.toplevel.fa -I /home/adriel-rosa/STARteste/Alinhamento/T1R2_6H/out/BAM/T1R2_6H.out.bam -O /home/adriel-rosa/STARteste/Gatk/T1R2_6H_out.g.vcf.gz -ERC GVCF
the complete message:
(base) adriel-rosa@mendel-main:~/gatk-4.1.4.1$ ./gatk --java-options “-Xmx4g” HaplotypeCaller -R /home/adriel-rosa/STARteste/referência/Oreochromis_niloticus.O_niloticus_UMD_NMBU.dna.toplevel.fa -I /home/adriel-rosa/STARteste/Alinhamento/T1R2_6H/out/BAM/T1R2_6H.out.bam -O /home/adriel-rosa/STARteste/Gatk/T1R2_6H_out.g.vcf.gz -ERC GVCF
Using GATK jar /home/adriel-rosa/gatk-4.1.4.1/gatk-package-4.1.4.1-local.jar
Running:
java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=2 “-Xmx4g” -jar /home/adriel-rosa/gatk-4.1.4.1/gatk-package-4.1.4.1-local.jar HaplotypeCaller -R /home/adriel-rosa/STARteste/referência/Oreochromis_niloticus.O_niloticus_UMD_NMBU.dna.toplevel.fa -I /home/adriel-rosa/STARteste/Alinhamento/T1R2_6H/out/BAM/T1R2_6H.out.bam -O /home/adriel-rosa/STARteste/Gatk/T1R2_6H_out.g.vcf.gz -ERC GVCF
Error: Could not find or load main class “-Xmx4g”
This is a
Question
type, post, not aTool
type post. Please read the posts under the how to tag for more information.You should use
java -jar -Xmx4G /path/to/GATK.jar
Did you read the readme? It has the exact usage OP has used here, so there is no problem with their syntax.
Please stop adding answers that don't answer the top level question. If you are even mildly unsure, use Comments instead of Answers.
Yes, I have read the readme file... Also noticed that OP is starting into this kind of analysis. I'm not saying that his syntax is wrong, just gave him an alternative option to realize that he can run GATK without CD into the tool folder or include the file into his
$PATH
Sure, using the other syntax is an option, but the phrasing "you should" instead of "Another option is" sounds like this is the recommended way to do things, which is not true.