ApplyBQSR won't recognise output argument
1
0
Entering edit mode
3.0 years ago
aglh201 • 0

I'm trying to recalibrate some bams using the following:

gatk --java-options "-Xmx8g" ApplyBQSR    
    -I $insampleID.sorted.dups.bam \
    -R $reference --bqsr-recal-file $outsampleID.table \ 
    -O $outsampleID.recal.bam

Every time I try, I get the following error:

A USER ERROR has occurred: Argument output was missing: Argument 'output' is required.

The following, within the same script, was used to successfully produce the table I needed for the above, and its output is the same as the non-functional output above, except with a different extension.

 gatk --java-options "-Xmx8g" BaseRecalibrator \
-I $insampleID.sorted.dups.bam \
-R $reference --known-sites $recal \
-O $outsampleID.table

(I know that in the ApplyBQSR block, the first line is missing a \ - if I try to include it, I instead get an error saying my argument, ' ' was invalid....)

Can anyone help me out? I've reformatted it a hundred times, tried making an empty output bam in the destination folder, and I know others have used the script I'm running successfully in the past.

ApplyBQSR bqsr gatk • 1.4k views
ADD COMMENT
0
Entering edit mode

Change -O to -o

ADD REPLY
0
Entering edit mode

Same error sadly

ADD REPLY
1
Entering edit mode
3.0 years ago
vdauwera ★ 1.2k

You have to figure out what's going on with your missing backslash, otherwise the tool's never going to see any of the arguments you give it later on. You might have an invisible character, or maybe an extra space snuck in after the backslash. The tool's probably just complaining about the output being missing because it's the first one it looks for when it tries to parse your command, so digging into that is most likely to be a wild goose chase.

In fact, try writing the full command on a single line first, to eliminate any weird effects like that, so you can verify that all the arguments are getting parsed correctly. Then once that works you can try to structure it on multiple lines. (It can also help to fill in the actual file names etc just in case there's an issue with one of your variables being unexpectedly empty, if you haven't tried that yet)

ADD COMMENT
0
Entering edit mode

Thank you! I actually tried this yesterday but must have had an extra character still hiding somewhere. Someone also gave me the same suggestion elsewhere so I decided to give it a second go, and it looks like it's working.

ADD REPLY

Login before adding your answer.

Traffic: 2742 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6