seqan3 icon indicating copy to clipboard operation
seqan3 copied to clipboard

[IO] BAM index support

Open jay-tux opened this issue 2 years ago • 6 comments

Platform

  • SeqAn version: 3.0
  • Operating system: Linux kaya 5.17.9-arch1-1 #1 SMP PREEMPT Wed, 18 May 2022 17:30:11 +0000 x86_64 GNU/Linux
  • Compiler: gcc (GCC) 12.1.0

Question

Is there a way to use *.bam.bai files to use as an index? The documentation on your site covers generating arbitrary indexes, but can it also be used to (auto-)load the companion index file when loading the BAM file? I currently use seqan3::sam_file_input in{file}; to load the input file.

Thank you!

jay-tux avatar May 21 '22 20:05 jay-tux

Hi @jay-tux,

unfortunately we do not support BAM indexing yet in seqan3. I can't give a good time estimate on when we will be able to implement this feature. I know of a external draft bai support though. I'll ask the authors and come back to you.

smehringer avatar May 21 '22 20:05 smehringer

Alright! Thank you!

If it's not implemented yet, no worries. I think I can do without.

jay-tux avatar May 21 '22 20:05 jay-tux

Hi @smehringer, I also have a use case in which BAM indexing would help. (In the end, I would like to be able to do pileup like in pysam.) If there is an implementation available, I would be interested.

tsnorri avatar Aug 18 '22 10:08 tsnorri

I'm very sorry for the late reply!

@Irallia Could you point them to the bam index library of Josh you are using in IgenVar?

smehringer avatar Aug 25 '22 08:08 smehringer

@Irallia Could you point them to the bam index library of Josh you are using in IgenVar?

https://github.com/joshuak94/BAMIntervalTree

eseiler avatar Oct 20 '22 09:10 eseiler

This is just to cast my vote for this feature. I switched back to htslib for all the bamIO and I guess you know that no one ever really wants to do that... Thanks for the link above. Will have a look.

behrj avatar Dec 07 '22 07:12 behrj