This is a test version of Biostars. For the public version, visit https://www.biostars.org.
vcf tools (vcf-stats) not able to generate stats ?

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

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

Looking for SNP and INDEL count.

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

0 answers

No answers yet.

Log in to answer this question.