bam2gr: Pre-process bam files

Description Usage Arguments Value Note See Also

View source: R/segmentPICS.R

Description

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

Usage

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

Arguments

bamFile

A character. The name of the .bam file to read.

chr

A character. An optional character string. If specified, only the selected chromosome will be returned. Speed up the computation.

PE

A logical. Set to TRUE for paired-end sequencing data.

verbose

A logical. Print additional information about the data.

Value

A GRanges of all the reads for each chromosome.

Note

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.

See Also

segmentPICS


SRenan/PICS documentation built on Jan. 19, 2020, 5:59 a.m.