buildChromLocation.2 {idiogram} | R Documentation

## A function to generate an instantiation of a chromLocation class

### Description

This function will take the name of a data package and build a chromLocation object representing that data set. It has also been modified to allow further breakup of the chromLocs.

### Usage

      buildChromLocation.2(dataPkg,major=NULL)

### Arguments

`dataPkg` | The name of the data package to be used
`major` | name of major breakpoint by which to divide chromosomes, "arms", "bands", and "mb" currently work.

### Details

The requested data set must be available in the user's `.libPaths()`, and the function will throw an error if this is not the case.

If the data package is present, the necessary information will be extracted from the data package and a `chromLocation` object will be created.

If "major" is set to "arms", the the chromLocs object is populated with data from the chromosome arms; "1p", "1q", "2p", etc... Rat and Human chromsomes follow this pattern , so data packages from both species should work with this function.

If "major" is set to "bands", the chromosomes are divided up based upon which band they fall into.

If "major" is set to "mb", chromosomes are split into 3000+ megabase segments. Note, this creates a very large chromLocation object.

Note, "major" can contain multiple breakpoint names, eg. major=c("arms","bands")

If the "major" argument is used, it stores a list of the extra chromosome names. `chromLoc@chromLocs$armList` - (or `bandList`, `mbList`)

### Value

A `chromLocation` object representing the specified data set.

### Author(s)

Main author: Jeff Gentry with minor additions by: Karl Dykema

### Examples

       ## A bit of a hack to not have a package dependency on hgu95av2
       ## but need to fiddle w/ the warn level to not fail the example anyways.
       curWarn <- getOption("warn")
       options(warn=0)
       on.exit(options(warn=curWarn), add=TRUE)
       if (require(hgu95av2.db) & require(idiogram)) {
         data(Hs.cytoband)
         z <- buildChromLocation.2("hgu95av2.db",major="arms")
       } else print("This example requires the hgu95av2.db data package")

[Package idiogram version 1.58.0 Index]