readBamFile: read in bam files

Description Usage Arguments Value Author(s) Examples

Description

wraper for readGAlignments/readGAlignmentsList to read in bam files.

Usage

1
2
3
4
readBamFile(bamFile, which, tag = character(0), what = c("qname", "flag",
  "mapq", "isize", "seq", "qual", "mrnm"),
  flag = scanBamFlag(isSecondaryAlignment = FALSE, isUnmappedQuery = FALSE,
  isNotPassingQualityControls = FALSE), asMates = FALSE, ...)

Arguments

bamFile

character(1). Bam file name.

which

A GRanges, RangesList, or any object that can be coerced to a RangesList, or missing object, from which a IRangesList instance will be constructed. See ScanBamParam.

tag

A vector of characters indicates the tag names to be read. See ScanBamParam.

what

A character vector naming the fields to return. Fields are described on the Rsamtools[scanBam] help page.

flag

An integer(2) vector used to filter reads based on their 'flag' entry. This is most easily created with the Rsamtools[scanBamFlag] helper function.

asMates

logical(1). Paired ends or not

...

parameters used by readGAlignmentsList or readGAlignments

Value

A GAlignmentsList object when asMats=TRUE, otherwise A GAlignments object.

Author(s)

Jianhong Ou

Examples

1
2
3
4
5
library(BSgenome.Hsapiens.UCSC.hg19)
which <- as(seqinfo(Hsapiens)["chr1"], "GRanges")
bamfile <- system.file("extdata", "GL1.bam", 
                       package="ATACseqQC", mustWork=TRUE)
readBamFile(bamfile, which=which, asMates=TRUE)

jaime11/Transcription-Factor-Footprinting documentation built on May 31, 2019, 8:48 p.m.