Seqanswers Leaderboard Ad

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
          Understanding Genetic Influence on Infectious Disease
          by seqadmin




          During the COVID-19 pandemic, scientists observed that while some individuals experienced severe illness when infected with SARS-CoV-2, others were barely affected. These disparities left researchers and clinicians wondering what causes the wide variations in response to viral infections and what role genetics plays.

          Jean-Laurent Casanova, M.D., Ph.D., Professor at Rockefeller University, is a leading expert in this crossover between genetics and infectious...
          09-09-2024, 10:59 AM
        • seqadmin
          Addressing Off-Target Effects in CRISPR Technologies
          by seqadmin






          The first FDA-approved CRISPR-based therapy marked the transition of therapeutic gene editing from a dream to reality1. CRISPR technologies have streamlined gene editing, and CRISPR screens have become an important approach for identifying genes involved in disease processes2. This technique introduces targeted mutations across numerous genes, enabling large-scale identification of gene functions, interactions, and pathways3. Identifying the full range...
          08-27-2024, 04:44 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, 09-06-2024, 08:02 AM
        0 responses
        143 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 09-03-2024, 08:30 AM
        0 responses
        146 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 08-27-2024, 04:40 AM
        0 responses
        157 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 08-22-2024, 05:00 AM
        0 responses
        400 views
        0 likes
        Last Post seqadmin  
        Working...
        X