Answers.Body: <p>Just add <code>--dta-cufflinks</code> to your Hisat2 command, so that the output alignment file provides the attributes needed by Cufflinks (XS flags). This should do the job.  </p>
  
  <p>From <a href="https://ccb.jhu.edu/software/hisat2/manual.shtml" rel="noreferrer">manual</a>:</p>
  
  <blockquote>
    <p>Report alignments tailored specifically for Cufflinks. In addition to
    what HISAT2 does with the above option (--dta), With this option,
    HISAT2 looks for novel splice sites with three signals (GT/AG, GC/AG,
    AT/AC), but all user-provided splice sites are used irrespective of
    their signals. HISAT2 produces an optional field, XS:A:[+-], for every
    spliced alignment.</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-03T15:45:22.740Z
Answers.Text: If it was what you were looking for, please mark the answer as 'accepted' too. Future googlers will thank you ;)
Answers.UserDisplayName: aechchiki
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-03T16:15:10.120Z
Answers.Text: Sure, I will do that. I am still running hisat2 with that option.
Answers.UserDisplayName: SBDK8219
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-04T02:23:23.737Z
Answers.Text: It is still not working !!
Answers.UserDisplayName: SBDK8219
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-04T05:00:52.913Z
Answers.Text: I need more detail. It worked for me. Please then edit the question wit exact command line, what you tried and possibly a minimal example to be run. Also, be sure you deleted previously generated files/directories from Cufflinks and Hisat2 before relaunching the clean pipeline.
Answers.UserDisplayName: aechchiki
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-04T16:22:37.147Z
Answers.Text: Btw by 'more details' I meant also to paste in the question the command you used to generate the alignment file with Hisat2, also including the versions of both Hisat2 and Cufflinks that you are using.
Answers.UserDisplayName: aechchiki
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-05T19:25:19.190Z
Answers.Text: Accepted your answer :) I just updated the original question with how the issue got resolved.
Answers.UserDisplayName: SBDK8219
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-03T12:18:12.840Z
Answers.LastActivityDate: 2018-04-03T12:26:01.440Z
Answers.LastEditDate: 2018-04-03T12:26:01.440Z
Answers.UserDisplayName: aechchiki
Body: <p>I am running <a href="http://cole-trapnell-lab.github.io/cufflinks/" rel="nofollow noreferrer">Cufflinks</a> for transcriptome assembly using the .bam file generated by <a href="https://ccb.jhu.edu/software/hisat2/index.shtml" rel="nofollow noreferrer">Hisat2</a>. I tried both bam and sorted bam files</p>
  
  <pre><code>cufflinks --no-update-check -o ./ -p 15 accepted_hits.bam
  </code></pre>
  
  <p>it gives the following error:</p>
  
  <pre><code>Error: sort order of reads in BAMs must be the same
  </code></pre>
  
  <p>UPDATE: It is working fine now. It seems there were some issues with the reference file. The BAM files generated from <a href="https://ccb.jhu.edu/software/tophat/index.shtml" rel="nofollow noreferrer">Tophat2</a> also gave the same error. I downloaded the updated reference file and it worked great.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-03T11:00:46.467Z
Comments.Text: Maybe post some code so that we can follow what you're doing?
Comments.UserDisplayName: benn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-04T08:38:00.643Z
Comments.Text: Hello again, could you please add also the Hisat2 command? We are really trying to help, but to do that, we need more info. (do not hesitate to write there everything you tried)
Comments.UserDisplayName: Kamil S Jaron
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-06T18:31:28.060Z
Comments.Text: Instead of an update the preferred method would be to create an answer and then accept it.
Comments.UserDisplayName: Bioathlete
Tags: <rna-seq><assembly>
Title: Cufflinks Error: sort order of reads in BAMs must be the same
ThreadText: # Cufflinks Error: sort order of reads in BAMs must be the same
  
  (Asked by: username_0 on 2018-04-02)
  
  I am running [Cufflinks](http://cole-trapnell-lab.github.io/cufflinks/) for transcriptome assembly using the .bam file generated by [Hisat2](https://ccb.jhu.edu/software/hisat2/index.shtml). I tried both bam and sorted bam files
  
  ```
  cufflinks --no-update-check -o ./ -p 15 accepted_hits.bam
  
  ```
  
  it gives the following error:
  
  ```
  Error: sort order of reads in BAMs must be the same
  
  ```
  
  UPDATE: It is working fine now. It seems there were some issues with the reference file. The BAM files generated from [Tophat2](https://ccb.jhu.edu/software/tophat/index.shtml) also gave the same error. I downloaded the updated reference file and it worked great.
  
  **Tags:** rna-seq, assembly
  
  > **Comments:**
  > **username_1**: Maybe post some code so that we can follow what you're doing?  
  > **username_2**: Hello again, could you please add also the Hisat2 command? We are really trying to help, but to do that, we need more info. (do not hesitate to write there everything you tried)  
  > **username_3**: Instead of an update the preferred method would be to create an answer and then accept it.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2018-04-03. Score: 6 | Accepted answer
  
  Just add `--dta-cufflinks` to your Hisat2 command, so that the output alignment file provides the attributes needed by Cufflinks (XS flags). This should do the job.
  
  From [manual](https://ccb.jhu.edu/software/hisat2/manual.shtml):
  
  > Report alignments tailored specifically for Cufflinks. In addition to
  > what HISAT2 does with the above option (--dta), With this option,
  > HISAT2 looks for novel splice sites with three signals (GT/AG, GC/AG,
  > AT/AC), but all user-provided splice sites are used irrespective of
  > their signals. HISAT2 produces an optional field, XS:A:[+-], for every
  > spliced alignment.
  
  > **Comments:**
  > **username_4**: If it was what you were looking for, please mark the answer as 'accepted' too. Future googlers will thank you ;)  
  > **username_0**: Sure, I will do that. I am still running hisat2 with that option.  
  > **username_0**: It is still not working !!  
  > **username_4**: I need more detail. It worked for me. Please then edit the question wit exact command line, what you tried and possibly a minimal example to be run. Also, be sure you deleted previously generated files/directories from Cufflinks and Hisat2 before relaunching the clean pipeline.  
  > **username_4**: Btw by 'more details' I meant also to paste in the question the command you used to generate the alignment file with Hisat2, also including the versions of both Hisat2 and Cufflinks that you are using.  
  > **username_0**: Accepted your answer :) I just updated the original question with how the issue got resolved.  
  
  ---
  
  