bam2hints error in gsnap pipeline

Discussions about predicting genes with AUGUSTUS. Not covered here: WebAUGUSTUS and BRAKER1

Moderator: bioinf

Post Reply
User avatar
katharina
Site Admin
Posts: 531
Joined: Wed Nov 18, 2015 6:14 pm
Location: Greifswald
Contact:

bam2hints error in gsnap pipeline

Post by katharina »

Originally posted in the old forum by Philipp Schiffer on 30.01.2014 - 12:51
Hi!
I am following the http://bioinf.uni-greifswald.de/bioinf/ ... Aseq.GSNAP manual to incorporate gsnap mapped RNAseq reads to create a hints file.
Following the steps of sorting and filtering I get an error when it finally comes to

Code: Select all

bam2hints --intronsonly --in=B3I_UNclean_shuf.gsnap.Bornheim.Bornheimx.result.ref.ss.f.bam --out=hints-sort.gff
Wait a moment, calculating maximum block size that needs to be allocated... .. done
BAM file MUST be sorted by target sequence names when 'intronsonly' and 'mult' options are active
This happens regardless if I do the last filtering step
samtools sort rnaseq.f.bam rnaseq.fs
or not. It does work when I set the
--nomult switch, so

Code: Select all

bam2hints --intronsonly --nomult --in=rnaseq.fs.bam --out=hints.gff.
So, my question is if there is something wrong beforehand, as I did all the sorting, or if one has to do the --nomult and that was just missing from the command?
My guess was that having the mult option would make sense if that puts more power to one specific hint, but then it might just not do anything like that?
Thanks
Philipp
User avatar
katharina
Site Admin
Posts: 531
Joined: Wed Nov 18, 2015 6:14 pm
Location: Greifswald
Contact:

Re: bam2hints error in gsnap pipeline

Post by katharina »

by Philipp Schiffer on 06.02.2014 - 12:27
Hi everybody,
this issue was resolved with the help of Tonatiuh (THANKS a lot!). My samtools was to old, as they changed the sorting. Here is what Tonatiuh wrote:
''Dear Philipp,
The header of your bam file looks like this

Code: Select all

@HD VN:1.0 SO:unsorted 
@SQ SN:Sc0000000 LN:309812 
@SQ SN:Sc0000001 LN:165247 
...
bam2hints checks the "SO" field within the header of the bam file. If it is not set to "coordinate" then it will throw the error you are getting. Newer versions of samtools set this field to "coordinate" if you sort by target reference and to "queryname" if you have done so by query.''
Thus after updating to%25green%25 samtools 0.2%25%25 the pipeline works.
Philipp
Post Reply