Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nupurgupta
    Member
    • Aug 2010
    • 29

    #1

    vcfutils to get consensus sequence

    There have been several posts about this, but it has been a while, and my queries are not completely answered, so thought I would put it down again.

    I am trying to generate a consensus sequence from a vcf file and a reference genome. I am trying to use vcfutils, and I get an error as

    Use of uninitialized value in addition (+) at /my/bin/vcfutils.pl line 518
    ....

    I am trying to rewrite vcfutils.pl to avoid this error. The error is in the area -

    $q = $1 if ($t[7] =~ /FQ=(-?[\d\.]+)/);
    if ($q < 0) {
    $_ = ($t[7] =~ /AF1=([\d\.]+)/)? $1 : 0;
    $b = ($_ < .5 || $alt eq '.')? $ref : $alt;
    $q = -$q;
    } else {
    $b = $het{"$ref$alt"};
    $b ||= 'N';
    }
    $b = lc($b);
    $b = uc($b) if (($t[7] =~ /MQ=(\d+)/ && $1 >= $_Q) && ($t[7] =~ /DP=(\d+)/ && $1 >= $_d && $1 <= $_D));
    $q = int($q + 33 + .499);
    $q = chr($q <= 126? $q : 126);

    The current format of VCF files does not have an FQ flag, so this code fails when it is trying to parse out the FQ value. My question is - how can I calculate $q from the VCF file?

    There is great information in
    Discussion of next-gen sequencing related bioinformatics: resources, algorithms, open source efforts, etc


    which says
    "$q, which is derived from the FQ, ends up being the quality score"

    But I am still trying to figure out how to calculate this value.

    Thanks very much.
  • Balat
    Member
    • May 2010
    • 36

    #2
    I encountered the same problem with vcfutils.pl

    I ended up using the old (deprecated) pileup file to get the consensus sequence.

    samtools pileup -cf ref.fa aln.bam | samtools.pl pileup2fq -D100 > cns.fastq

    Comment

    • nupurgupta
      Member
      • Aug 2010
      • 29

      #3
      Oh dear..I think the current version of samtools doesnt even support it. Do you know which version you were using, I will get that
      Thanks very much!

      Comment

      • Balat
        Member
        • May 2010
        • 36

        #4
        samtools 1.11

        Comment

        Latest Articles

        Collapse

        • kinpict.com
          Reply to 16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
          by kinpict.com
          The part about this topic feels surprisingly grounded, and the details on the page is the bit that made me slow down. I’d keep <a href="https://kinpict.com/">ai family photo generator</a> bookmarked for later.
          Today, 06:37 PM
        • SEQadmin2
          16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
          by SEQadmin2





          NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
          10-30-2026, 06:46 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, 11-12-2026, 07:59 AM
        0 responses
        26 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 11-05-2026, 09:25 AM
        0 responses
        35 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 11-03-2026, 11:54 AM
        2 responses
        56 views
        0 reactions
        Last Post kinpict.com  
        Started by SEQadmin2, 10-28-2026, 09:57 AM
        0 responses
        175 views
        0 reactions
        Last Post SEQadmin2  
        Working...