Hi,
I am currently implementing a module in c++ using samtools's c library and I seem to encounter many problems in trying to implement a Seek like effect for the bamfile. I have browse through everything I though would help within samtools without success.
I am using bam_plp_next and bam_plp_next to do a continuous read of the bamfile but I want to be able to say : Seek(int chrmTid); or something like that and then continue reading from the first available position of this chromosome.
Every function that access the index file is of the form
where beg and end are positions in this chromosome.
My question is : Is there a way that I can achieve the described functionality while only providing a tid and a beginning position?
What I use currently is the above mentionned function which I provide with 0 as beg position and arbitrairy 15000 as end.
I am currently implementing a module in c++ using samtools's c library and I seem to encounter many problems in trying to implement a Seek like effect for the bamfile. I have browse through everything I though would help within samtools without success.
I am using bam_plp_next and bam_plp_next to do a continuous read of the bamfile but I want to be able to say : Seek(int chrmTid); or something like that and then continue reading from the first available position of this chromosome.
Every function that access the index file is of the form
Code:
bam_iter_t bam_iter_query(const bam_index_t *idx, int tid, int beg, int end);
My question is : Is there a way that I can achieve the described functionality while only providing a tid and a beginning position?
What I use currently is the above mentionned function which I provide with 0 as beg position and arbitrairy 15000 as end.
Comment