Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DNAjunk
    Member
    • Jun 2009
    • 62

    #1

    How to create a SAM/BAM file from scratch

    Hi
    Does anybody have written a script or programme that creates a SAM or BAM file based on the following alignment information:

    1) 454-reads
    2) read qualtities
    3) reference sequence(s)
    4) read alignment information (e.g. read X aligns from (read-)position X_i to position X_j with reference Y, position Y_i to Y_j )

    Many thanks for suggestions!
  • drio
    Senior Member
    • Oct 2008
    • 323

    #2
    Normally that is being taken care by your aligner of choice. Doesn't your aligner dump alignments in S|Bam format? If you still want to create your bams, take a look to the samtools API or the picard tools (both have examples on how to use the api). Also, you may want to take a pick to the source code of the bwa, bfast, etc... to see how they dump the alignments in BAM format.
    -drd

    Comment

    • DNAjunk
      Member
      • Jun 2009
      • 62

      #3
      I am using a in-house mapping program that works fine, however it doesn't create BAM/SAM output (also gsMapper/newbler doesn't generate BAM/SAM, right?)

      Comment

      • drio
        Senior Member
        • Oct 2008
        • 323

        #4
        I am not sure about gsMapper, I think newbler does not dump in SAM/BAM format currently. What's the programming language you use in your in-house mapper? I'd suggest you add support to bam/sam at the core of the tool.
        -drd

        Comment

        • DNAjunk
          Member
          • Jun 2009
          • 62

          #5
          it is written in C programming language.

          I've tried to convert ACE files via AMOS to SAM, but there were too many errors during conversion...

          Comment

          • krobison
            Senior Member
            • Nov 2007
            • 734

            #6
            Read the SAM documentation carefully; it should be pretty easy to make a basic SAM file (I'm considering crossing this bridge myself for a small custom realigner) without much trouble.

            http://samtools.sourceforge.net/SAM1.pdf

            After one go at it, re-posting with any specific challenges/questions (or success!) would probably help us both work through it.
            Last edited by krobison; 09-08-2010, 06:01 AM.

            Comment

            • lh3
              Senior Member
              • Feb 2008
              • 686

              #7
              Ssaha2 (G1K is using that) or bwasw or novoalign (have not tried).

              Comment

              • simonandrews
                Simon Andrews
                • May 2009
                • 870

                #8
                BAM is trickier, but writing SAM files is pretty straight forward. The trickiest part is getting the flag values set correctly, which can be a pain if you're not used to bitwise operations. There have been quite a few posts on here which covered that though.

                Comment

                • milad621
                  Junior Member
                  • Mar 2012
                  • 2

                  #9
                  I have the same problem. How did you solve your's DNAjunk?
                  I want to create a same file from sequence reads, the reference genome, and matched positions.
                  Is there any open source software to create sam file with just these informations?

                  Comment

                  • DNAjunk
                    Member
                    • Jun 2009
                    • 62

                    #10
                    Hi

                    I did not proceed making my own sam/bam files.

                    As for 454 read-mapping, the latest 454 mapping software can create BAM files. Also, GMAP, which I often use, outputs alignments in SAM format.

                    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
                      ...
                      Today, 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, Today, 05:39 AM
                    0 responses
                    9 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, Yesterday, 09:56 AM
                    0 responses
                    11 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 10-09-2026, 11:14 AM
                    0 responses
                    25 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 09-29-2026, 09:51 AM
                    0 responses
                    76 views
                    0 reactions
                    Last Post SEQadmin2  
                    Working...