Hello Biostars Community,
I am a newbie to the bioinformatics world and need some help with a project I am working on!
I need to use htsjdk to extract every tlen value from a BAM file and have a few questions.
- How do a read the BAM file in the first place? I have found SamReader that might do the job like so : SamReader samReader= SamReaderFactory.makeDefault().open(new File("mybam.bam"));
- How do I find the position of individual chromosomes? I want to multithread the application, reading each chromosome in parallel.
- Once I get the position to start reading from, how do I read each line, then the tlen field?
Sorry for all of the questions, I have been googling a lot and haven't found answers!
Any help is appreciated, thanks in advance!