Entering edit mode
like the title says, I am looking for a concise and high-performance way to extract only the chromosome name and read start position from a BAM file. It can be easily done from outside R like this:
samtools view my.bam |cut -f 3,4
but I want to try it within R code. Calling command via `system` is OK.