Question: Error while running gatk
0
gravatar for ashaneev07
6 months ago by
ashaneev070
ashaneev070 wrote:

Hiii Can anyone please help me to find a solution for this...I got the following error while running gatk for variant filtering.

home@home-Lenovo-H30-50:~/Documents/Tools_NGS/gatk-4.0.6.0$ ./gatk VariantFiltration \ -R /home/Documents/Tools_NGS/VariantCall/MaSuRCA_hybrid_assembly.fa \  -V /media/veena/TOSHIBAEXT/Variant_Calling/Untitled Folder/snps_300bp.vcf.gz

Using GATK jar /home/Documents/Tools_NGS/gatk-4.0.6.0/gatk-package-4.0.6.0-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 -jar /home/Documents/Tools_NGS/gatk-4.0.6.0/gatk-package-4.0.6.0-local.jar VariantFiltration -R /home/Documents/Tools_NGS/VariantCall/MaSuRCA_hybrid_assembly.fa -V /media/TOSHIBAEXT/Variant_Calling/Untitled Folder/snps_300bp.vcf.gz USAGE: VariantFiltration [arguments]

Filter variant calls based on INFO and/or FORMAT annotations. Version:4.0.6.0

Required Arguments:

--output,-O:String File to which variants should be written Required.

--variant,-V:String A VCF file containing variants Required.

Optional Arguments:

--add-output-sam-program-record,-add-output-sam-program-record:Boolean If true, adds a PG tag to created SAM/BAM/CRAM files. Default value: true. Possible values: {true, false}

--add-output-vcf-command-line,-add-output-vcf-command-line:Boolean If true, adds a command line header line to created VCF files. Default value: true. Possible values: {true, false}

--arguments_file:File read one or more arguments files and add them to the command line This argument may be specified 0 or more times. Default value: null.

--cloud-index-prefetch-buffer,-CIPB:Integer Size of the cloud-only prefetch buffer (in MB; 0 to disable). Defaults to cloudPrefetchBuffer if unset. Default value: -1.

--cloud-prefetch-buffer,-CPB:Integer Size of the cloud-only prefetch buffer (in MB; 0 to disable). Default value: 40.

--cluster-size,-cluster:Integer The number of SNPs which make up a cluster. Must be at least 2 Default value: --create-output-bam-md5,-OBM:Boolean If true, create a MD5 digest for any BAM/SAM/CRAM file created Default value: false. Possible values: {true, false}

--create-output-variant-index,-OVI:Boolean If true, create a VCF index when writing a coordinate-sorted VCF file. Default value: true. Possible values: {true, false}

--create-output-variant-md5,-OVM:Boolean If true, create a a MD5 digest any VCF file created. Default value: false. Possible values: {true, false}

--disable-bam-index-caching,-DBIC:Boolean If true, don't cache bam indexes, this will reduce memory requirements but may harm performance if many intervals are specified. Caching is automatically disabled if there are no intervals specified. Default value: false. Possible values: {true, false}

--disable-read-filter,-DF:String Read filters to be disabled before analysis This argument may be specified 0 or more times. Default value: null. Possible Values: {WellformedReadFilter}

--disable-sequence-dictionary-validation,-disable-sequence-dictionary-validation:Boolean If specified, do not check the sequence dictionaries from our inputs for compatibility. Use at your own risk! Default value: false. Possible values: {true, false}

--exclude-intervals,-XL:StringOne or more genomic intervals to exclude from processing This argument may be specified 0 or more times. Default value: null.

--filter-expression,-filter:String One or more expression used with INFO fields to filter This argument may be specified 0 or more times. Default value: null.

--filter-name:String Names to use for the list of filters This argument may be specified 0 or more times. Default value: null.

--filter-not-in-mask:Boolean Filter records NOT in given input mask. Default value: false. Possible values: {true, false}

--gatk-config-file:String A configuration file to use with the GATK. Default value: null.

--gcs-max-retries,-gcs-retries:Integer If the GCS bucket channel errors out, how many times it will attempt to re-initiate the connection Default value: 20.

--genotype-filter-expression,-G-filter:String One or more expression used with FORMAT (sample/genotype-level) fields to filter (see documentation guide for more info) This argument may be specified 0 or more times. Default value: null.

--genotype-filter-name,-G-filter-name:String Names to use for the list of sample/genotype filters (must be a 1-to-1 mapping); this name is put in the FILTER field for variants that get filtered This argument may be specified 0 or more times. Default value: null.

--help,-h:Boolean display the help message Default value: false. Possible values: {true, false}

--input,-I:String BAM/SAM/CRAM file containing reads This argument may be specified 0 or more times. Default value: null.

--interval-exclusion-padding,-ixp:Integer Amount of padding (in bp) to add to each interval you are excluding. Default value: 0.

--interval-merging-rule,-imr:IntervalMergingRule Interval merging rule for abutting intervals Default value: ALL. Possible values: {ALL, OVERLAPPING_ONLY}

--invalidate-previous-filters:Boolean Remove previous filters applied to the VCF Default value: false. Possible values: {true, false}

--invert-filter-expression,-invfilter:Boolean Invert the selection criteria for --filterExpression Default value: false. Possible values: {true, false}

--invert-genotype-filter-expression,-invG-filter:Boolean Invert the selection criteria for --genotypeFilterExpression Default value: false. Possible values: {true, false}

--lenient,-LE:Boolean Lenient processing of VCF files Default value: false. Possible values: {true, false}

--mask,-mask:FeatureInput Input mask Default value: null.

--mask-extension:Integer How many bases beyond records from a provided 'mask' should variants be filtered Default value: 0.

--read-filter,-RF:String Read filters to be applied before analysis This argument may be specified 0 or more times. Default value: null. Possible Values: {AlignmentAgreesWithHeaderReadFilter, AllowAllReadsReadFilter, AmbiguousBaseReadFilter, CigarContainsNoNOperator, FirstOfPairReadFilter, FragmentLengthReadFilter, GoodCigarReadFilter, HasReadGroupReadFilter, LibraryReadFilter, MappedReadFilter, MappingQualityAvailableReadFilter, MappingQualityNotZeroReadFilter, MappingQualityReadFilter, MatchingBasesAndQualsReadFilter, MateDifferentStrandReadFilter, MateOnSameContigOrNoMappedMateReadFilter, MetricsReadFilter, NonZeroFragmentLengthReadFilter, NonZeroReferenceLengthAlignmentReadFilter, NotDuplicateReadFilter, NotOpticalDuplicateReadFilter, NotSecondaryAlignmentReadFilter, NotSupplementaryAlignmentReadFilter, OverclippedReadFilter, PairedReadFilter, PassesVendorQualityCheckReadFilter, PlatformReadFilter, PlatformUnitReadFilter, PrimaryLineReadFilter, ProperlyPairedReadFilter, ReadGroupBlackListReadFilter, ReadGroupReadFilter, ReadLengthEqualsCigarLengthReadFilter, ReadLengthReadFilter, ReadNameReadFilter, ReadStrandFilter, SampleReadFilter, SecondOfPairReadFilter, SeqIsStoredReadFilter, ValidAlignmentEndReadFilter, ValidAlignmentStartReadFilter, WellformedReadFilter}

--read-index,-read-index:String Indices to use for the read inputs. If specified, an index must be provided for every read input and in the same order as the read inputs. If this argument is not specified, the path to the index for each input will be inferred automatically. This argument may be specified 0 or more times. Default value: null.

--read-validation-stringency,-VS:ValidationStringency Validation stringency for all SAM/BAM/CRAM/SRA files read by this program. The default stringency value SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded. Default value: SILENT. Possible values: {STRICT, LENIENT, SILENT}

--reference,-R:String Reference sequence Default value: null.

--seconds-between-progress-updates,-seconds-between-progress-updates:Double Output traversal statistics every time this many seconds elapse Default value: 10.0.

--sequence-dictionary,-sequence-dictionary:String Use the given sequence dictionary as the master/canonical sequence dictionary. Must be a .dict file. Default value: null.

--set-filtered-genotype-to-no-call:Boolean Set filtered genotypes to no-call Default value: false. Possible values: {true, false}

--sites-only-vcf-output:Boolean If true, don't emit genotype fields when writing vcf file output. Default value: false. Possible values: {true, false}

--verbosity,-verbosity:LogLevel Control verbosity of logging. Default value: INFO. Possible values: {ERROR, WARNING, INFO, DEBUG}

--version:Boolean display the version number for this tool Default value: false. Possible values: {true, false}

Advanced Arguments:

--disable-tool-default-read-filters,-disable-tool-default-read-filters:Boolean Disable all tool default read filters (WARNING: many tools will not function correctly without their default read filters on) Default value: false. Possible values: {true, false}

--showHidden,-showHidden:Boolean display hidden arguments Default value: false. Possible values: {true, false}

Conditional Arguments for read-filter:

Valid only if "AmbiguousBaseReadFilter" is specified: --ambig-filter-bases:Integer Threshold number of ambiguous bases. If null, uses threshold fraction; otherwise, overrides threshold fraction. Default value: null. Cannot be used in conjuction with argument(s) maxAmbiguousBaseFraction

Valid only if "MappingQualityReadFilter" is specified: --maximum-mapping-quality:Integer Maximum mapping quality to keep (inclusive) Default value: null.

--minimum-mapping-quality:Integer Minimum mapping quality to keep (inclusive) Default value: 10.

Valid only if "PlatformUnitReadFilter" is specified: --black-listed-lanes:String Platform unit (PU) to filter out This argument must be specified at least once. Required.

Valid only if "ReadGroupBlackListReadFilter" is specified: --read-group-black-list:StringThe name of the read group to filter out This argument must be specified at least once. Required.

Valid only if "ReadGroupReadFilter" is specified: --keep-read-group:String The name of the read group to keep Required.

Valid only if "ReadLengthReadFilter" is specified: --max-read-length:Integer Keep only reads with length at most equal to the specified value Required.

--min-read-length:Integer Keep only reads with length at least equal to the specified value Default value: 1.

Valid only if "ReadNameReadFilter" is specified: --read-name:String Keep only reads with this read name Required.

Valid only if "ReadStrandFilter" is specified: --keep-reverse-strand-only:Boolean Keep only reads on the reverse strand Required. Possible values: {true, false}

Valid only if "SampleReadFilter" is specified: --sample,-sample:String The name of the sample(s) to keep, filtering out all others This argument must be specified at least once. Required.


A USER ERROR has occurred: Invalid argument ' -R'.


Set the system property GATK_STACKTRACE_ON_USER_EXCEPTION (--java-options '-DGATK_STACKTRACE_ON_USER_EXCEPTION=true') to print the stack trace. home@home-Lenovo-H30-50:~/Documents/Tools_NGS/gatk-4.0.6.0$ \ -O snp_output.vcf.gz \ --filter-expression "AB < 0.2 || MQ0 > 50" \

--filter-name "my_filters"

snp alignment next-gen sequence • 482 views
ADD COMMENTlink modified 6 months ago by h.mon24k • written 6 months ago by ashaneev070
1

Have you read this in the message?

A USER ERROR has occurred: Invalid argument ' -R'.

fin swimmer

ADD REPLYlink written 6 months ago by finswimmer11k
1

Seems to be an acceptable option in the docs

java -jar GenomeAnalysisTK.jar \

-T VariantFiltration \

-R reference.fasta \

-o output.vcf \

--variant input.vcf \

--filterExpression "AB < 0.2 || MQ0 > 50" \

--filterName "SomeFilterName"

ADD REPLYlink modified 6 months ago • written 6 months ago by Bastien Hervé3.7k
1

Hello <uname>,

Please use the formatting bar (especially the code option) to present your post better. I've done it for you this time.
code_formatting

In your case the number of allowed chars is exceeded if you trying to do this. For long code or messages it would be better to create a gist on github and just copy and paste the link to it here.

Thank you!

ADD REPLYlink written 6 months ago by finswimmer11k

Thanks for your kind response..

ADD REPLYlink written 5 months ago by ashaneev070

Please could you format your post (command lines) ? It's quite unreadable for now

ADD REPLYlink written 6 months ago by Bastien Hervé3.7k

Hii Thanks for the reply. I've pasted the command below.

./gatk VariantFiltration \ -R /home/Documents/Tools_NGS/VariantCall/genome_assembly.fa \  -V /media/TOSHIBAEXT/Variant_Calling/Untitled Folder/snps_300bp.vcf.gz  \ -O snp_output.vcf.gz \  --filter-expression "AB < 0.2 || MQ0 > 50" \--filter-name "my_filters"
ADD REPLYlink modified 5 months ago by finswimmer11k • written 5 months ago by ashaneev070
1
gravatar for Bastien Hervé
6 months ago by
Bastien Hervé3.7k
Limoges, CBRS, France
Bastien Hervé3.7k wrote:

You forgot the -T VariantFiltration option in your command line

Plus, seems weird how you called GATK like ./gatk. You have to call a jar package like java -jar GenomeAnalysisTK.jar

home@home-Lenovo-H30-50:~/Documents/Tools_NGS/gatk-4.0.6.0$ java -jar GenomeAnalysisTK.jar -T VariantFiltration -R /home/Documents/Tools_NGS/VariantCall/MaSuRCA_hybrid_assembly.fa -V /media/veena/TOSHIBAEXT/Variant_Calling/Untitled Folder/snps_300bp.vcf.gz

ADD COMMENTlink modified 5 months ago • written 6 months ago by Bastien Hervé3.7k

Thanks for the reply. But, i don't have a GenomeAnalysisTK.jar file in my gatk directory(gatk-4.0.6.0).

ADD REPLYlink modified 5 months ago • written 5 months ago by ashaneev070

How did you install GATK ?

ADD REPLYlink written 5 months ago by Bastien Hervé3.7k

By using gatk user guide.Here is the link.https://software.broadinstitute.org/gatk/documentation/quickstart.php

ADD REPLYlink written 5 months ago by ashaneev070

Oh ok, they switch the method to call gatk in GATK4, thanks

ADD REPLYlink written 5 months ago by Bastien Hervé3.7k

Seems like my answer is obsolete now, correct syntax is

gatk [--java-options "-Xmx4G"] ToolName [GATK args]

But GATK team did not switch complete tool docs to GATK4 yet, see

You can try to install GATK3 to look for a bug

ADD REPLYlink modified 5 months ago • written 5 months ago by Bastien Hervé3.7k
1
gravatar for Devon Ryan
6 months ago by
Devon Ryan88k
Freiburg, Germany
Devon Ryan88k wrote:

You need an -O argument. Also, ditch all of the \ line escapes, since they're confusing your shell and making it think you specified ' -R' rather than '-R'.

ADD COMMENTlink written 6 months ago by Devon Ryan88k

Thanks for your suggestion. I've tried with as you mensioned.But it shows the same error message.Here i've pasted my command.

 ./gatk VariantFiltration  -R /home/Documents/Tools_NGS/VariantCall/genome_assembly.fa   -V /media/TOSHIBAEXT/Variant_Calling/Untitled Folder/snps_300bp.vcf.gz  -O snp_output.vcf.gz  --filter-expression "AB < 0.2 || MQ0 > 50" --filter-name "my_filters"
ADD REPLYlink modified 5 months ago by finswimmer11k • written 5 months ago by ashaneev070

If you're still getting the complaints about -R then try removing that option and see what happens. That could well be a GATK bug.

ADD REPLYlink written 5 months ago by Devon Ryan88k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1106 users visited in the last hour