R: Class '"geneModel"'

geneModel-class {refGenome} | R Documentation

## Class `"geneModel"`

### Description

geneModel represents data for a single gene.

### Usage

    geneModel(object, gene_id, interior=TRUE)

### Arguments

`object` | ensemblGenome or ucscGenome. Genome object from which gene data is extracted.

`gene_id` | One single gene_id

`interior` | When `FALSE`, exon and transcript data skipped.

### Objects from the Class

Objects can be created by calls of the form `.geneModel()`.

### Slots

`gene_id`:

  Object of class `"character"`. ID of one single gene.

`gene_name`:

  Object of class `"character"`. Name of one single gene.

`seq_name`:

  Object of class `"character"`. Name of sequence (chromosome).

`strand`:

  Object of class `"character"`. Strand of one gene.

`transcripts`:

  Object of class `"character"`. Vector of transcript names.

`coords`:

  Object of class `"character"`. Limiting coordinates (start, end) of gene.

`ev`:

  Object of class `"environment"` Environment that contains data structures. Eventually contains list with `transcriptModel` objects.

### Methods

show

  `signature(object = "geneModel")`: Creates a sensible printout.

geneId

  `signature(object= "geneModel"` Returns (or sets) geneId (e.g. Ensembl ID).

geneName

  `signature(object= "geneModel"` Returns (or sets) gene name (e.g. HGNC name).

getTranscript

  `signature(object= "geneModel",i="numeric"` Returns i-th transcript object.

getTranscript

  `signature(object= "geneModel",i="character"` Returns transcript with given name.

### Author(s)

Wolfgang Kaisers

### Examples

    ##-------------------------------------##
    ## A) Ensembl
    ##-------------------------------------##
    ensfile <- system.file("extdata",
                            "hs.ensembl.62.small.RData", package="refGenome")
    ens <- loadGenome(ensfile)

    gt <- getGeneTable(ens)
    gene_id <- as.character(gt$gene_id[1])
    gm <- geneModel(ens, gene_id, interior=TRUE)

    ##-------------------------------------##
    ## B) UCSC
    ##-------------------------------------##
    ucfile <- system.file("extdata", "hs.ucsc.small.RData", package="refGenome")
    uc <- loadGenome(ucfile)
    gt <- getGeneTable(uc)
    gene_id <- as.character(gt$gene_id[1])
    gm <- geneModel(uc, gene_id)
    # Use "+" operator
    res <- gm + gm

[Package refGenome version 1.7.7 Index]