getSequenceLengths: Load chromosome sequence lengths for UCSC genome build hg18...

Description Usage Arguments Details Value Author(s) Examples

View source: R/functions.R

Description

Load chromosome sequence lengths for UCSC genome build hg18 or hg19

Usage

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
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)
}

jmacdon/oligoClasses documentation built on Aug. 11, 2020, 12:32 a.m.