Question: How To Read Bam File Line By Line Using Ruby
gravatar for Gangcai
8.9 years ago by
Berlin Or Shanghai
Gangcai230 wrote:

Dear all, I am trying to read bam file line by line by using ruby scripts. Although there is ruby gem bio-samtools(, I don't find a way to read the whole bam file line by line(can get the alignments for given genomic regions). Any suggestion will be appreciated. BTW,I have used IO.poen("samtools view sample1.bam").each do {|x| ...},however it will put the whole bam file into the memory first.

bam file • 2.2k views
ADD COMMENTlink written 8.9 years ago by Gangcai230

Really? At least in C, the whole idea of popen() is NOT to read the whole file into memory.

ADD REPLYlink written 8.9 years ago by lh332k
Please log in to add an answer.


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