Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Problem about samtools sort and tview, Who can help me?

    Hello everyboday, I am a newbie, my sam file size is about 45,786 kB, however after I use the samtools sort command, the .bai file produced is just only 1 kb, I wander it is right. In addition, after I use the samtools tview command, the result show a line N and nothing. I don't know where the problem is, who can help me?

  • #2
    Samtools sort will produce a sorted bam file and a .bam.bai file to go with it.

    For example,
    samtools sort bam_unsorted.bam > myBam_sorted.bam

    That will make: myBam_sorted.bam and myBam_sorted.bam.bai, and the .bam.bai file will be small.

    Also consider if you want to sort by position or by name, many things require by name, especially when working with paired end data, you'd need to include the -n option in samtools sort for that.

    Good luck.

    Comment


    • #3
      Originally posted by aprice67 View Post
      Samtools sort will produce a sorted bam file and a .bam.bai file to go with it.

      For example,
      samtools sort bam_unsorted.bam > myBam_sorted.bam

      That will make: myBam_sorted.bam and myBam_sorted.bam.bai, and the .bam.bai file will be small.

      Also consider if you want to sort by position or by name, many things require by name, especially when working with paired end data, you'd need to include the -n option in samtools sort for that.

      Good luck.

      To: aprice67
      thank you for your reply.
      Yes, I have soted my bam file, thne made samtools index and got bai file, the bai file is just 1kb.
      after then I use the command: samtools tview sorted.bam reference.fas
      the result is as following, while not be the sequence. so I don't which step is wrong.
      Attached Files

      Comment


      • #4
        It is normal for the .bai file to be small (compared to the bam file). It only contains index values that indicate where particular regions (chromosomes in this case) start in the bam files.

        Ends of chromosomes contain unsequenceable hetero-chromatin, which is represented by the N's that you are seeing. If you keep scrolling to the right or jump to a different location you should be able to see sequence/reads.

        I suggest that you give IGV a try as a graphical viewer with your reference/bam/bai files.

        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
        25 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-10-2024, 10:19 PM
        0 responses
        29 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-10-2024, 09:21 AM
        0 responses
        25 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-04-2024, 09:00 AM
        0 responses
        52 views
        0 likes
        Last Post seqadmin  
        Working...
        X