Question: stringtie merge error bam file not sorted
0
gravatar for paumarc
10 weeks ago by
paumarc10
Barcelona (ICO)
paumarc10 wrote:

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 • 275 views
ADD COMMENTlink modified 9 weeks ago • written 10 weeks ago by paumarc10
1

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

ADD REPLYlink modified 10 weeks ago • written 10 weeks ago by Nitin Narwade330

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 REPLYlink written 10 weeks ago by paumarc10

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 REPLYlink written 10 weeks ago by Vijay Lakhujani3.4k

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 REPLYlink modified 10 weeks ago by finswimmer8.0k • written 10 weeks ago by paumarc10

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 REPLYlink written 10 weeks ago by Vijay Lakhujani3.4k

no spaces at margelist.txt file.

ADD REPLYlink written 10 weeks ago by paumarc10

Can you paste the contents of this file?

ADD REPLYlink written 10 weeks ago by Vijay Lakhujani3.4k

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

ADD REPLYlink modified 10 weeks ago • written 10 weeks ago by paumarc10

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 REPLYlink modified 10 weeks ago • written 10 weeks ago by paumarc10

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 REPLYlink written 10 weeks ago by finswimmer8.0k

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

ADD REPLYlink written 10 weeks ago by paumarc10
1
gravatar for paumarc
9 weeks ago by
paumarc10
Barcelona (ICO)
paumarc10 wrote:

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 COMMENTlink written 9 weeks ago by paumarc10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 558 users visited in the last hour