Package picard.vcf.MendelianViolations

# Class FindMendelianViolations

java.lang.Object
picard.cmdline.CommandLineProgram
picard.vcf.MendelianViolations.FindMendelianViolations

@DocumentedFeature public class FindMendelianViolations extends CommandLineProgram

### Summary

Finds mendelian violations (MVs) of all types within a VCF.

### Detail

Takes in VCF or BCF and a pedigree file and looks for high confidence calls where the genotype of the offspring is incompatible with the genotypes of the parents.
Key features:

1. Checks for regular MVs in diploid regions and invalid transmissions in haploid regions (using the declared gender of the offspring in the pedigree file to determine how to deal with the male and female chromosomes.)
2. Outputs metrics about the different kinds of MVs found
3. Can output a per-trio VCF with violations; INFO field will indicate the type of violation in the MV field

### Example

         java -jar picard.jar FindMendelianViolations\\
              I=input.vcf \\
              TRIO=pedigree.fam \\
              O=report.mendelian_violation_metrics \\
              MIN_DP=20

### Caveates

#### Assumptions

The tool assumes the existence of FORMAT fields AD, DP, GT, GQ, and PL.

#### Ignored Variants

This tool ignores variants that are:

- Not SNPs
- Filtered
- Multiallelic (i.e., trio has more than 2 alleles)
- Within the `SKIP_CHROMS` contigs

#### PseudoAutosomal Region

This tool assumes that variants in the PAR will be mapped onto the female chromosome, and will treat variants in that region as as autosomal. The mapping to female requires that the PAR in the male chromosome be masked so that the aligner maps reads to single contig. This is normally done for the public releases of the human reference. The tool has default values for PAR that are sensible for humans on either build b37 or hg38.

## Field Summary

Fields
Modifier and Type
Field
Description
`Set<String>`
`FEMALE_CHROMS`
`File`
`INPUT`
`Set<String>`
`MALE_CHROMS`
`int`
`MIN_DP`
`int`
`MIN_GQ`
`double`
`MIN_HET_FRACTION`
`File`
`OUTPUT`
`Set<String>`
`PSEUDO_AUTOSOMAL_REGIONS`
`Set<String>`
`SKIP_CHROMS`
`boolean`
`TAB_MODE`
`int`
`THREAD_COUNT`
`File`
`TRIOS`
`File`
`VCF_DIR`

### Fields inherited from class picard.cmdline.CommandLineProgram

`COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, MAX_ALLOWABLE_ONE_LINE_SUMMARY_LENGTH, MAX_RECORDS_IN_RAM, QUIET, REFERENCE_SEQUENCE, referenceSequence, specialArgumentsCollection, SYNTAX_TRANSITION_URL, TMP_DIR, USE_JDK_DEFLATER, USE_JDK_INFLATER, VALIDATION_STRINGENCY, VERBOSITY`

## Constructor Summary

Constructors
Constructor
Description
`FindMendelianViolations()`

## Method Summary

Modifier and Type
Method
Description
`protected String[]`
`customCommandLineValidation()`
Validates that the sex chromosomes don't overlap and parses the pseudo-autosomal regions into usable objects to ensure their parsability
`protected int`
`doWork()`
Do the work after command line has been parsed.

### Methods inherited from class picard.cmdline.CommandLineProgram

`checkRInstallation, getCommandLine, getCommandLineParser, getCommandLineParserForArgs, getDefaultHeaders, getFaqLink, getMetricsFile, getPGRecord, getStandardUsagePreamble, getStandardUsagePreamble, getVersion, hasWebDocumentation, instanceMain, instanceMainWithExit, makeReferenceArgumentCollection, parseArgs, requiresReference, setDefaultHeaders, useLegacyParser`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### INPUT

@Argument(shortName="I", doc="Input VCF or BCF with genotypes.") public File INPUT

### TRIOS

@Argument(shortName="PED", doc="File of Trio information in PED format (with no genotype columns).") public File TRIOS

### OUTPUT

@Argument(shortName="O", doc="Output metrics file.") public File OUTPUT

### MIN_GQ

@Argument(shortName="GQ", doc="Minimum genotyping quality (or non-ref likelihood) to perform tests.") public int MIN_GQ

### MIN_DP

@Argument(shortName="DP", doc="Minimum depth in each sample to consider possible mendelian violations.") public int MIN_DP

### MIN_HET_FRACTION

@Argument(shortName="MINHET", doc="Minimum allele balance at sites that are heterozygous in the offspring.") public double MIN_HET_FRACTION

### VCF_DIR

@Argument(optional=true, doc="If provided, output per-family VCFs of mendelian violations into this directory.") public File VCF_DIR

### SKIP_CHROMS

@Argument(doc="List of chromosome names to skip entirely.") public Set<String> SKIP_CHROMS

### MALE_CHROMS

@Argument(doc="List of possible names for male sex chromosome(s)") public Set<String> MALE_CHROMS

### FEMALE_CHROMS

@Argument(doc="List of possible names for female sex chromosome(s)") public Set<String> FEMALE_CHROMS

### PSEUDO_AUTOSOMAL_REGIONS

@Argument(doc="List of chr:start-end for pseudo-autosomal regions on the female sex chromosome. Defaults to HG19/b37 & HG38 coordinates.", shortName="PAR") public Set<String> PSEUDO_AUTOSOMAL_REGIONS

### THREAD_COUNT

@Argument(doc="The number of threads that will be used to collect the metrics. ") public int THREAD_COUNT

### TAB_MODE

@Argument(doc="If true then fields need to be delimited by a single tab. If false the delimiter is one or more whitespace characters. Note that tab mode does not strictly follow the PED spec") public boolean TAB_MODE

## Constructor Details

### FindMendelianViolations

public FindMendelianViolations()

## Method Details

### customCommandLineValidation

protected String[] customCommandLineValidation()
Validates that the sex chromosomes don't overlap and parses the pseudo-autosomal regions into usable objects to ensure their parsability

Overrides:
  `customCommandLineValidation` in class `CommandLineProgram`
Returns:
  null if command line is valid. If command line is invalid, returns an array of error message to be written to the appropriate place.

### doWork

protected int doWork()
Description copied from class: `CommandLineProgram`
Do the work after command line has been parsed. RuntimeException may be thrown by this method, and are reported appropriately.

Specified by:
  `doWork` in class `CommandLineProgram`
Returns:
  program exit status.