Use when working with Variant Call Format (VCF) files and need to filter, summarize, or manipulate variant data.
vcftools/home/vimalinx/miniforge3/envs/bio/bin/vcftools/home/vimalinx/miniforge3/envs/bio/share/man/man1/vcftools.1vcftools for classic population-genetics style filtering and quick summaries.# 1) SNP-only filtered VCF
vcftools \
--gzvcf cohort.vcf.gz \
--remove-indels \
--recode --recode-INFO-all \
--out cohort.snps_only
# 2) Common-variant, low-missingness filter
vcftools \
--gzvcf cohort.vcf.gz \
--maf 0.05 \
--max-missing 0.9 \
--recode --recode-INFO-all \
--out cohort.filtered
# 3) Allele-frequency report for one chromosome
vcftools \
--gzvcf cohort.vcf.gz \
--freq \
--chr 1 \
--out chr1.freq
# 4) Site mean depth summary
vcftools \
--gzvcf cohort.vcf.gz \
--site-mean-depth \
--out cohort.depth
--vcf, --gzvcf, or --bcf.--recode and usually --recode-INFO-all.--out is omitted, files default to the out.* prefix in the current directory.--recode writes a new VCF; without it many filtering commands only emit summary files.--max-missing 1.0 keeps only sites with no missing genotypes, which is often much harsher than intended.