stringtie merge error bam file not sorted
1
0
Entering edit mode
5.5 years ago
paumarc ▴ 20

Hello

I am having an error using the following command line:

stringtie --merge -p 8 -G /home/ltr2/Genomes/GTF/hg19.gtf -o onwork/hisat2_test/gtf/stringtie_marged.gtf onwork/hisat2_test/margelist.txt

bam files has been sorted and indexed with samtools (so they are sorted) and hg19-fasta and hg19.gtf have been download from ucsc web page

magelist has one file per line with its full path

any ideas?

pau

RNA-Seq stringtie • 3.2k views
ADD COMMENT
1
Entering edit mode

If you could post the output of the above-mentioned command, it would be really helpful to understand the error.

ADD REPLY
0
Entering edit mode

Ok, I am sorry, i just forget to paste it

the error says : the input alignment file is not sorted!

the strange thing about the error is that it happens always with the last file (it do not matter if margelist has 2 or 10 bam files), it works normally until it is going to end.

It also occurs that files processed normally when they are not at the last place of the list are found as not sorted if they are at the last last place

thanks

ADD REPLY
0
Entering edit mode

Add the output of following command for all your BAM files

samtools view -H your_bam_file.bam | grep "HD"

You should see something like this

@HD VN:1.0  SO:coordinate
ADD REPLY
0
Entering edit mode

Thank you for your replay,

as i told you all files are sorted properly, and do not mather if i use two or more files at the marge list, it always gives the error at the last bam file

/hisat2_test/bam $ ls |xargs -i samtools view -H {} | grep "HD"

@HD VN:1.0  SO:coordinate

@HD VN:1.0  SO:coordinate

@HD VN:1.0  SO:coordinate

@HD VN:1.0  SO:coordinate

@HD VN:1.0  SO:coordinate

@HD VN:1.0  SO:coordinate

@HD VN:1.0  SO:coordinate

@HD VN:1.0  SO:coordinate

@HD VN:1.0  SO:coordinate

@HD VN:1.0  SO:coordinate

@HD VN:1.0  SO:coordinate
ADD REPLY
0
Entering edit mode

Check your margelist.txt file once again and make sure it does not have a blank line in the end. Open it in a textpad or notepad.

ADD REPLY
0
Entering edit mode

no spaces at margelist.txt file.

ADD REPLY
0
Entering edit mode

Can you paste the contents of this file?

ADD REPLY
0
Entering edit mode

i post it separatly by mistake, but you can see the margelist.txt

ADD REPLY
0
Entering edit mode

Yes, of course. Notice that at the original file there not exist a blank line between lines with the path. I don't know why (maybe because I am in Linux), when I copy paste, the post at the forum does not recognize the 'new line'

/home/ltr2/onwork/hisat2_test/bam/2008-7981.sorted.bam
/home/ltr2/onwork/hisat2_test/bam/2011-11198.sorted.bam
/home/ltr2/onwork/hisat2_test/bam/2011-11211.sorted.bam
/home/ltr2/onwork/hisat2_test/bam/2017-21131.sorted.bam
/home/ltr2/onwork/hisat2_test/bam/2006-5237.sorted.bam
/home/ltr2/onwork/hisat2_test/bam/2017-20860.sorted.bam
/home/ltr2/onwork/hisat2_test/bam/2017-21260.sorted.bam
/home/ltr2/onwork/hisat2_test/bam/2017-20863.sorted.bam
/home/ltr2/onwork/hisat2_test/bam/2017-20880.sorted.bam
/home/ltr2/onwork/hisat2_test/bam/2017-21081.sorted.bam
/home/ltr2/onwork/hisat2_test/bam/2017-21080.sorted.bam
/home/ltr2/onwork/hisat2_test/bam/2011-11087.sorted.bam

thanks

ADD REPLY
0
Entering edit mode

Hello paumarc ,

  • Please use the formatting bar (especially the code option) to present your post better. I've done it for you this time.
    code_formatting
  • When answering to a question please use the ADD REPLY button below the post.

Thank you!

ADD REPLY
0
Entering edit mode

ok, thank you. i was becoming crazy with the output

ADD REPLY
1
Entering edit mode
5.5 years ago
paumarc ▴ 20

Solved: margelist.txt should have the path of gtf files generated by stringtie in the previous step of the pipeline, not the path of bam files

ADD COMMENT

Login before adding your answer.

Traffic: 2782 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6