bam2gr {PICS} | R Documentation |
Reads a bam file using Rsamtools
and extract the reads for each chromosome.
bam2gr(bamFile, chr = NULL, PE = FALSE, verbose = FALSE)
bamFile |
A |
chr |
A |
PE |
A |
verbose |
A |
A GRanges
of all the reads for each chromosome.
The user might encounter a memory allocation error when using bam
files of bigger sizes. Splitting the file by chromosome before calling bam2gr
will solve this issue.
For Paired-End data, non matched reads are discarded.
segmentPICS