Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sulicon
    Member
    • Aug 2010
    • 41

    #1

    Questions about generating consensus sequences from the VCF file

    Hi all,

    I'm trying to get the most reliable consensus sequence from raw VCF files generated by samtools and bcftools. I tried "vcfutils.pl" coming with samtools, but I always got warning messages when running the perl script and I'm afraid the output may be not what we want since we are play with haploid data.

    1. My strategy is finding the route with highest quality score. For example, there are three possible routes from xxxxx43T to xxxxx47A in the following region:
    Code:
    #CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  ../sam2bam/GIAMTH101_sorted.bam
    chr1    147119243   .   T   .   241 .   DP=97;AF1=0;CI95=1.5,0;DP4=42,47,0,0;MQ=20;FQ=-282  PL  0
    chr1    147119244   .   T   .   242 .   DP=96;AF1=0;CI95=1.5,0;DP4=42,47,0,0;MQ=20;FQ=-282  PL  0
    chr1    147119244   .   TCC .   108 .   INDEL;DP=96;AF1=0;CI95=1.5,0;DP4=13,16,1,0;MQ=20;FQ=-105;PV4=0.47,1,1,1 PL  0
    chr1    147119245   .   C   .   242 .   DP=97;AF1=0;CI95=1.5,0;DP4=41,47,0,0;MQ=20;FQ=-282  PL  0
    chr1    147119246   .   C   .   242 .   DP=97;AF1=0;CI95=1.5,0;DP4=41,47,0,0;MQ=20;FQ=-282  PL  0
    chr1    147119246   .   C   .   108 .   INDEL;DP=97;AF1=0;CI95=1.5,0;DP4=13,16,1,0;MQ=20;FQ=-105;PV4=0.47,4.7e-07,1,1   PL  0
    chr1    147119247   .   A   .   241 .   DP=97;AF1=0;CI95=1.5,0;DP4=43,50,0,0;MQ=20;FQ=-282  PL  0
    a. 43 T -> 44 T -> 45 C -> 46 C -> 47 A , the sequence is TTCCA
    b. 43 T -> 44-46 TCC deletion -> 47 A, the sequence is TA
    c. 43 T -> 44 T -> 45 C -> 46 C deletion -> 47 A, the sequence is TTCA

    Obviously, route "a" is the most reliable one according to the overall quality score. I worked on the raw variance calls because even a variance was not that reliable, I would still take it if its quality was better than corresponding reference nucleotide(s).

    Question 1. Does this strategy sound reasonable?

    2. Sometimes the variance site comes with genotype inferred:
    Code:
    #CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  ../sam2bam/GIAMTH101_sorted.bam
    chr1    41098739    .   A   T   41.1    .   DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=20;FQ=-45  GT:PL:GQ    1/1:74,18,0:33
    but somethimes not:
    Code:
    #CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  ../sam2bam/GIAMTH101_sorted.bam
    chr1    41092204    .   G   .   239 .   DP=157;AF1=0;CI95=1.5,0;DP4=82,70,0,0;MQ=20;FQ=-282 PL  0
    chr1    41092204    .   G   .   38.5    .   INDEL;DP=157;AF1=0;CI95=1.5,0;DP4=2,4,0,1;MQ=20;FQ=-35.5;PV4=1,1,1,0.28 PL  0
    Question 2. What's the reason for the difference?

    The genotype is somewhat important in my analysis because our data come from haploid sample. Only homogeneous genotypes are expected to get. If a reliable heterogeneous genotype is called, it indicates possible contamination happened, which should be filtered for quality control purpose.

    Question 3. In this example, should I consider the quality score of the genotype to calculate the final score of this nucleotide?
    Code:
    chr1    41098739    .   A   T   41.1    .   DP=6;AF1=1;CI95=0.5,1;DP4=0,0,6,0;MQ=20;FQ=-45  GT:PL:GQ    1/1:74,18,0:33
    The quality score of the variance is 41.1, and the score of the genotype to be 1/1 is 33 when the variance is TRUE. So the final score of this nucleotide to be 'T' should be some number less than 33, right?


    3. And, if there is an insertion and it's taken as the most reliable annotation of the sequence (suppose it's true):
    Code:
    #CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  ../sam2bam/GIAMTH101_sorted.bam
    chr1    147381185   .   AGGGGG  AGGGGGG   30    .   INDEL;DP=134;AF1=0.5;CI95=0.5,0.5;DP4=39,5,7,10;MQ=20;FQ=21.5;PV4=0.00032,9.3e-06,1,1   GT:PL:GQ    1/1:56,0,80:59
    then
    Question 4. What's the score for each individual nucleotide in the inserted sequence?
    I think the overall score should be the Phred transformation of the probability that both the variance (score 30) and the genotype (score 59) are true. But I have no idea how to estimate the quality of each nucleotide when I need to generate FASTQ output of the consensus sequences. Maybe I should assume all the nucleotides are of the same quality in the alternative sequence "AGGGGGG"?

    Thanks a lot
  • nupurgupta
    Member
    • Aug 2010
    • 29

    #2
    Hi,
    Did you finally figure this out, and write a script for it?
    Thanks

    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, 10-15-2026, 10:52 AM
    0 responses
    14 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-14-2026, 05:39 AM
    0 responses
    21 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-13-2026, 09:56 AM
    0 responses
    19 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-09-2026, 11:14 AM
    0 responses
    27 views
    0 reactions
    Last Post SEQadmin2  
    Working...