getSequenceLengths {oligoClasses} | R Documentation

## Load chromosome sequence lengths for UCSC genome build hg18 or hg19

### Description

Load chromosome sequence lengths for UCSC genome build hg18 or hg19

### Usage

    getSequenceLengths(build)

### Arguments

`build` | character string: "hg18" or "hg19"

### Details

The chromosome sequence lengths for UCSC builds hg18 and hg19 were extracted from the packages BSgenome.Hsapiens.UCSC.hg18 and BSgenome.Hsapiens.UCSC.hg19, respectively.

### Value

Names integer vector of chromosome lengths.

### Author(s)

R. Scharpf

### Examples

    getSequenceLengths("hg18")
    getSequenceLengths("hg19")

    if(require("GenomicRanges")){
    ## from GenomicRanges
    	sl <- getSequenceLengths("hg18")[c("chr1", "chr2", "chr3")]
    	gr <-
    		GRanges(seqnames =
    			Rle(c("chr1", "chr2", "chr1", "chr3"), c(1, 3, 2, 4)),
    			ranges =
    			IRanges(1:10, width = 10:1, names = head(letters,10)),
    			strand =
    			Rle(strand(c("-", "+", "*", "+", "-")),
    			    c(1, 2, 2, 3, 2)),
    			score = 1:10,
    			GC = seq(1, 0, length=10),
    			seqlengths=sl)
    	metadata(gr) <- list(genome="hg18")
    	gr
    	metadata(gr)
    }

[Package oligoClasses version 1.46.0 Index]