getIdeoGR: Get ideogram information

Description Usage Arguments Value Author(s) Examples

View source: R/utils.R

Description

This function tries to parse ideogram information from seqlengths of a GRanges object. This information is usually used to plot chromosome background for kaytogram or esitmate proper lengths of chromosomes from data space for showing overview.

Usage

1
   getIdeoGR(gr)

Arguments

gr

A GRanges object with or without lengths information.

Value

A ideogram GRanges object, each row indicate one single chromosome, and start with 1 and end with real chromosome length or estimated lengths.

Author(s)

Tengfei Yin

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
   library(GenomicRanges)
   data("hg19IdeogramCyto", package = "biovizBase")
   hg19IdeogramCyto
   ## without seqlengths, simply reduce
   getIdeoGR(hg19IdeogramCyto)
   ## with seqlengths
   gr <- GRanges("chr1",  IRanges(1,3))
   seqlevels(gr) <- c("chr1", "chr2", "chr3")
   nms <- c(100, 200, 300)
   names(nms) <- c("chr1", "chr2", "chr3")
   seqlengths(gr) <- nms
   gr
   getIdeoGR(gr)

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