Convert VCF to binary pedigree file
This tool takes a VCF and produces a binary pedigree as used by PLINK, consisting of three associated files (.bed/.bim/.fam).
A VCF file and a metadata file.
The metaData file can take two formats, the first of which is the first 6 lines of the standard pedigree file. This is what Plink describes as a .fam file. Note that the sex encoding convention is 1=male; 2=female; other=unknown. An example .fam file is as follows (note that there is no header):
CEUTrio NA12878 NA12891 NA12892 2 -9 CEUTrio NA12891 UNKN1 UNKN2 1 -9 CEUTrio NA12892 UNKN3 UNKN4 2 -9
where the entries are: FamilyID IndividualID DadID MomID Sex Phenotype.
An alternate format is a two-column key-value file:
NA12878 fid=CEUTrio;dad=NA12891;mom=NA12892;sex=2;phenotype=-9 NA12891 fid=CEUTrio;sex=1;phenotype=-9 NA12892 fid=CEUTrio;sex=2;phenotype=-9
where unknown parents do not need to be specified. The columns are the individual ID and a list of key-value pairs.
Regardless of which file is specified, the tool will output a .fam file alongside the pedigree file. If the command line has "-m [name].fam", the fam file will be subset and reordered to match the sample content and ordering of the VCF. However, if a metadata file of the alternate format is passed by "-m [name].txt", the tool will construct a formatted .fam file from the data.
A binary pedigree in PLINK format, composed of three files (.bed/.bim/.fam). See the PLINK format specification for more details.
java -jar GenomeAnalysisTK.jar \ -T VariantsToBinaryPed \ -R reference.fasta \ -V variants.vcf \ -m metadata.fam \ -bed output.bed \ -bim output.bim \ -fam output.fam
These Read Filters are automatically applied to the data by the Engine before processing by VariantsToBinaryPed.
This tool uses a sliding window on the reference.
All tools inherit arguments from the GATK Engine' "CommandLineGATK" argument collection, which can be used to modify various aspects of the tool's function. For example, the -L argument directs the GATK engine to restrict processing to specific genomic intervals; or the -rf argument allows you to apply certain read filters to exclude some of the data from the analysis.
This table summarizes the command-line arguments that are specific to this tool. For more details on each argument, see the list further down below the table or click on an argument name to jump directly to that entry in the list.
Argument name(s) | Default value | Summary | |
---|---|---|---|
Required Inputs | |||
--metaData -m |
NA | Sample metadata file | |
--variant -V |
NA | Input VCF file | |
Required Outputs | |||
--bed |
NA | output bed file | |
--bim |
NA | output map file | |
--fam |
NA | output fam file | |
Required Parameters | |||
--minGenotypeQuality -mgq |
0 | If genotype quality is lower than this value, output NO_CALL | |
Optional Inputs | |||
--dbsnp -D |
none | dbSNP file | |
--outputMode -mode |
INDIVIDUAL_MAJOR | The output file mode (SNP major or individual major) | |
Optional Flags | |||
--checkAlternateAlleles |
false | Checks that alternate alleles actually appear in samples, erroring out if they do not | |
--majorAlleleFirst |
false | Sets the major allele to be 'reference' for the bim file, rather than the ref allele |
Arguments in this list are specific to this tool. Keep in mind that other arguments are available that are shared with other tools (e.g. command-line GATK arguments); see Inherited arguments above.
output bed file
R PrintStream NA
output map file
R PrintStream NA
Checks that alternate alleles actually appear in samples, erroring out if they do not
boolean false
dbSNP file
This argument supports reference-ordered data (ROD) files in the following formats: BCF2, VCF, VCF3
RodBinding[VariantContext] none
output fam file
R PrintStream NA
Sets the major allele to be 'reference' for the bim file, rather than the ref allele
boolean false
Sample metadata file
R File NA
If genotype quality is lower than this value, output NO_CALL
R int 0 [ [ -∞ ∞ ] ]
The output file mode (SNP major or individual major)
The --outputMode argument is an enumerated type (OutputMode), which can have one of the following values:
OutputMode INDIVIDUAL_MAJOR
Input VCF file
Variants from this VCF file are used by this tool as input.
The file must at least contain the standard VCF header lines, but
can be empty (i.e., no variants are contained in the file).
This argument supports reference-ordered data (ROD) files in the following formats: BCF2, VCF, VCF3
R RodBinding[VariantContext] NA