This is a test version of Biostars. For the public version, visit https://www.biostars.org.
StringTie error input file not sorted, even though it is

I've been following the stringtie pipeline for differential expression. I'm up to the stage of stringtie -e -B where I'm using the merged transcript file with the alignment (.bam) files to get read coverage tables.

root="/mnt/fls01-home01/mfbx3sgh/scratch"   
file=$root/Genome/*.bam  

stringtie $file -p 8 -e -B --fr 
            -G $root/FPKM_count/stringtie_merged_samples.gtf

I keep getting the error "the input alignment file is not sorted". My bam alignment files are definitely co-ordinate sorted, and I used them in the first step of the pipeline to generate the transcript assemblies with no problems. Anyone had a similar problem?? Thanks

rna-seq stringtie

Did you try sorting (no matter if you think it is or is not) sorted using samtools a representative BAM file and then try stringtie again? Did that work? Also please show the command that was used for sorting in the first place.

Hi, I sorted the bam files using STAR output settings (used instead of HISAT). I've checked the bam file using samtools view -H $file | grep s0 and the output returned @HD VN:1.4 . s0:coordinate so it is definitely sorted. The gtf file is also sorted in the same order, chr1 onwards, so it can't be because of an incompatibility issue?

The header is no guarantee for anything. Did you try sorting manually with samtools and then rerun it?

Just realised it's an issue with the reading in the file, not the file itself. Thanks for the suggestions anyway!

0 answers

No answers yet.

Log in to answer this question.