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

                  • 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
                    ...
                    Today, 10:25 AM
                  • SEQadmin2
                    How Immunogenomics Decodes Immunity’s Genetic Blueprint
                    by SEQadmin2




                    The immune system’s power comes from its genetic diversity, allowing myriad threats to be neutralized through first recognizing foreign antigens. That diversity is also what makes the immune system so difficult to study. Recent advances in sequencing technology and computational biology, however, are giving researchers new tools to understand immune responses and immune-related diseases in greater detail.

                    This convergence of genetics, immunology, and computation...
                    09-01-2026, 05:41 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by SEQadmin2, 09-25-2026, 09:06 AM
                  0 responses
                  27 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 09-23-2026, 11:05 AM
                  0 responses
                  24 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 09-18-2026, 11:37 AM
                  1 response
                  45 views
                  0 reactions
                  Last Post pekgio
                  by pekgio
                   
                  Started by SEQadmin2, 09-16-2026, 10:23 AM
                  1 response
                  55 views
                  0 reactions
                  Last Post pekgio
                  by pekgio
                   
                  Working...