@DocumentedFeature public final class ValidateVariants extends VariantWalker
This tool is designed to validate the adherence of a file to VCF format. The tool will validate .g.vcf GVCF format files as well. For VCF specifications, see https://samtools.github.io/hts-specs/. Besides standard adherence to the VCF specification, this tool performs additional strict validations to ensure that the information contained within the file is correctly encoded. These include:
By default the tool applies all the strict validations unless you indicate which one should be excluded using `--validation-type-to-exclude`. You can exclude as many types as you want. Furthermore, you can exclude all strict validations with the special code `ALL`. In this case the tool will only test for adherence to the VCF specification.
A VCF file to validate.
gatk ValidateVariants \ -R ref.fasta \ -V input.vcf \ --dbsnp dbsnp.vcf
gatk ValidateVariants -R ref.fasta \ -V input.vcf \ --validation-type-to-exclude ALL
gatk ValidateVariants \ -R ref.fasta \ -V input.vcf \ --validation-type-to-exclude ALLELES \ --dbsnp dbsnp.vcf
Modifier and Type | Class and Description |
---|---|
static class |
ValidateVariants.ValidationType |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DO_NOT_VALIDATE_FILTERED_RECORDS |
static java.lang.String |
GVCF_VALIDATE |
drivingVariantFile
FEATURE_CACHE_LOOKAHEAD
addOutputSAMProgramRecord, addOutputVCFCommandLine, cloudIndexPrefetchBuffer, cloudPrefetchBuffer, createOutputBamIndex, createOutputBamMD5, createOutputVariantIndex, createOutputVariantMD5, disableBamIndexCaching, intervalArgumentCollection, lenientVCFProcessing, outputSitesOnlyVCFs, progressMeter, readArguments, referenceArguments, SECONDS_BETWEEN_PROGRESS_UPDATES_NAME
GATK_CONFIG_FILE, NIO_MAX_REOPENS, QUIET, specialArgumentsCollection, TMP_DIR, useJdkDeflater, useJdkInflater, VERBOSITY
Constructor and Description |
---|
ValidateVariants() |
Modifier and Type | Method and Description |
---|---|
void |
apply(htsjdk.variant.variantcontext.VariantContext vc,
ReadsContext readsContext,
ReferenceContext ref,
FeatureContext featureContext)
Process an individual variant.
|
void |
onTraversalStart()
Operations performed just prior to the start of traversal.
|
java.lang.Object |
onTraversalSuccess()
Operations performed immediately after a successful traversal (ie when no uncaught exceptions were thrown during the traversal).
|
getDrivingVariantsFeatureInput, getHeaderForVariants, getSequenceDictionaryForDrivingVariants, getSpliteratorForDrivingVariants, initializeDrivingVariants, onShutdown, onStartup
getBestAvailableSequenceDictionary, getProgressMeterRecordLabel, makeVariantFilter, requiresFeatures, traverse
addFeatureInputsAfterInitialization, closeTool, createSAMWriter, createSAMWriter, createVCFWriter, doWork, getDefaultCloudIndexPrefetchBufferSize, getDefaultCloudPrefetchBufferSize, getDefaultReadFilters, getDefaultToolVCFHeaderLines, getDefaultVariantAnnotationGroups, getDefaultVariantAnnotations, getHeaderForFeatures, getHeaderForReads, getHeaderForSAMWriter, getMasterSequenceDictionary, getPluginDescriptors, getReferenceDictionary, getSequenceDictionaryValidationArgumentCollection, getToolkitShortName, getToolName, getTransformedReadStream, hasFeatures, hasIntervals, hasReads, hasReference, makePostReadFilterTransformer, makePreReadFilterTransformer, makeReadFilter, makeVariantAnnotations, requiresIntervals, requiresReads, requiresReference, useVariantAnnotations
customCommandLineValidation, getCommandLine, getCommandLineParser, getDefaultHeaders, getMetricsFile, getSupportInformation, getToolkitName, getToolStatusWarning, getUsage, getVersion, instanceMain, instanceMainPostParseArgs, isBetaFeature, isExperimentalFeature, parseArgs, printLibraryVersions, printSettings, printStartupMessage, runTool, setDefaultHeaders, warnOnToolStatus
public static final java.lang.String GVCF_VALIDATE
public static final java.lang.String DO_NOT_VALIDATE_FILTERED_RECORDS
public void onTraversalStart()
GATKTool
onTraversalStart
in class GATKTool
public void apply(htsjdk.variant.variantcontext.VariantContext vc, ReadsContext readsContext, ReferenceContext ref, FeatureContext featureContext)
VariantWalkerBase
apply
in class VariantWalkerBase
vc
- Current variant being processed.readsContext
- Reads overlapping the current variant. Will be an empty, but non-null, context object
if there is no backing source of reads data (in which case all queries on it will return
an empty array/iterator)ref
- Reference bases spanning the current variant. Will be an empty, but non-null, context object
if there is no backing source of reference data (in which case all queries on it will return
an empty array/iterator). Can request extra bases of context around the current variant's interval
by invoking ReferenceContext.setWindow(int, int)
on this object before calling ReferenceContext.getBases()
featureContext
- Features spanning the current variant. Will be an empty, but non-null, context object
if there is no backing source of Feature data (in which case all queries on it will return an
empty List).public java.lang.Object onTraversalSuccess()
GATKTool
onTraversalSuccess
in class GATKTool