Dear Bioc-Community,
I was wondering if it is currently possible to only import the first X
reads rather than all reads from an arbitrary BAM file into a list using
Rsamtools with scanBam? I did not find any parameter in scanBamParam
that seems to capture what I need. Specifically, I do not want to
specify genomic regions because for arbitrary BAM files, there might not
be any read overlapping. Command-line solutions are also not an option
here because I want to integrate this into the SNPhood package and it
should run on Windows too.
The reason for this task is that I want to automatically determine the
read length from a BAM file, and my currently favoured strategy is to
import the first 1000 reads or so and then determine the maximum length
of the sequence, which should be a good proxy for the real read length.
Thanks for suggestions,
Christian
_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel