constructBedRanges: constructBedRanges

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

Constructs a GRanges object from a bam/bed/bed.zip file in a consistent way.

Usage

1
2
3
constructBedRanges(filename, filetype = c("bam", "bed", "bed.zip"),
  genomeName = NULL, onlyStdChrs = FALSE, arePeaks = FALSE,
  verbose = FALSE)

Arguments

filename

the complete file path of a bam?bed file.

filetype

the file type bam/bed/bed.zip.

genomeName

the name of the genome used to map the reads (i.e. "mm9"). N.B. if NOT NULL the GRanges Seqinfo will be forced to genomeName Seqinfo (needs Internet access, but strongly suggested!)

onlyStdChrs

flag to keep only standard chromosome.

arePeaks

flag indicating if the file contains peaks.

verbose

flag to obtain verbose output.

Value

a GRanges object.

Examples

1
2
3
4
5
files <- list.files(system.file("extdata/bam/", package="DEScan2"),
                    pattern="bam$", full.names=TRUE)
bgr <- constructBedRanges(files[1], filetype="bam", genomeName="mm9",
                            onlyStdChrs=TRUE)
bgr

DEScan2 documentation built on Nov. 8, 2020, 5:01 p.m.