RealignerTargetCreater: A USER ERROR has occurred: '-T' is not a valid command.

Hi,
I was running GATK RealignerTargetCreater . I ran the same command before with another bam file and it ran fine. Both of the bam files were produced using BWA MEM, sorted, indexed, fixed mate information (samtools) and then duplicate removed by PICARD.

My command is as follows:
java -jar GenomeAnalysisTK.jar \
-T RealignerTargetCreator \
-R reference.fasta \
-I input.bam \
--known indels.vcf \
-o forIndelRealigner.intervals

In the end, the error were occured:


A USER ERROR has occurred: '-T' is not a valid command.


Set the system property GATK_STACKTRACE_ON_USER_EXCEPTION (--java-options '-DGATK_STACKTRACE_ON_USER_EXCEPTION=true') to print the stack trace.

It would be most helpful if someone can tell me how to solve this problem. Many thanks in advance.
Regards

Best Answers

  • SheilaSheila Broad InstituteMember, Broadie, Moderator
    Accepted Answer

    @erya
    Hi,

    Have you resolved this? It looks like your command may have some extra space between GenomeAnalysisTK.jar and -T RealignerTargetCreator. Are you using the \ ? Perhaps try removing those.

    -Sheila

  • eryaerya Member
    Accepted Answer

    This is the whole commend I have used:
    java -jar -Djava.io.tmpdir=./tmp/ /home/wang/Documents/gatk-4.0.1.0/gatk-package-4.0.1.0-local.jar -T RealignerTargetCreator -R /mnt/hgfs/D/analysis/populus/LG1.fasta -I bwa_aln.sorted.dedup.bam -O bwa_sorted_dedup.bam.interals

Answers

  • SheilaSheila Broad InstituteMember, Broadie, Moderator
    Accepted Answer

    @erya
    Hi,

    Have you resolved this? It looks like your command may have some extra space between GenomeAnalysisTK.jar and -T RealignerTargetCreator. Are you using the \ ? Perhaps try removing those.

    -Sheila

  • eryaerya Member

    There is the whole commend I have used:
    java -jar -Djava.io.tmpdir=./tmp/ /home/wang/Documents/gatk-4.0.1.0/gatk-package-4.0.1.0-local.jar -T RealignerTargetCreator -R /mnt/hgfs/D/analysis/populus/LG1.fasta -I bwa_aln.sorted.dedup.bam -o bwa_sorted_dedup.bam.interals

  • eryaerya Member
    Accepted Answer

    This is the whole commend I have used:
    java -jar -Djava.io.tmpdir=./tmp/ /home/wang/Documents/gatk-4.0.1.0/gatk-package-4.0.1.0-local.jar -T RealignerTargetCreator -R /mnt/hgfs/D/analysis/populus/LG1.fasta -I bwa_aln.sorted.dedup.bam -O bwa_sorted_dedup.bam.interals

  • eryaerya Member

    Hi, SkyWarrior, thanks for your answer. So which command should I use?

  • eryaerya Member

    Hi,
    Shelina and SkyWarrior,

    When I use other tools, just like HaplotypeCaller, there really present similar error.
    The command is:
    java -jar /home/wang/Documents/gatk-4.0.2.1/gatk-package-4.0.2.1-local.jar -R /mnt/hgfs/D/analysis/populus/Populus.fasta -T HaplotypeCaller -I bwa_aln.sorted.dedup.bam --emitRefConfidence GVCF [--dbsnp dbSNPvcf] [-L targets.interval_list] -o bwa_output.raw.snps.indels.g.vcf

    So, I think the problem is others, rather than the tool or my command. One of it probability: how to deal the problem of stack trace, as it present:
    Set the system property GATK_STACKTRACE_ON_USER_EXCEPTION (--java-options '-DGATK_STACKTRACE_ON_USER_EXCEPTION=true') to print the stack trace.

    In addition, the GATK version is 4.0.

  • SkyWarriorSkyWarrior TurkeyMember

    You need to run GATK4 using the gatk script in the same folder where you extract your jar files. Calling the jar file directly is not supported.

    -T is not present in gatk script anymore. Use

    gatk HaplotypeCaller ....
    directly.

Sign In or Register to comment.