Learn R Programming

PICS (version 2.16.0)

bam2gr: pre-process bam files

Description

Reads a bam file using Rsamtools and extract the reads for each chromosome.

Usage

bam2gr(bamFile, chr=NULL, PE=FALSE, verbose=FALSE)

Arguments

bamFile
A character string, the name of the .bam file to read.
chr
An optional character string. If specified, only the selected chromosome will be returned. Speed up the computation.
PE
A logical. This should be set to TRUE for paired-end sequencing data.
verbose
A logical. Print additional information about the data.

Value

Returns a GRanges of all the reads for each chromosome.

See Also

segmentPICS