vcftools常用命令

vcftools是一个强大的工具,适用于处理VCF文件,尤其在1000G计划中用于统计和过滤变异位点。本文列举了如筛选特定区域、SNP、等位基因频率等基本操作的命令。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

vcftools 是处理VCF文件的工具,服务于1000G计划,用于VCF的统计、变异位点的过滤等,功能强大。废话少说,直接上命令。

# filter chr1:1000-2000 > new.vcf; 

vcftools --gzvcf input_data.vcf.gz --chr 1 --from-bp 1000 --to-bp 2000 --recode --recode-INFO-all --out out_prefix #如果没有--recode 则不输出; 文件为out_prefix.recode.vcf

# filter in specific region

vcftools --gzvcf input_data.vcf.gz --bed <bed> --recode --out <out_prefix>

# filter chr1:1000-2000, 输出人群频率,不是个体的VAF

vcftools --gzvcf input_data.vcf.gz --freq --chr 1 --from-bp 1000 --to-bp 2000 --out <out_prefix>

# filter specific snp

vcftools --gzvcf input_data.vcf.gz --snps <snp.list> --out <out_prefix> 

vcftools --gzvcf input_data.vcf.gz --snp rs001 --snp rs002 --out <out_prefix>

# filter allele freq

vcftools --gzvcf input_data.vcf.gz --min-alleles <interger> --minQ <float> --minDP <float> 

# output alleles statitstics

--freq # out_prefix.frq; 

--counts # out_prefix.frq.count

--depth # out_prefix.idepth, mean depth per individual 

--site-depth # out_prefix.ldepth, the sum of depth across all individuals per site

--site-mean-depth # out_prefix.ldepth.mean, the mean of depth accross all individuals per site

--geno-depth # extract the DP

# transition, transversion statistics

--TsTv # out_prefix.TsTv 

--TsTv-summary # out_prefix.TsTv.summary 

# extract from INFO of vcf

vcftools --vcf input_data.vcf --get-INFO NS --get-INFO DB 

# output vcf

vcftools --vcf input_data.vcf --recode-INFO DB 

# min-meanDP : overall individual ; min-DP: per specific individual; 

vcftools --vcf input_data.vcf --min-meanDP <10>  --minQ <> --minGQ <> --minDP <>

# compare of vcf

vcftools --vcf input_data_1.vcf --diff input_data_2.vcf  # out_prefix.

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值