Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Sorting SAM output from Bowtie

    Hello everyone,

    I have an easy one for you today. I have SAM output created from Bowtie that I want to use with Cufflinks, but Cufflinks only accepts SAM files that have been sorted. I've tried using SAM tools to sort, but it seems like I have to convert the SAM into a BAM in order to be able to sort it. Is that correct? Then won't I have to convert it back to SAM in order for use with Cufflinks?


    Thanks again,
    Brandon

  • #2
    The cufflinks manual suggests:

    sort -k 3,3 -k 4,4n hits.sam > hits.sam.sorted

    Will this work?

    Originally posted by DrD2009 View Post
    Hello everyone,

    I have an easy one for you today. I have SAM output created from Bowtie that I want to use with Cufflinks, but Cufflinks only accepts SAM files that have been sorted. I've tried using SAM tools to sort, but it seems like I have to convert the SAM into a BAM in order to be able to sort it. Is that correct? Then won't I have to convert it back to SAM in order for use with Cufflinks?


    Thanks again,
    Brandon

    Comment


    • #3
      You could also sort using samtools.

      Comment


      • #4
        @RockChalkJayhawk
        Thanks. That seems to work although I have no idea what that code represents.

        @genbio64
        Do I have to convert the SAM into a BAM to sort? That's what samtools seems to want.

        Comment


        • #5
          Originally posted by DrD2009 View Post
          @RockChalkJayhawk
          Thanks. That seems to work although I have no idea what that code represents.

          @genbio64
          Do I have to convert the SAM into a BAM to sort? That's what samtools seems to want.
          The code just means to sort on column 3, then by column 4(numerically) of the hits.sam file and print to hits.sam.sorted

          Comment


          • #6
            Ah. Well it worked perfectly. I guess I don't have to deal with samtools for now afterall.

            Thanks again.

            Comment


            • #7
              If I am not using tophat but want to use some other resource, such as Bowtie, is there a way to sort the sequences into useable size files without using SAM tools?

              - Shoncho

              Comment


              • #8
                Cufflinks
                Error: this SAM file doesn't appear to be correctly sorted!
                current hit is at scaffold_737:1311, last one was at scaffold_736:2605

                But "scaffold_736" is before "scaffold_737" and the sorting is correct? Is this a bug?

                best regards,
                Gregor

                Comment


                • #9
                  Yes, you must convert from sam to bam to sort. The current cufflinks can use BAM

                  To sort your sam

                  # will create myfile.sorted.bam
                  samtools view -uS myfile.sam | samtools sort - myfile.sorted

                  Comment


                  • #10
                    @rgregor,

                    Are you using a reference GTF? If so, it must be sorted in the same order OR your SAM file must include a header that lists the scaffolds in the correct order.

                    Comment

                    Latest Articles

                    Collapse

                    • seqadmin
                      Recent Advances in Sequencing Analysis Tools
                      by seqadmin


                      The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
                      05-06-2024, 07:48 AM
                    • seqadmin
                      Essential Discoveries and Tools in Epitranscriptomics
                      by seqadmin




                      The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
                      04-22-2024, 07:01 AM

                    ad_right_rmr

                    Collapse

                    News

                    Collapse

                    Topics Statistics Last Post
                    Started by seqadmin, 05-07-2024, 06:57 AM
                    0 responses
                    12 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 05-06-2024, 07:17 AM
                    0 responses
                    16 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 05-02-2024, 08:06 AM
                    0 responses
                    22 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 04-30-2024, 12:17 PM
                    0 responses
                    24 views
                    0 likes
                    Last Post seqadmin  
                    Working...
                    X