Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hansdd
    Junior Member
    • May 2011
    • 6

    #1

    samtools Option to get genotype likelihood (GL)

    I would like samtools mpileup to generate genotype likelihoods or what is described in the VCF FORMAT as GL. I can get PL which is fine (I know how to convert it to probabilities), but vcftools requires GL to generate the likelihood input files for Beagle.

    Which option in samtools/bcftools generates the GL info per animal and genotype? Apologies if this should be obvious...

    Cheers,

    Hans


    Here is the command I am using now:
    samtools-0.1.18

    samtools mpileup -r Chr29:46186560-48558888 -P ILLUMINA -guf all_UMD3.fa $files | bcftools view -bcvg - > var.test.bcf

    bcftools view var.test.bcf > var.test.vcf
  • Heisman
    Senior Member
    • Dec 2010
    • 534

    #2
    These work for me:

    /samtools-0.1.18/samtools mpileup -l <intervals_to_call_variant_on> -AB -ugf <reference_sequence.fa> <aligned_file> | /samtools-0.1.18/bcftools/bcftools view -bvcg -> <intermediate_file>


    /samtools-0.1.18/bcftools/bcftools view <intermediate_file> | /samtools-0.1.18/bcftools/vcfutils.pl varFilter -D99999 > <output> &

    Comment

    • hansdd
      Junior Member
      • May 2011
      • 6

      #3
      Thank you for the response. I tried the suggested commands but samtools still doesn't list the GL field.

      Is it a discontinued option?

      Comment

      • Heisman
        Senior Member
        • Dec 2010
        • 534

        #4
        Sorry, I get the PL output, not the GL (PL is the phred scaled versions of GL, I think). I will play around with this and report back...

        Edit: Yeah, I can't figure it out. Maybe email the author about this?
        Last edited by Heisman; 10-27-2011, 04:05 PM.

        Comment

        • cjp
          Member
          • Jun 2011
          • 58

          #5
          I think this is about right:

          PL ~ int(-GL * 10)

          So:

          GL ~ -PL/10

          As PL is given as an integer, you'll lose some precision to GL, but both samtools and GATK seem to give PL now.

          Chris

          Comment

          • cjp
            Member
            • Jun 2011
            • 58

            #6
            Also: vcf2gen_v1.1.pl will calculate genotype probs from GL and PL - the script is here:



            Chris

            Comment

            • Heisman
              Senior Member
              • Dec 2010
              • 534

              #7
              Originally posted by cjp View Post
              Also: vcf2gen_v1.1.pl will calculate genotype probs from GL and PL - the script is here:



              Chris
              Interesting, I was under the impression that since the PL is scaled such that the lowest value is 0, it wouldn't be possible to revert back to GL without knowing the scaling factor?

              Comment

              • cjp
                Member
                • Jun 2011
                • 58

                #8
                GL can be 0.00 as well. PL=0 just means the Prob. is very high and effectively 1 (or at least heading towards 1).

                Comment

                • hansdd
                  Junior Member
                  • May 2011
                  • 6

                  #9
                  Thank you for the help.

                  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
                  27 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...