Header Leaderboard Ad

Collapse

badly sorted BAM

Collapse

Announcement

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

  • badly sorted BAM

    Hi,

    I have some BAM files in which the chromosomes are sorted like characters, eg the first chromosome is 10, the second 11 and the last two are 8 and 9.

    What is the quickest way to fix this? I tried samtools sort with no success.

    Thanks!

  • #2
    Hi Filippo, haven't tried this myself but perhaps you can use SortSam in Picard tools:



    Why do you want this specific order in an indexed file? Is it required by some tool?

    Comment


    • #3
      Hi, thanks for the answer, I will try it.
      Do you think it would automatically sort the chromosomes or do I have to specify something?

      I need them in a regular order (1,2,3 ... 22,X,Y) so that the following files (for example pileups made out of the bam) will also be in the regular order. The scripts that I made so far go crazy if they get chromosome 10 instead of 1.

      Comment


      • #4
        Originally posted by Filippo View Post
        I need them in a regular order (1,2,3 ... 22,X,Y) so that the following files (for example pileups made out of the bam) will also be in the regular order. The scripts that I made so far go crazy if they get chromosome 10 instead of 1.
        Then you should probably change your scripts so that they can at least handle what samtools does. The people who write samtools also write the specification for SAM/BAM, so you need to be able to handle that format.



        This document says that the coordinate sort order in a SAM/BAM file must be based on the order of SQ lines in the header (p. 2, tag SO).

        Comment

        Latest Articles

        Collapse

        • seqadmin
          How RNA-Seq is Transforming Cancer Studies
          by seqadmin



          Cancer research has been transformed through numerous molecular techniques, with RNA sequencing (RNA-seq) playing a crucial role in understanding the complexity of the disease. Maša Ivin, Ph.D., Scientific Writer at Lexogen, and Yvonne Goepel Ph.D., Product Manager at Lexogen, remarked that “The high-throughput nature of RNA-seq allows for rapid profiling and deep exploration of the transcriptome.” They emphasized its indispensable role in cancer research, aiding in biomarker...
          09-07-2023, 11:15 PM
        • seqadmin
          Methods for Investigating the Transcriptome
          by seqadmin




          Ribonucleic acid (RNA) represents a range of diverse molecules that play a crucial role in many cellular processes. From serving as a protein template to regulating genes, the complex processes involving RNA make it a focal point of study for many scientists. This article will spotlight various methods scientists have developed to investigate different RNA subtypes and the broader transcriptome.

          Whole Transcriptome RNA-seq
          Whole transcriptome sequencing...
          08-31-2023, 11:07 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, Today, 06:18 AM
        0 responses
        5 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, Yesterday, 09:17 AM
        0 responses
        8 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 09-19-2023, 09:23 AM
        0 responses
        24 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 09-19-2023, 09:14 AM
        0 responses
        7 views
        0 likes
        Last Post seqadmin  
        Working...
        X