This is a test version of Biostars. For the public version, visit https://www.biostars.org.
HISAT2-StringTie-Cuffdiff error: BAM record error: found spliced alignment without XS attribute

I know Hisat2-StringTie-ballgown pipeline is very useful, but I'd also like to set up a Hisat2-StringTie-Cuffdiff pipeline.

Here are the my commands for each step:

$hisat2 --dta -x fruitfly_tran -1 smGSM794483_C1_R1_1.fq -2 smGSM794483_C1_R1_2.fq -S smGSM794483_C1_R1.sam

$samtools view -bS smGSM794483_C1_R1.sam > smGSM794483_C1_R1_unsorted.bam

$samtools sort smGSM794483_C1_R1_unsorted.bam smGSM794483_C1_R1

$stringtie -G fruitfly.gtf -o smGSM794483_C1_R1.gtf -l smGSM794483_C1_R1 smGSM794483_C1_R1.bam

$gffcompare -r fruitfly.gtf -G -o merged stringtie_merged.gtf

$cuffdiff -o cuffdiff -b fruitfly.fa -p 4 -L C1,C2 -u stringtie_merged.gtf smGSM794483_C1_R1.bam,smGSM794484_C1_R2.bam,smGSM794485_C1_R3.bam smGSM794486_C2_R1.bam,smGSM794487_C2_R2.bam,smGSM794488_C2_R3.bam

And in the final step of cuffdiff,

I saw some errors:

BAM record error: found spliced alignment without XS attribute

I noticed that some parameters in the pipeline may be not good for cuffdiff.

In the hisat2, I should use --dta-cufflinks other than --dta ...

Would you please give me some suggestions?

Thanks so much for your help!!

rna-seq

1 answer

$hisat2 --dta -x fruitfly_tran -1 smGSM794483_C1_R1_1.fq -2 smGSM794483_C1_R1_2.fq -S smGSM794483_C1_R1.sam

Modify --dta in --dta-cufflinks, and use Cuffdiff directly without Stringtie for an immediate result.

Otherwise, run hisat2 again with --dta-cufflinks and then use in Cuffdiff:

  • the GTF file obtained from the hisat2 run with just --dta
  • the BAM files obtained from the hisat2 run with --dta-cufflinks

For an overall overview of this workflow, you can see it like this:

  1. Run 2 parallel HISAT2 runs on the same files: one with --dta and one with --dta-cufflinks
  2. Run Stringtie on the BAM files obtained from the --dta mode
  3. Run Cuffdiff with the GTF file obtained from Stringtie, and the BAM files obtained from the --dta-cufflinks mode

This way you should be sure that Cuffdiff does the job silently.

Thanks so much for your detailed information......

I met the same error and learned so much from your answers. But a question still remains to me: I run HISAT2 with the option -dta-cufflinks, then I run STRINGTIE on the BAM files obtained from the -dta-cufflinks mode, and the following cuffcompare and cuffdiff, no error occured. So Why should run 2 parallel HISAT2 that one with -dta and one with -dta-cufflinks? Is there any difference between the GTF files generated from STRINGTIE if one with -dta and one with -dta-cufflinks? Thanks a lot!

Log in to answer this question.