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

        • SEQadmin2
          Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
          by SEQadmin2



          Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

          Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
          ...
          10-14-2026, 09:55 AM
        • SEQadmin2
          New Genomics Technologies Take Aim at Long-Standing Limits
          by SEQadmin2


          Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

          We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
          ...
          09-28-2026, 10:25 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, Yesterday, 11:13 AM
        0 responses
        19 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, Yesterday, 10:48 AM
        0 responses
        18 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-15-2026, 10:52 AM
        0 responses
        36 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-14-2026, 05:39 AM
        0 responses
        42 views
        0 reactions
        Last Post SEQadmin2  
        Working...