Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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!

  • #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


    • #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


      • #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


        • #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


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



            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


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

              Comment


              • #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


                • #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


                  • #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

                    • seqadmin
                      Strategies for Sequencing Challenging Samples
                      by seqadmin


                      Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                      03-22-2024, 06:39 AM
                    • seqadmin
                      Techniques and Challenges in Conservation Genomics
                      by seqadmin



                      The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                      Avian Conservation
                      Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                      03-08-2024, 10:41 AM

                    ad_right_rmr

                    Collapse

                    News

                    Collapse

                    Topics Statistics Last Post
                    Started by seqadmin, Yesterday, 06:37 PM
                    0 responses
                    10 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, Yesterday, 06:07 PM
                    0 responses
                    10 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 03-22-2024, 10:03 AM
                    0 responses
                    51 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 03-21-2024, 07:32 AM
                    0 responses
                    67 views
                    0 likes
                    Last Post seqadmin  
                    Working...
                    X