Genome Analysis Toolkit

Variant Discovery in High-Throughput Sequencing Data

GATK process banner

Need Help?

Search our documentation

Community Forum

Hi, How can we help?

Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools with a primary focus on variant discovery and genotyping. Its powerful processing engine and high-performance computing features make it capable of taking on projects of any size. Learn more

ApplyBQSR no positional argument is defined for this tool

0

5 comments

  • Avatar
    Genevieve Brandt (she/her)

    Hi Jose Aragon, check out this post from another user who saw this same error message and see if it can help you solve the issue: https://gatk.broadinstitute.org/hc/en-us/community/posts/360076948391--No-positional-argument-is-defined-Error-in-HaplotypeCaller

    It is most likely caused by a typo in your command line.

    0
    Comment actions Permalink
  • Avatar
    Jose Aragon

    Thank you for your response. Yes, I checked this post. It is not solving my problem. My code has no spaces in the tags:
    Bad tag:
    - R

    Good tag:
    -R

    Could it be that it is from a different tool? In this case my problem is with ApplyBQSR and not with HaplotypeCaller.

    0
    Comment actions Permalink
  • Avatar
    Genevieve Brandt (she/her)

    Hi Jose Aragon, this would not be different between GATK tools. I think you still have a typo because of the error message: 

    A USER ERROR has occurred: Illegal argument value: Positional arguments were provided ',–R{GRCh38.dna.primary_assembly/GRCh38.dna.primary_assembly.fa{–I{Sample.SplitNCigarReads.bam{–bqsr{Sample.before.recal_data.table{–O{Sample.recal.bam}' but no positional argument is defined for this tool.

    It looks like there is no space between the R and {GRCh38... which will cause issues in running the command.

    Best,

    Genevieve

    0
    Comment actions Permalink
  • Avatar
    Jose Aragon

    I checked for any typo and I cannot see anything that can be related to spaces or other type of typos.

    I tried another computer and here is the command line:

    gatk ApplyBQSR \
    --java-options "-Xmx48G" \
    –R GRCh38/Homo_sapiens.GRCh38.dna.primary_assembly.fa \
    –I sample1.SplitNCigarReads.bam \
    –bqsr sample1.recal_data.table \
    –O EL53.1.RecalReads.bam

     

    And here is the error message when I use -DGATK_STACKTRACE_ON_USER_EXCEPTION=true

    gatk ApplyBQSR \
    --java-options "-Xmx48G -DGATK_STACKTRACE_ON_USER_EXCEPTION=true" \
    –R GRCh38/Homo_sapiens.GRCh38.dna.primary_assembly.fa \
    –I sample1.SplitNCigarReads.bam \
    –bqsr sample1.recal_data.table \
    –O EL53.1.RecalReads.bam

     

     

    ***********************************************************************
     
    A USER ERROR has occurred: Illegal argument value: Positional arguments were provided ',–R{GRCh38/Homo_sapiens.GRCh38.dna.primary_assembly.fa{–I{sample1.SplitNCigarReads.bam{–bqsr{sample1.recal_data.table{–O{EL53.1.RecalReads.bam}' but no positional argument is defined for this tool.
     
    ***********************************************************************
    org.broadinstitute.barclay.argparser.CommandLineException$BadArgumentValue: Illegal argument value: Positional arguments were provided ',–R{GRCh38/Homo_sapiens.GRCh38.dna.primary_assembly.fa{–I{sample1.SplitNCigarReads.bam{–bqsr{sample1.recal_data.table{–O{EL53.1.RecalReads.bam}' but no positional argument is defined for this tool.
    at org.broadinstitute.barclay.argparser.CommandLineArgumentParser.propagateParsedValues(CommandLineArgumentParser.java:507)
    at org.broadinstitute.barclay.argparser.CommandLineArgumentParser.parseArguments(CommandLineArgumentParser.java:170)
    at org.broadinstitute.hellbender.cmdline.CommandLineProgram.parseArgs(CommandLineProgram.java:233)
    at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:207)
    at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:160)
    at org.broadinstitute.hellbender.Main.mainEntry(Main.java:203)
    at org.broadinstitute.hellbender.Main.main(Main.java:289)
    0
    Comment actions Permalink
  • Avatar
    Genevieve Brandt (she/her)

    Hi Jose Aragon, thank you for checking that!

    I think I found the source of the issue, the --java-options should be listed before the GATK command ApplyBQSR.

    There is more information here: https://gatk.broadinstitute.org/hc/en-us/articles/360035531892-GATK4-command-line-syntax

    I hope this solves it!

    Genevieve

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk