BAM2GRanges: Read in a (list of) BAM file(s) into a GRanges(List) object.

Description Usage Arguments Value Author(s) Examples

Description

A wrapper script for coverting the contents of BAM files for use with GenomicRanges classes.

Usage

1
2
3
4
5
6
7
8
  ## S4 method for signature 'character'
BAM2GRanges(path, what = character(),
      flag = scanBamFlag(isUnmappedQuery = FALSE, isDuplicate = FALSE),
      verbose = TRUE)
  ## S4 method for signature 'character'
BAM2GRangesList(paths, what = character(),
      flag = scanBamFlag(isUnmappedQuery = FALSE, isDuplicate = FALSE),
      verbose = TRUE)

Arguments

path

A character vector of length 1. The path of the BAM file.

paths

A character vector of possibly any length. The paths of the BAM files.

what

What optional attributes of a read to retain. See scanBam and the value section.

flag

What kinds of reads to retain. See ScanBamParam and the flag argument.

verbose

Whether to print the progess of processing.

Value

For the single pathname method; a GRanges object. For the multiple pathnames method; a GRangesList object.

Author(s)

Dario Strbenac

Examples

1
2
3
  tiny.BAM <- system.file("extdata", "ex1.bam", package = "Rsamtools")
  if(length(tiny.BAM) > 0)
    print(BAM2GRanges(tiny.BAM))


Search within the Repitools package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.