Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Brian.R
    Junior Member
    • Mar 2014
    • 5

    #1

    Compensating for multi-mapper count in mpileup?

    I use mpileup files to call variants for subsections in the genome at a time with a set of custom python/awk scripts. This works well for unique mapping reads, but if I have reads that map to the genome more than once, this information gets lost during mpileup generation.

    I have written some scripts to count the 'mappability' of a given read, as my mapper of choice, bowtie, does not report this in the NH or IH tags, but am struggling a bit incorporating this 'correction factor' in to mpileups.

    From what I can make out in the manuals samtools might not be able to do so. Am I missing something, or is there perhaps a different pileup-like format I could use to extract 'normalised'-coverage and variants?
  • Brian Bushnell
    Super Moderator
    • Jan 2014
    • 2709

    #2
    Depending on your goal, you could simply place multi-mapping reads at a random location, which would accomplish the normalization you are looking for.

    Comment

    • Brian.R
      Junior Member
      • Mar 2014
      • 5

      #3
      Well, essentially, if a read maps to 2 loci, and I'm generating a pileup for one of these, I want the bases of this read to only count half towards the total coverage in the pileup.

      Does that make sense?

      I'm working with miRNAs, so mapping results to multiple identical loci, need to be accounted for in some way (ie dividing by the number of identical loci).

      Comment

      • Brian Bushnell
        Super Moderator
        • Jan 2014
        • 2709

        #4
        Right... that's what random assignment does, on average. A multi-mapping read is only printed as a single line in the sam file, choosing one of the possible mapping locations at random. Many aligners support this as an output option (I think bowtie does).

        Comment

        • Brian.R
          Junior Member
          • Mar 2014
          • 5

          #5
          I see what your saying. I was working with those settings beforehand, but discussions with colleagues made me rather uncertain if the bowtie settings reported random positions, or rather just "the first occurrence in the genome".

          Probably why I ended up down the path of going for reporting of all mapping positions in the first place.

          Thanks.

          Comment

          • Brian Bushnell
            Super Moderator
            • Jan 2014
            • 2709

            #6
            https://www.biostars.org/p/55237/

            Looks like there may be some problem in Bowtie's random placement, so I guess you should not rely on it. But since you are postprocessing multimapped reads anyway, YOU could pick one at random and discard the others.

            Comment

            • Brian.R
              Junior Member
              • Mar 2014
              • 5

              #7
              Thanks for that link. I'll give it a go with bwa tomorrow and see how that works out.

              Comment

              • Brian Bushnell
                Super Moderator
                • Jan 2014
                • 2709

                #8
                Originally posted by Brian.R View Post
                Thanks for that link. I'll give it a go with bwa tomorrow and see how that works out.
                Ok. Though I would feel remiss if I did not point you toward BBMap

                It supports random assignment for multi-mapping reads with the "ambig=random" flag.

                Comment

                • Brian.R
                  Junior Member
                  • Mar 2014
                  • 5

                  #9
                  Heh, cool, thanks for the suggestion. I'll compare the three of them once I have some time next week or so

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