2
$\begingroup$

I am a novice to bioinformatics trying to run a cuffdiff job in cufflinks and keep getting this error message:

Error: sort order of reads in BAMs must be the same

GENERATING SAM FILES:

cd /fs/project/PMIU0157/Claire_Stoll/RNASeq/B73_hisat2/B73_hisat2_11-5
module load hisat2  
hisat2 -k 1 -p 8 -S 11-5_B73_accepted_hits.sam -x /fs/project/PMIU0157/Claire_Stoll/RNASeq/B73_hisat2/B73_Zea_mays.AGPv4.dna.toplevel -1 /fs/project/PMIU0157/Claire_Stoll/RNASeq/11-5_FCHHL7JBBXX_L7_DLPRMzP300H3AAAPEI-27_1.fq  -2 /fs/project/PMIU0157/Claire_Stoll/RNASeq/11-5_FCHHL7JBBXX_L7_DLPRMzP300H3AAAPEI-27_2.fq


cd /fs/project/PMIU0157/Claire_Stoll/RNASeq/Mo17_hisat2/Mo17_hisat2_11R-5
module load hisat2  
hisat2 -k 1 -p 8 -S 11-5_Mo17_accepted_hits.sam -x /fs/project/PMIU0157/Claire_Stoll/RNASeq/Mo17_hisat2//Mol17_Ref_Lai -1 /fs/project/PMIU0157/Claire_Stoll/RNASeq/11R-5_DLPRMzP300B4AAAPEI-2_1.fq  -2 /fs/project/PMIU0157/Claire_Stoll/RNASeq/11R-5_DLPRMzP300B4AAAPEI-2_2.fq

CONVERTING SAM TO BAM:

cd /fs/project/PMIU0157/Claire_Stoll/RNASeq/B73_hisat2/B73_hisat2_11-5
module load samtools 
samtools view -bS a_B73_11-5_accepted_hits.sam > a_B73_11-5_accepted_hits.bam
samtools sort a_B73_11-5_accepted_hits.bam -o a_B73_11-5_accepted_hits.sorted.bam

cd /fs/project/PMIU0157/Claire_Stoll/RNASeq/Mo17_hisat2/Mo17_hisat2_11-5
module load samtools 
samtools view -bS a_Mo17_11-5_accepted_hits.sam > a_Mo17_11-5_accepted_hits.bam
samtools sort a_Mo17_11-5_accepted_hits.bam -o a_Mo17_11-5_accepted_hits.sorted.bam

CUFFDIFF JOB

cd /fs/project/PMIU0157/Claire_Stoll/RNASeq/B73_hisat2/B73_hisat2_11-5
module load cufflinks/2.2.1
cuffdiff -b /fs/project/PMIU0157/Claire_Stoll/RNASeq/B73_hisat2/B73_hisat2_11-5 -u -N -p 8 /fs/project/PMIU0157/Claire_Stoll/Zea_mays.AGPv4.36.chr.gff3 /fs/project/PMIU0157/Claire_Stoll/RNASeq/B73_hisat2/B73_hisat2_11-5/a_B73_11-5_accepted_hits.sorted.bam /fs/project/PMIU0157/Claire_Stoll/RNASeq/Mo17_hisat2/Mo17_hisat2_11-5/a_Mo17_11-5_accepted_hits.sorted.bam
$\endgroup$
1
  • 1
    $\begingroup$ Is it the last command that gives the error? $\endgroup$
    – terdon
    Jun 7, 2019 at 19:04

2 Answers 2

3
$\begingroup$

I think cuffdiff is not quite giving you the right error...it looks like the crux of your problem is you aligned each sample to a different reference.

$\endgroup$
2
$\begingroup$

As @swbarnes2 noted, the error message is because the chromosome names, sizes, and orders differ between the two reference genomes/species you aligned against. Even if they were the same, you're comparing one sample against another between organisms, which is innately not something likely to work well. Further, I wouldn't expect the Zea Mays annotation to be very useful with whatever Ref_Lai is.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.