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
                      Genetic Variation in Immunogenetics and Antibody Diversity
                      by seqadmin



                      The field of immunogenetics explores how genetic variations influence immune responses and susceptibility to disease. In a recent SEQanswers webinar, Oscar Rodriguez, Ph.D., Postdoctoral Researcher at the University of Louisville, and Ruben Martínez Barricarte, Ph.D., Assistant Professor of Medicine at Vanderbilt University, shared recent advancements in immunogenetics. This article discusses their research on genetic variation in antibody loci, antibody production processes,...
                      11-06-2024, 07:24 PM
                    • seqadmin
                      Choosing Between NGS and qPCR
                      by seqadmin



                      Next-generation sequencing (NGS) and quantitative polymerase chain reaction (qPCR) are essential techniques for investigating the genome, transcriptome, and epigenome. In many cases, choosing the appropriate technique is straightforward, but in others, it can be more challenging to determine the most effective option. A simple distinction is that smaller, more focused projects are typically better suited for qPCR, while larger, more complex datasets benefit from NGS. However,...
                      10-18-2024, 07:11 AM

                    ad_right_rmr

                    Collapse

                    News

                    Collapse

                    Topics Statistics Last Post
                    Started by seqadmin, Today, 11:09 AM
                    0 responses
                    22 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, Today, 06:13 AM
                    0 responses
                    20 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 11-01-2024, 06:09 AM
                    0 responses
                    30 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 10-30-2024, 05:31 AM
                    0 responses
                    21 views
                    0 likes
                    Last Post seqadmin  
                    Working...
                    X