vcf tools (vcf-stats) not able to generate stats ?
0
0
Entering edit mode
5.9 years ago
sunnykevin97 ▴ 990

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/Vcf.pm 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/Vcf.pm 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
alignment sequence SNP • 2.0k views
ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

Looking for SNP and INDEL count.

ADD REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 1909 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6