Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • RockChalkJayhawk
    Senior Member
    • Mar 2009
    • 192

    pileup2bam

    Anyone aware of a tool that can convert a pileup file to BAM files.
  • maubp
    Peter (Biopython etc)
    • Jul 2009
    • 1544

    #2
    That doesn't make sense. BAM files (like SAM files) describe where individual reads are placed, whereas a pileup file is a coverage based summary of many reads.

    Comment

    • RockChalkJayhawk
      Senior Member
      • Mar 2009
      • 192

      #3
      Yes, but theoretically you can re-create the BAM information from the pileup because all the information is stored in the pileup file. Or am I mistaken?

      Comment

      • Alex Renwick
        Member
        • Jul 2011
        • 44

        #4
        Going from pileup to bam is a theoretical possibility, but I doubt anyone has taken the trouble to make it a reality. Even the best you could do would miss out on some information, like pairing. Why do you want to do this?

        Comment

        • RockChalkJayhawk
          Senior Member
          • Mar 2009
          • 192

          #5
          The problem is I am using an RNA-Seq workflow that produces a pileup rather than a BAM, so I can't annotate it with GATK.

          Comment

          • maubp
            Peter (Biopython etc)
            • Jul 2009
            • 1544

            #6
            What kind of workflow? If you are using Galaxy it probably is making a BAM file but hiding it by default - check the hidden entries.

            Comment

            • Alex Renwick
              Member
              • Jul 2011
              • 44

              #7
              There must be an easier way to get what you want than resurrecting a bam from pileup. You could look at the files upstream of the pileup and see if they can be translated to bam format, or, on the other hand, go forward to create a vcf (or some other bed/gff file) from the pileup and annotate that.

              Comment

              • Peterlorre
                Junior Member
                • Oct 2015
                • 2

                #8
                I find myself in this situation using legacy data (e.g., original sequencing files from an old project were lost but pileups are still available). I wanted to bump this thread to see if anyone has come up with a good solution to this problem- any utilities out there that can convert a pileup to a bam or something like it?

                Comment

                • gringer
                  David Eccles (gringer)
                  • May 2011
                  • 845

                  #9
                  You need to be more specific about the pileup format that is used. A text-based format like the output of 'samtools mpileup' would be easier to convert to SAM than a graphical image, for example. But even given the huge amount of information that could be extracted from 'samtools mpileup', it doesn't store everything. For example, the sequence names are not preserved, and no pairing information is retained.

                  Any pileup output which is nothing more than coverage values without linking between different bases will not be sufficient for generating a source SAM file.

                  Comment

                  • Peterlorre
                    Junior Member
                    • Oct 2015
                    • 2

                    #10
                    That's a good point- I'm talking about the text-based format, and the experiment was run single-end so pairing isn't important. It's true that I wouldn't have the original read names, but naively that doesn't seem very important- is there software that actually uses those, beyond for read pairing?

                    That said, I suppose that I hadn't considered whether the pileup format explicitly maintains the individual bases within reads. I had always assumed that the base calls at each position were ordered readwise, but it occurs to me that this may not be the case.

                    Anyway, it sounds like a tool to do this conversion probably doesn't exist. Thank you for your input.

                    Comment

                    • gringer
                      David Eccles (gringer)
                      • May 2011
                      • 845

                      #11
                      mpileup does retain read order information in the per-base coverage, but I'm not aware of any other text-based formats that do... actually, I'm not aware of any other text-based formats that do anything more than coverage alone.

                      Comment

                      Latest Articles

                      Collapse

                      • SEQadmin2
                        Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                        by SEQadmin2



                        Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
                        ...
                        07-09-2026, 11:10 AM
                      • SEQadmin2
                        Cancer Drug Resistance: The Lingering Barrier to Rising Survival
                        by SEQadmin2



                        Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

                        There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
                        07-08-2026, 05:17 AM
                      • GATTACAT
                        Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                        by GATTACAT
                        Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                        07-01-2026, 11:43 AM

                      ad_right_rmr

                      Collapse

                      News

                      Collapse

                      Topics Statistics Last Post
                      Started by SEQadmin2, 07-13-2026, 10:26 AM
                      0 responses
                      15 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 07-09-2026, 10:04 AM
                      0 responses
                      29 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 07-08-2026, 10:08 AM
                      0 responses
                      16 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 07-07-2026, 11:05 AM
                      0 responses
                      33 views
                      0 reactions
                      Last Post SEQadmin2  
                      Working...