vcftools(man)

πŸ“¦
version 0.1.17 Β· 4 versions
, in epel 10, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

🌸 NAME 🌸

okay so vcftools v0.1.17 β€” Utilities for the variant call format (VCF) and binary variant call format (BCF) πŸ’…βœ¨


✨ SYNOPSIS ✨

vcftools [ --vcf FILE | --gzvcf FILE | --bcf FILE] [ --out OUTPUT PREFIX
] [ FILTERING OPTIONS ]  [ OUTPUT OPTIONS ]

πŸ’– DESCRIPTION πŸ’–

bestie. vcftools is a whole suite of functions for working with genetic variation data, specifically stuff in VCF and BCF files. πŸ§¬πŸ¦‹

The tools it gives you are mainly for: summarizing data, running calculations on data, filtering data out, and converting data into other useful file formats. that's the whole vibe. it's giving swiss army knife but make it genomics. πŸ‘‘


πŸŽ€ EXAMPLES πŸŽ€

not me about to hand you the receipts πŸ“βœ¨ here's what it actually looks like in the wild:

Output allele frequency for all sites in the input vcf file from chromosome 1

vcftools --gzvcf input_file.vcf.gz --freq --chr 1 --out chr1_analysis

Output a new vcf file from the input vcf file that removes any indel sites

vcftools --vcf input_file.vcf --remove-indels --recode --recode-INFO-all --out SNPs_only

Output file comparing the sites in two vcf files

vcftools --gzvcf input_file1.vcf.gz --gzdiff input_file2.vcf.gz --diff-site --out in1_v_in2

Output a new vcf file to standard out without any sites that have a filter tag, then compress it with gzip

vcftools --gzvcf input_file.vcf.gz --remove-filtered-all --recode --stdout | gzip -c > output_PASS_only.vcf.gz

Output a Hardy-Weinberg p-value for every site in the bcf file that does not have any missing genotypes

vcftools --bcf input_file.bcf --hardy --max-missing 1.0 --out output_noMissing

Output nucleotide diversity at a list of positions

zcat input_file.vcf.gz | vcftools --vcf - --site-pi --positions SNP_list.txt --out nucleotide_diversity

πŸ¦‹ BASIC OPTIONS πŸ¦‹

these are the ones that tell vcftools what to read and where to put it. the ✨ foundational ✨ stuff. main character energy, honestly. 🫢

πŸ“ INPUT FILE OPTIONS πŸ“

  • --vcf <input_filename> β€” this is how you tell it which VCF file to process. vcftools expects files in VCF format v4.0, v4.1 or v4.2. the last two (v4.1 and v4.2) are supported with some small limitations β€” so like, they work, just not flawlessly, iykyk. and okay this part is cute: if you hand it a dash character '-' as the file name, the program expects the VCF file to be piped in through standard in. πŸ’«
  • --gzvcf <input_filename> β€” use this instead of --vcf when you wanna read compressed (gzipped) VCF files directly. no unzipping first, she handles it. πŸŽ€
  • --bcf <input_filename> β€” same deal, but this one replaces --vcf to read BCF2 files directly. and ngl you do not need to specify whether the file is compressed with BGZF encoding β€” it just knows. 😌 and yep, same dash rule: if the file name is a dash character '-', it expects a BCF2 file piped in through standard in.

🧚 OUTPUT FILE OPTIONS 🧚

  • --out <output_prefix> β€” this sets the output filename prefix for every file vcftools generates. so say <prefix> is set to output_filename, then all your output files are gonna look like output_filename.***. and if you just… don't include this option at all? no worries, every output file gets the prefix "out." and lands in the current working directory. slay. πŸ’…
  • --stdout
  • -c β€” these options send the vcftools output straight to standard out, so you can pipe it into another program or write it directly to whatever filename you want. heads up though: a select few output functions cannot be written to standard out. so like, vibe check first. 😭
  • --temp <temporary_directory> β€” this one lets you redirect any temporary files that vcftools creates into a directory of your choosing. keep your chaos contained, bestie. 🧺✨

🌸 SITE FILTERING OPTIONS 🌸

okay bestie, these are the lil bouncers for your sites πŸ’… they decide which sites get to come to the party and which ones get ✨ uninvited ✨ from whatever analysis the program is doing.


πŸŽ€ POSITION FILTERING πŸŽ€

  • --chr <chromosome>
  • --not-chr <chromosome> β€” these include or exclude sites whose identifiers match <chromosome>. and yes you can use them more than once to include or exclude more than one chromosome, so go off πŸ‘‘
  • --from-bp <integer>
  • --to-bp <integer> β€” these set a lower bound and an upper bound for a range of sites to process. sites with positions less than or greater than these values get yeeted out. also, plot twist: these can only be used alongside a single usage of --chr. and using one of them does not require you to use the other 🫢
  • --positions <filename>
  • --exclude-positions <filename> β€” include or exclude a set of sites based on a list of positions in a file. every line of that input file should have a (tab-separated) chromosome and position. the file can have comment lines starting with a "#", and those get ignored, no cap.
  • --positions-overlap <filename>
  • --exclude-positions-overlap <filename> β€” include or exclude a set of sites based on the reference allele overlapping with a list of positions in a file. each line of the input file should contain a (tab-separated) chromosome and position. comment lines starting with a "#" get ignored here too πŸ’–
  • --bed <filename>
  • --exclude-bed <filename> β€” include or exclude a set of sites based on a BED file. only the first three columns (chrom, chromStart and chromEnd) are required. the BED file is expected to have a header line. a site gets kept or excluded if any part of any allele (REF or ALT) at that site is within the range of one of the BED entries.
  • --thin <integer> β€” thins sites so that no two sites are within the specified distance from one another. personal space, but make it genomics πŸ¦‹
  • --mask <filename>
  • --invert-mask <filename>
  • --mask-min <integer> β€” these specify a FASTA-like mask file to filter with. the mask file has a sequence of integer digits (between 0 and 9) for each position on a chromosome, and those digits say whether a site at that position should be filtered or not.

an example mask file would look like:

>1
0000011111222...
>2
2222211111000...

in this example, sites in the VCF file located within the first 5 bases from the start of chromosome 1 would be kept, whereas sites at position 6 onwards would be filtered out. and sites before the 11th position on chromosome 2 would be filtered out as well πŸ‘€

the "--invert-mask" option takes the same format mask file as the "--mask" option, however it inverts the mask file before filtering with it.

and the "--mask-min" option specifies a threshold mask value between 0 and 9 to filter positions by. the default threshold is 0, meaning only sites with that value or lower will be kept. periodt.


πŸŽ€ SITE ID FILTERING πŸŽ€

  • --snp <string> β€” include SNP(s) with a matching ID (e.g. a dbSNP rsID). this command can be used multiple times to include more than one SNP, collect them all πŸ’…
  • --snps <filename>
  • --exclude <filename> β€” include or exclude a list of SNPs given in a file. the file should contain a list of SNP IDs (e.g. dbSNP rsIDs), one ID per line. no header line is expected, we keep it simple here.

πŸŽ€ VARIANT TYPE FILTERING πŸŽ€

  • --keep-only-indels
  • --remove-indels β€” include or exclude sites that contain an indel. for these options, "indel" means any variant that alters the length of the REF allele. that's the whole definition, don't come for me 😭

πŸŽ€ FILTER FLAG FILTERING πŸŽ€

  • --remove-filtered-all β€” removes all sites with a FILTER flag other than PASS. if it's not passing, it's not lasting πŸ’€
  • --keep-filtered <string>
  • --remove-filtered <string> β€” includes or excludes all sites marked with a specific FILTER flag. these can be used more than once to specify multiple FILTER flags, stack 'em up 🌈

πŸŽ€ INFO FIELD FILTERING πŸŽ€

  • --keep-INFO <string>
  • --remove-INFO <string> β€” includes or excludes all sites with a specific INFO flag. heads up bestie: these only filter on the presence of the flag, not its value. they can be used multiple times to specify multiple INFO flags πŸ’œ

πŸŽ€ ALLELE FILTERING πŸŽ€

  • --maf <float>
  • --max-maf <float> β€” include only sites with a Minor Allele Frequency greater than or equal to the "--maf" value and less than or equal to the "--max-maf" value. one of these can be used without the other, no pressure. and just so we're clear, allele frequency is defined as the number of times an allele appears over all individuals at that site, divided by the total number of non-missing alleles at that site. math ate, honestly πŸ”₯
  • --non-ref-af <float>
  • --max-non-ref-af <float>
  • --non-ref-ac <integer>
  • --max-non-ref-ac <integer>
  • --non-ref-af-any <float>
  • --max-non-ref-af-any <float>
  • --non-ref-ac-any <integer>
  • --max-non-ref-ac-any <integer> β€” include only sites with all Non-Reference (ALT) Allele Frequencies (af) or Counts (ac) within the range specified, and including the specified value. the default options require all alleles to meet the specified criteria, whereas the options appended with "any" require only one allele to meet the criteria. and the allele frequency is defined as the number of times an allele appears over all individuals at that site, divided by the total number of non-missing alleles at that site (same definition as above, we're consistent πŸ’…).
  • --mac <integer>
  • --max-mac <integer> β€” include only sites with a Minor Allele Count greater than or equal to the "--mac" value and less than or equal to the "--max-mac" value. one of these can be used without the other. allele count is simply the number of times that allele appears over all individuals at that site. simple as πŸ“
  • --min-alleles <integer>
  • --max-alleles <integer> β€” include only sites with a number of alleles greater than or equal to the "--min-alleles" value and less than or equal to the "--max-alleles" value. one of these can be used without the other. for example, to include only bi-allelic sites, you could use:
vcftools --vcf file1.vcf --min-alleles 2 --max-alleles 2

πŸŽ€ GENOTYPE VALUE FILTERING πŸŽ€

  • --min-meanDP <float>
  • --max-meanDP <float> β€” includes only sites with mean depth values (over all included individuals) greater than or equal to the "--min-meanDP" value and less than or equal to the "--max-meanDP" value. one of these can be used without the other. these options require that the "DP" FORMAT tag is included for each site, so no DP tag means no vibe check 🫠
  • --hwe <float> β€” assesses sites for Hardy-Weinberg Equilibrium using an exact test, as defined by Wigginton, Cutler and Abecasis (2005). sites with a p-value below the threshold defined by this option are taken to be out of HWE, and therefore excluded. bye bestie πŸ‘‹
  • --max-missing <float> β€” exclude sites based on the proportion of missing data (defined to be between 0 and 1, where 0 allows sites that are completely missing and 1 indicates no missing data allowed).
  • --max-missing-count <integer> β€” exclude sites with more than this number of missing genotypes over all individuals.
  • --phased β€” excludes all sites that contain unphased genotypes. we only do phase here 😌

πŸŽ€ MISCELLANEOUS FILTERING πŸŽ€

  • --minQ <float> β€” includes only sites with a Quality value above this threshold. quality over quantity, literally ✨

πŸ‘‘ INDIVIDUAL FILTERING OPTIONS πŸ‘‘

these options include or exclude certain individuals from any analysis the program is doing. yes, we're filtering the girlies now πŸ’…

  • --indv <string>
  • --remove-indv <string> β€” specify an individual to be kept or removed from the analysis. this option can be used multiple times to specify multiple individuals. if both options are specified, then the "--indv" option is executed before the "--remove-indv option". order matters, bestie 🫢
  • --keep <filename>
  • --remove <filename> β€” provide files containing a list of individuals to either include or exclude in subsequent analysis. each individual ID (as defined in the VCF headerline) should be on a separate line. if both options are used, then the "--keep" option is executed before the "--remove" option. when multiple files are provided, the union of individuals from all keep files subtracted by the union of individuals from all remove files are kept. no header line is expected 🌸
  • --max-indv <integer> β€” randomly thins individuals so that only the specified number are retained. random but make it purposeful πŸ¦‹

πŸ’€ GENOTYPE FILTERING OPTIONS πŸ’€

these options exclude genotypes from any analysis being performed by the program. and if excluded, these values will be treated as missing. so it's giving "you're not gone, you're just... unobserved" 😭

  • --remove-filtered-geno-all β€” excludes all genotypes with a FILTER flag not equal to "." (a missing value) or PASS.
  • --remove-filtered-geno <string> β€” excludes genotypes with a specific FILTER flag.
  • --minGQ <float> β€” exclude all genotypes with a quality below the threshold specified. this option requires that the "GQ" FORMAT tag is specified for all sites, so don't forget it πŸ’–
  • --minDP <float>
  • --maxDP <float> β€” includes only genotypes greater than or equal to the "--minDP" value and less than or equal to the "--maxDP" value. this option requires that the "DP" FORMAT tag is specified for all sites.

✨ OUTPUT OPTIONS ✨

these options specify which analyses or conversions to perform on the data that made it through all the filters. survivor's run πŸƒβ€β™€οΈ

πŸŽ€ OUTPUT ALLELE STATISTICS πŸŽ€

  • --freq
  • --freq2 β€” outputs the allele frequency for each site in a file with the suffix ".frq". the second option is used to suppress output of any information about the alleles.
  • --counts
  • --counts2 β€” outputs the raw allele counts for each site in a file with the suffix ".frq.count". the second option is used to suppress output of any information about the alleles.
  • --derived β€” for use with the previous four frequency and count options only. re-orders the output file columns so that the ancestral allele appears first. this option relies on the ancestral allele being specified in the VCF file using the AA tag in the INFO field.

πŸŽ€ OUTPUT DEPTH STATISTICS πŸŽ€

  • --depth β€” generates a file containing the mean depth per individual. this file has the suffix ".idepth".
  • --site-depth β€” generates a file containing the depth per site summed across all individuals. this output file has the suffix ".ldepth".
  • --site-mean-depth β€” generates a file containing the mean depth per site averaged across all individuals. this output file has the suffix ".ldepth.mean".
  • --geno-depth β€” bestie this one spills out a file with the depth of every single genotype in your VCF. Heads up: it can get HUGE 😭. Any missing entries get a value of -1. File suffix is .gdepth.

✨ OUTPUT LD STATISTICS ✨

  • --hap-r2 β€” drops a file with the r2, D, and D' stats, calculated off phased haplotypes. These are the classic, traditional LD measures that pop-gen papers are absolutely obsessed with. Output suffix is .hap.ld. ⚠️ This one assumes your VCF input actually has phased haplotypes, so don't come for me if it's unphased.
  • --geno-r2 β€” crunches the squared correlation coefficient between genotypes, where genotypes are coded as 0, 1, and 2 to represent how many non-reference alleles each individual is carrying. It's literally the same LD measure PLINK reports. The D and D' stats are only available for phased genotypes (so, not here). Output suffix is .geno.ld. πŸ’…
  • --geno-chisq β€” got sites with more than two alleles? (iconic, multiallelic behavior ✨) Then use this to test for genotype independence via the chi-squared statistic. Output suffix is .geno.chisq.
  • --hap-r2-positions positions list file / --geno-r2-positions positions list file β€” outputs a file reporting the r2 statistics of the sites in the file you provided versus all the other sites. Suffixes are .list.hap.ld or .list.geno.ld, depending on which of the two you reached for.
  • --ld-window integer β€” optional, and it sets the maximum number of SNPs between the SNPs being tested for LD in the --hap-r2, --geno-r2, and --geno-chisq functions.
  • --ld-window-bp integer β€” optional, sets the maximum number of physical bases between the SNPs being tested for LD in --hap-r2, --geno-r2, and --geno-chisq.
  • --ld-window-min integer β€” optional, sets the minimum number of SNPs between the SNPs being tested for LD in --hap-r2, --geno-r2, and --geno-chisq.
  • --ld-window-bp-min integer β€” optional, sets the minimum number of physical bases between the SNPs being tested for LD in --hap-r2, --geno-r2, and --geno-chisq.
  • --min-r2 float β€” optional, sets a floor for r2. Anything below it just does not get reported by --hap-r2, --geno-r2, or --geno-chisq. Lowkey a vibe filter for your LD results. 🧚
  • --interchrom-hap-r2 / --interchrom-geno-r2 β€” outputs a file reporting the r2 statistics for sites on different chromosomes. Suffixes are .interchrom.hap.ld or .interchrom.geno.ld, depending on which option you used.

✨ OUTPUT TRANSITION/TRANSVERSION STATISTICS ✨

  • --TsTv integer β€” calculates the Transition / Transversion ratio in bins whose size you define with this option. Only uses bi-allelic SNPs. Output suffix is .TsTv.
  • --TsTv-summary β€” a simple little summary of all Transitions and Transversions. Output suffix is .TsTv.summary. πŸŽ€
  • --TsTv-by-count β€” calculates the Transition / Transversion ratio as a function of alternative allele count. Only bi-allelic SNPs. Output suffix is .TsTv.count.
  • --TsTv-by-qual β€” calculates the Transition / Transversion ratio as a function of SNP quality threshold. Only bi-allelic SNPs. Output suffix is .TsTv.qual.
  • --FILTER-summary β€” generates a summary of the number of SNPs and the Ts/Tv ratio for each FILTER category. Output suffix is .FILTER.summary.

✨ OUTPUT NUCLEOTIDE DIVERGENCE STATISTICS ✨

  • --site-pi β€” measures nucleotide divergency on a per-site basis. Output suffix is .sites.pi.
  • --window-pi integer / --window-pi-step integer β€” measures nucleotide diversity in windows, where the number you pass is the window size. Output suffix is .windowed.pi. The --window-pi-step one is optional and lets you specify the step size in between windows.
πŸ’– Note, bestie: vcftools can use a mask (defined with the --mask parameter) to define which sites have been well characterized for estimating nucleotide diversity. Using a mask to define the well-characterized part of the genome is recommended when you're estimating nucleotide diversity, because (for example) genetic variants may be poorly characterized in low-coverage or poorly sequenced regions of the genome. Trust. 🫢

✨ OUTPUT FST STATISTICS ✨

  • --weir-fst-pop filename β€” this one calculates an Fst estimate from Weir and Cockerham's 1984 paper, which is the preferred calculation of Fst. The file you hand it must contain a list of individuals (one individual per line) from the VCF that correspond to one population. You can use this option multiple times to calculate Fst for more than two populations. Those files also get included as --keep options. By default, calculations happen on a per-site basis. Output suffix is .weir.fst. πŸ‘‘
  • --fst-window-size integer / --fst-window-step integer β€” use these alongside --weir-fst-pop to do the Fst calculations on a windowed basis instead of per-site. They specify the window size you want and the step size you want between windows.

✨ OUTPUT OTHER STATISTICS ✨

  • --het β€” calculates a measure of heterozygosity on a per-individual basis. Specifically, the inbreeding coefficient, F, is estimated for each individual using a method of moments. Resulting file suffix is .het.
  • --hardy β€” reports a p-value for each site from a Hardy-Weinberg Equilibrium test (as defined by Wigginton, Cutler and Abecasis (2005)). The resulting file (suffix .hwe) also contains the Observed numbers of Homozygotes and Heterozygotes plus the corresponding Expected numbers under HWE. ✨
  • --TajimaD integer β€” outputs Tajima's D statistic in bins of the size you specify. Output suffix is .Tajima.D.
  • --indv-freq-burden β€” calculates the number of variants within each individual of a specific frequency. Resulting file suffix is .ifreqburden.
  • --LROH β€” identifies and outputs Long Runs of Homozygosity. Output suffix is .LROH.
⚠️ Heads up: this function is experimental, and it will eat a lot of memory if you throw a large dataset at it. πŸ’€
  • --relatedness β€” calculates and outputs a relatedness statistic based on the method of Yang et al, Nature Genetics 2010 (doi:10.1038/ng.608). Specifically, it calculates the unadjusted Ajk statistic. The expectation of Ajk is zero for individuals within a population, and one for an individual with themselves. Output suffix is .relatedness.
  • --relatedness2 β€” calculates and outputs a relatedness statistic based on the method of Manichaikul et al., BIOINFORMATICS 2010 (doi:10.1093/bioinformatics/btq559). Output suffix is .relatedness2.
  • --site-quality β€” generates a file with the per-site SNP quality, straight from the QUAL column of the VCF. Suffix is .lqual.
  • --missing-indv β€” reports missingness on a per-individual basis. Suffix is .imiss.
  • --missing-site β€” reports missingness on a per-site basis. Suffix is .lmiss.
  • --SNPdensity integer β€” calculates the number and density of SNPs in bins of the size you define. Output suffix is .snpden.
  • --kept-sites β€” makes a file listing all the sites that got kept after filtering. Suffix is .kept.sites.
  • --removed-sites β€” makes a file listing all the sites that got removed after filtering. Suffix is .removed.sites.
  • --singletons β€” generates a file detailing where singletons are and which individual they occur in. It reports both true singletons and private doubletons (i.e. SNPs where the minor allele only occurs in a single individual and that individual is homozygotic for that allele). Output suffix is .singletons. πŸ¦‹
  • --hist-indel-len β€” generates a histogram file of the length of all indels (including SNPs). It shows both the count and the percentage of all indels, for indel lengths that occur at least once in the input file. SNPs are considered indels with length zero. Output suffix is .indel.hist.
  • --hapcount BED file β€” outputs the number of unique haplotypes within user-specified bins, as defined by the BED file. Output suffix is .hapcount.
  • --mendel PED file β€” reports mendel errors identified in trios. This command requires a PLINK-style PED file, where the first four columns specify a family ID, the child ID, the father ID, and the mother ID. Output suffix is .mendel.
  • --extract-FORMAT-info string β€” extracts info from the genotype fields in the VCF relating to a specified FORMAT identifier. The resulting output file has the suffix .<FORMAT_ID>.FORMAT. For example, this command would extract all of the GT (i.e. Genotype) entries:
vcftools --vcf file1.vcf --extract-FORMAT-info GT
  • --get-INFO string β€” extracts information from the INFO field in the VCF file. The string argument specifies the INFO tag to be extracted, and you can use this option multiple times to pull out multiple INFO entries. The resulting file, with suffix .INFO, contains the requested INFO information in a tab-separated table. For example, to extract the NS and DB flags, you'd run:
vcftools --vcf file1.vcf --get-INFO NS --get-INFO DB

πŸŽ€ OUTPUT VCF FORMAT πŸŽ€

okay bestie, these ones are all about spitting out a whole new file πŸ’–

  • --recode, --recode-bcf β€” these generate a new file in either VCF or BCF from the input VCF or BCF, after all the filtering you asked for gets applied. The output file has the suffix .recode.vcf or .recode.bcf. By default the INFO fields are removed from the output file, because those INFO values may be invalidated by the recoding (like, the total depth might need recalculating if individuals got removed, iykyk). You can override that with the options below. And btw, by default BCF files are written out as BGZF compressed files. 🫢
  • --recode-INFO <string>, --recode-INFO-all β€” these go with the recode options above to define an INFO key name to keep in the output file. --recode-INFO can be used multiple times to keep more of the INFO fields. --recode-INFO-all keeps all INFO values from the original file. slay.
  • --contigs <string> β€” use this with --recode-bcf when your input file has no contig declarations. It expects a file name with one contig header per line, and those lines get included in the output file. πŸ’…

🌈 OUTPUT OTHER FORMATS 🌈

not everything is VCF, bestie β€” here's the whole buffet ✨

  • --012 β€” outputs the genotypes as a big ol' matrix. Three files show up. The first, with suffix .012, contains the genotypes of each individual on a separate line. Genotypes are represented as 0, 1 and 2, where the number represents that number of non-reference alleles. Missing genotypes are represented by -1. The second file, with suffix .012.indv, details the individuals included in the main file. The third file, with suffix .012.pos, details the site locations included in the main file. obsessed.
  • --IMPUTE β€” outputs phased haplotypes in IMPUTE reference-panel format. Since IMPUTE requires phased data, using this option also implies --phased. Unphased individuals and genotypes are therefore excluded. Only bi-allelic sites are included in the output. This generates three files: the IMPUTE haplotype file has the suffix .impute.hap, and the IMPUTE legend file has the suffix .impute.hap.legend. The third file, with suffix .impute.hap.indv, details the individuals included in the haplotype file β€” though IMPUTE doesn't actually need that one. 😌
  • --ldhat, --ldhelmet, --ldhat-geno β€” these output data in LDhat/LDhelmet format. This requires the --chr filter option to also be used. The two first options output phased data only, so they also imply --phased, which means unphased individuals and genotypes get excluded. For LDhelmet, only snps will be considered, so it implies --remove-indels. --ldhat-geno treats all of the data as unphased and therefore outputs LDhat files in genotype/unphased format. Two output files are generated with the suffixes .ldhat.sites and .ldhat.locs, which correspond to the LDhat "sites" and "locs" input files respectively; for LDhelmet, the two files generated have the suffixes .ldhelmet.snps and .ldhelmet.pos, which correspond to the "SNPs" and "positions" files. so many files, so little time πŸ’€
  • --BEAGLE-GL, --BEAGLE-PL β€” these output genotype likelihood information for input into the BEAGLE program. Your VCF file needs to contain FORMAT fields with GL or PL tags, which can generally be output by SNP callers such as the GATK. Using this requires a chromosome to be specified via the --chr option. The resulting output file has the suffix .BEAGLE.GL or .BEAGLE.PL and contains genotype likelihoods for biallelic sites. This file is suitable for input into BEAGLE via the like= argument. πŸ”₯
  • --plink, --plink-tped, --chrom-map β€” these output the genotype data in PLINK PED format. With --plink, two files are generated, with suffixes .ped and .map. Note that only bi-allelic loci will be output. Further details of these files can be found in the PLINK documentation. > ⚠️ Note: --plink can be very slow on large datasets β€” using the --chr option to divide up the dataset is advised, or alternatively use --plink-tped, which outputs the files in the PLINK transposed format with suffixes .tped and .tfam. For usage with variant sites in species other than humans, --chrom-map may be used to specify a file name that has a tab-delimited mapping of chromosome name to a desired integer value with one line per chromosome. This file must contain a mapping for every chromosome value found in the file. no cap.

πŸ’… COMPARISON OPTIONS πŸ’…

these are for when you wanna compare your original variant file to another variant file and see what's tea β˜•. All of the diff functions require both files to contain the same chromosomes and that the files be sorted in the same order. If one of the files contains chromosomes that the other file does not, use the --not-chr filter to remove them from the analysis. periodt.

πŸ¦‹ DIFF VCF FILE πŸ¦‹

  • --diff <filename>, --gzdiff <filename>, --diff-bcf <filename> β€” these compare the original input file to the specified VCF, gzipped VCF, or BCF file. You must specify one of these together with one additional option described below, to say what type of comparison is being performed. See the examples section for typical usage. πŸ‘‘

πŸ“ DIFF OPTIONS πŸ“

  • --diff-site β€” outputs the sites that are common / unique to each file. The output file has the suffix .diff.sites_in_files.
  • --diff-indv β€” outputs the individuals that are common / unique to each file. The output file has the suffix .diff.indv_in_files.
  • --diff-site-discordance β€” calculates discordance on a site by site basis. The resulting output file has the suffix .diff.sites.
  • --diff-indv-discordance β€” calculates discordance on a per-individual basis. The resulting output file has the suffix .diff.indv.
  • --diff-indv-map <filename> β€” lets you specify a mapping of individual IDs in the second file to those in the first file. The program expects the file to contain a tab-delimited line containing an individual's name in file one followed by that same individual's name in file two, with one mapping per line.
  • --diff-discordance-matrix β€” calculates a discordance matrix. This one only works with bi-allelic loci with matching alleles that are present in both files. The resulting output file has the suffix .diff.discordance.matrix.
  • --diff-switch-error β€” calculates phasing errors (specifically "switch errors"). This creates an output file describing switch errors found between sites, with suffix .diff.switch.

πŸ‘‘ AUTHORS πŸ‘‘

  • Adam Auton
  • Anthony Marcketta

and that's a wrap on the whole page, bestie πŸŽ€ the footer says page 1 of vcftools(man) β€” that's the source/version β€” dated whenever your copy was built ✨ go forth and filter, you absolute icon πŸ‘‘πŸ’–

πŸ“¦ where this page comes from