This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in GATK BaseRecalibrator arguments

I tried to recalibrate the bases of my complete genome assembly, but it gave the following error:

 invalid argument `I`

I used this command:

 -gatk BaseRecalibrator \
 -I my_reads.bam \
 -R reference.fasta \
 --known-sites sites_of_variation.vcf \
 --known-sites outro / opcional / setOfSitesToMask.vcf \
 -O recal_data.table

I wrote:

gatk BaseRecalibrator \I- /home/ims.santos06/bam/SRR062634.bam -- home/ims.santos06/bam/Hg38knownindels.vcf -R \home/ims.santos06/reference/hg38.fa   -O  /home/ims.santos06/bam/SRR062634recal_data.table
assembly gatk

I see two command , what did you wrote in the end ?

what is that \I- ?

what was the error message ?

This message appeared:

First pass of the Base Quality Score Recalibration (BQSR) -- Generates recalibration table based on various
    user-specified covariates (such as read group, reported quality score, machine cycle, and nucleotide context).
    Version:4.1.2.0
    Required Arguments:

    --input,-I:String             BAM/SAM/CRAM file containing reads  This argument must be specified at least once.
                                  Required. 

    --known-sites:FeatureInput    One or more databases of known polymorphic sites used to exclude regions around known
                                  polymorphisms from analysis.  This argument must be specified at least once. Required. 

    --output,-O:File              The output recalibration table file to create  Required. 

    --reference,-R:String         Reference sequence file  Required. 

    A USER ERROR has occurred: Invalid argument 'I-'

From what I understand I should add the covariates to the input, but I don't know how.

Could you post the exact command you used. FYI you should use -I and not I-

I used this command:

gatk BaseRecalibrator -I /home/ims.santos06/bam/SRR062634.bam -R /home/ims.santos06/reference/hg38.fa  --known-sites /home/ims.santos06/bam/Hg38knownindels.vcf -O  /home/ims.santos06/bam/SRR062634recal_data.table

This message Appeared:

A USER ERROR has occurred: Input /home/ims.santos06/bam/Hg38knownindels.vcf must support random access to enable queries by interval. If it's a file, please index it using the bundled tool IndexFeatureFile

manubiomed20 : Please use ADD COMMENT/ADD REPLY when responding to existing posts to keep threads logically organized. SUBMIT ANSWER is only for new answers to the original question.

1 answer

thanks. You must index vcf and then use the command below:
gatk IndexFeatureFile.

gatk is running recalibration. I believe now it worked

Log in to answer this question.