Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Split a SAM file

    Hi All,

    I am looking for a tool that can split SAM file into smaller sub SAM files. I just wanted to process(annotate reads) the SAM files in parallel and join them again? Do you think it is possible?

    Thank you,

    Rahul

  • #2
    With samtools, you can generate sub bams by indicating what chromosome and positions you want in the sub file. Then you can convert back to sams.

    Comment


    • #3
      Thanks for the immediate reply.I want to break the SAM file into smaller files based on the number of reads rather than chromosomal location. Still your method should do the work.

      Thanks a lot.

      Rahul

      Comment


      • #4
        linux split

        The split function should do this for you though be sure that you are using a multiple of 4 or 8 depending on if it is paired end or not.

        Comment


        • #5
          I have tried the split function and it does break the file. But SAM tools is unable to read the resulting subfiles. I am getting the following error when I try to sort the resulting subSAM file.


          [bam_header_read] EOF marker is absent.
          [bam_sort_core] truncated file. Continue anyway.
          Segmentation fault


          Please let me know if you have seen this errors before.

          Thank you,

          Rahul

          Comment


          • #6
            header

            You have to be sure the header information is contained in the split files so you might have a separate header file that you can then add to each of the split files.

            Originally posted by rahul View Post
            I have tried the split function and it does break the file. But SAM tools is unable to read the resulting subfiles. I am getting the following error when I try to sort the resulting subSAM file.


            [bam_header_read] EOF marker is absent.
            [bam_sort_core] truncated file. Continue anyway.
            Segmentation fault


            Please let me know if you have seen this errors before.

            Thank you,

            Rahul

            Comment


            • #7
              Sure, That makes sense.Thanks a lot for all the help.

              Rahul

              Comment

              Latest Articles

              Collapse

              • seqadmin
                Current Approaches to Protein Sequencing
                by seqadmin


                Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
                04-04-2024, 04:25 PM
              • 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

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by seqadmin, 04-11-2024, 12:08 PM
              0 responses
              18 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 04-10-2024, 10:19 PM
              0 responses
              22 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 04-10-2024, 09:21 AM
              0 responses
              16 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 04-04-2024, 09:00 AM
              0 responses
              47 views
              0 likes
              Last Post seqadmin  
              Working...
              X