Cuffdiff bam sort error

Hi,

I have set #1 of bam files that were generated with galaxy a year ago.
I have a new set #2 of bam files that I generated recently from new fastq data.

If I trying cuffdiff on only bam files from set #1, it works fine. And if I try running cuffdif on only bam files from set #2 that it also works fine.

However, when I try running cuffdiff with files from set #1 AND set #2, I get the error: “Error: sort order of reads in BAMs must be the same.”

I tried the SortSam tool to sort BAM files by coordinate order from from set #1 and set #2, but I still get the same error after I running cuffdiff with the sorted files.

When using cuffdiff, I use a mm9 gtf file downloaded from Shared Data → iGenomes → mm9 → genes.gtf . I also select perform bias correction and mm9 for the locally cached reference genome.

Cuffdiff works fine when with these settings when I run it with only bam files from set #1 or only from set #2. But if I try to run cuffdiff to compare bam files from set #1 and set #2, then it gives me that sorting error.

Any advice would be greatly appreciated. Thanks!

1 Like

Hi @awezm1

Cuffdiff is deprecated in Galaxy and should be avoided.

That said, it sounds as if the headers of the two different BAM datasets differ, leading to the error. Sorting is not enough – the SQ lines in the header must also match (content and order). But this could also just be the tool failing in general – it hasn’t been updated in several years and has many known issues that will never be addressed.

Consider using more current DE protocols/tools. Many are discussed on this forum, but here are the tutorials directly. The BAM differences will likely not matter with the current protocols – assuming that all read mappings were against the same exact reference genome build/version and the same matched reference annotation.

FAQ to help with common issues: Help for Differential Expression Analysis

Thanks!