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
                      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
                    • 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

                    ad_right_rmr

                    Collapse

                    News

                    Collapse

                    Topics Statistics Last Post
                    Started by seqadmin, 04-11-2024, 12:08 PM
                    0 responses
                    59 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 04-10-2024, 10:19 PM
                    0 responses
                    57 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 04-10-2024, 09:21 AM
                    0 responses
                    51 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 04-04-2024, 09:00 AM
                    0 responses
                    56 views
                    0 likes
                    Last Post seqadmin  
                    Working...
                    X