constructBedRanges {DEScan2} | R Documentation

## constructBedRanges

### Description

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

### Usage

    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

    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

[Package DEScan2 version 1.10.0 Index]