Question: vcf tools (vcf-stats) not able to generate stats ?
gravatar for sunnykevin97
9 weeks ago by
sunnykevin9710 wrote:

Hi vcf stats not able generate stats for a vcf file? How to sort it out? Which tool is more reliable for calculating stats ? I tried using vcftools ==> vcf-stats I tried using awk scripts in public domain, I find much difference while calculating number of SNP's and INDELS

    vcf-stats 15Mar11_R1_dedup_2_ReadGroups.bam_GATK.vcf > 15Mar11_R1_dedup_2_ReadGroups.bam_GATKvcf.txt

Multiple header blocks (^#) not allowed.

 at /usr/local/share/perl/5.22.1/ line 172, <__ANONIO__> line 180493.
        Vcf::throw(VcfStats=HASH(0x138bf40), "Multiple header blocks (^#) not allowed.\x{a}") called at /usr/local/share/perl/5.22.1/ line 489
        VcfReader::next_data_hash(VcfStats=HASH(0x138bf40)) called at /usr/local/bin/vcf-stats line 151
        main::vcf_stats(HASH(0x13801b8)) called at /usr/local/bin/vcf-stats line 12
snp sequence alignment • 167 views
ADD COMMENTlink written 9 weeks ago by sunnykevin9710

What kind of stats to you expect?

Nevertheless you should investigate the error message:

Multiple header blocks (^#) not allowed.

Run grep -n "^#" 15Mar11_R1_dedup_2_ReadGroups.bam_GATK.vcf This will give you all lines, that start with a # and add the line number at the beginning. These numbers have to be continuous. If one is missing go to this line and have a look what's there.

fin swimmer

ADD REPLYlink modified 9 weeks ago • written 9 weeks ago by finswimmer11k

Looking for SNP and INDEL count.

ADD REPLYlink written 9 weeks ago by sunnykevin9710

If you just want the total number of SNPs and INDEL, there are many ways.

But first check if there are multiple header blocks. Working with a corrupted file will always lead to problems sooner or later.

fin swimmer

ADD REPLYlink written 9 weeks ago by finswimmer11k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2089 users visited in the last hour