基因数据处理26之bcftools安装和使用

1.下载:

https://github.com/samtools/bcftools

2.安装
make
make install

3.结合samtools使用
对排序好的bam数据用samtools生成bcf文件:

xubo@xubo:~/xubo/data/testTools/se$ samtools mpileup -ugf ../hs38DH.fa hs2.sort.bam  >hs2.bcf

由于生成的是二进制格式的数据,需要进行解析或者转换成vcf:

xubo@xubo:~/xubo/data/testTools/se$ bcftools view hs2.bcf >hs2.vcf

vcf查看:

##INFO=<ID=MQ0F,Number=1,Type=Float,Description="Fraction of MQ0 reads (smaller is better)">
##INFO=<ID=I16,Number=16,Type=Float,Description="Auxiliary tag used for calling, see description of bcf_callret1_t in bam2bcf.h">
##INFO=<ID=QS,Number=R,Type=Float,Description="Auxiliary tag used for calling">
##FORMAT=<ID=PL,Number=G,Type=Integer,Description="List of Phred-scaled genotype likelihoods">
##bcftools_viewVersion=1.3.1-15-g7c7c7a2+htslib-1.3.1-35-g481752c
##bcftools_viewCommand=view hs2.bcf
#CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT  hs2.sort.bam
chrUn_KN707963v1_decoy  15790   .       T       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,0,0,0,0;QS=1,0;MQ0F=0   PL      0,3,17
chrUn_KN707963v1_decoy  15791   .       G       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,1,1,0,0;QS=1,0;MQ0F=0   PL      0,3,17
chrUn_KN707963v1_decoy  15792   .       A       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,2,4,0,0;QS=1,0;MQ0F=0   PL      0,3,17
chrUn_KN707963v1_decoy  15793   .       T       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,3,9,0,0;QS=1,0;MQ0F=0   PL      0,3,17
chrUn_KN707963v1_decoy  15794   .       T       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,4,16,0,0;QS=1,0;MQ0F=0  PL      0,3,17
chrUn_KN707963v1_decoy  15795   .       C       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,5,25,0,0;QS=1,0;MQ0F=0  PL      0,3,17
chrUn_KN707963v1_decoy  15796   .       C       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,6,36,0,0;QS=1,0;MQ0F=0  PL      0,3,17
chrUn_KN707963v1_decoy  15797   .       A       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,7,49,0,0;QS=1,0;MQ0F=0  PL      0,3,17
chrUn_KN707963v1_decoy  15798   .       T       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,8,64,0,0;QS=1,0;MQ0F=0  PL      0,3,17
chrUn_KN707963v1_decoy  15799   .       T       A,<*>   0       .       DP=1;I16=0,0,1,0,0,0,17,289,0,0,37,1369,0,0,9,81;QS=0,1,0;SGB=-0.379885;MQ0F=0  PL      17,3,0,17,3,17
chrUn_KN707963v1_decoy  15800   .       C       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,10,100,0,0;QS=1,0;MQ0F=0        PL      0,3,17
chrUn_KN707963v1_decoy  15801   .       C       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,11,121,0,0;QS=1,0;MQ0F=0        PL      0,3,17
chrUn_KN707963v1_decoy  15802   .       A       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,12,144,0,0;QS=1,0;MQ0F=0        PL      0,3,17
chrUn_KN707963v1_decoy  15803   .       T       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,13,169,0,0;QS=1,0;MQ0F=0        PL      0,3,17
chrUn_KN707963v1_decoy  15804   .       T       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,14,196,0,0;QS=1,0;MQ0F=0        PL      0,3,17
chrUn_KN707963v1_decoy  15805   .       C       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,15,225,0,0;QS=1,0;MQ0F=0        PL      0,3,17
chrUn_KN707963v1_decoy  15806   .       C       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,16,256,0,0;QS=1,0;MQ0F=0        PL      0,3,17
chrUn_KN707963v1_decoy  15807   .       C       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,17,289,0,0;QS=1,0;MQ0F=0        PL      0,3,17
chrUn_KN707963v1_decoy  15808   .       G       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,18,324,0,0;QS=1,0;MQ0F=0        PL      0,3,17
chrUn_KN707963v1_decoy  15809   .       T       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,19,361,0,0;QS=1,0;MQ0F=0        PL      0,3,17
chrUn_KN707963v1_decoy  15810   .       C       <*>     0       .       DP=1;I16=1,0,0,0,17,289,0,0,37,1369,0,0,20,400,0,0;QS=1,0;MQ0F=0        PL      0,3,17

vcftools还不知道干嘛的

已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页