I'm having issues getting CuffDiff to run on my RNA-seq data. I'm using HISAT2 to align using the --dta-cufflinks option and running samtools sort, then stringtie to create gtfs for each bam file and stringtie merge to merge them into one. When I then run cuffdiff, I get this error:
[07:52:00] Loading reference annotation. [07:52:04] Inspecting maps and determining fragment length distributions.
Error: this SAM file doesn't appear to be correctly sorted! current hit is at 004205F|quiver_obj|quiver|quiver|pilon:772, last one was at 000071F|quiver_subseq_1:79442_obj|quiver|quiver|pilon:76430 Cufflinks requires that if your file has SQ records in the SAM header that they appear in the same order as the chromosomes names in the alignments. If there are no SQ records in the header, or if the header is missing, the alignments must be sorted lexicographically by chromsome name and by position.
I've read other threads here about similar errors, but none of the solutions i've seen have helped. I've actually tried running cuffdiff with the same stringtie gff file but with older RNA-seq data aligned to the same reference, and it worked. Any help is appreciated, I've been struggling with this for weeks.