SplicingGraphs-class: SplicingGraphs objects

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

The SplicingGraphs class is a container for storing splicing graphs together with the gene model that they are based on.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
## Constructor:

SplicingGraphs(x, grouping=NULL, min.ntx=2, max.ntx=NA, check.introns=TRUE)

## SplicingGraphs basic API:

## S4 method for signature 'SplicingGraphs'
length(x)

## S4 method for signature 'SplicingGraphs'
names(x)

## S4 method for signature 'SplicingGraphs'
seqnames(x)

## S4 method for signature 'SplicingGraphs'
strand(x)

## S4 method for signature 'SplicingGraphs,ANY,ANY'
x[i, j, ... , drop=TRUE]

## S4 method for signature 'SplicingGraphs,ANY,ANY'
x[[i, j, ...]]

## S4 method for signature 'SplicingGraphs'
elementNROWS(x)

## S4 method for signature 'SplicingGraphs'
unlist(x, recursive=TRUE, use.names=TRUE)

## S4 method for signature 'SplicingGraphs'
seqinfo(x)

Arguments

x

For SplicingGraphs: A GRangesList object containing the exons of one or more genes grouped by transcript. Alternatively, x can be a TxDb object. See Details section below.

For the methods in the SplicingGraphs basic API: A SplicingGraphs object.

grouping

An optional object that represents the grouping by gene of the top-level elements (i.e. the transcripts) in x. See Details section below.

min.ntx, max.ntx

Single integers (or NA for max.ntx) specifying the minimum and maximum number of transcripts a gene must have to be considered for inclusion in the object returned by SplicingGraphs. A value of NA for max.ntx means no maximum.

check.introns

If TRUE, SplicingGraphs checks that, within each transcript, exons are ordered from 5' to 3' with gaps of at least 1 nucleotide between them.

i, j, ..., drop

A SplicingGraphs object is a list-like object and therefore it can be subsetted like a list. When subsetting with [, the result is another SplicingGraphs object containing only the selected genes. When subsetting with [[, the result is an unnamed GRangesList object containing the exons grouped by transcript. Like for list, subsetting only accepts 1 argument (i). The drop argument is ignored and trying to pass any additional argument (to j or in ...) will raise an error.

recursive, use.names

A SplicingGraphs object is a list-like object and therefore it can be unlisted with unlist. The result is a GRangesList object containing the exons grouped by transcript. By default this object has names on it, and the names are the gene ids. Note that because each element in this object represents a transcript (and not a gene), the names are not unique. If use.names=FALSE is used, the result has no names on it. The recursive agument is ignored.

Details

The Splicing graph theory only applies to genes that have all the exons of all their transcripts on the same chromosome and strand. In particular, in its current form, the splicing graph theory cannot describe trans-splicing events. The SplicingGraphs constructor will reject genes that do not satisfy this.

The first argument of the SplicingGraphs constructor, x, can be either a GRangesList object or a TxDb object.

When x is a GRangesList object, it must contain the exons of one or more genes grouped by transcripts. More precisely, each top-level element in x must contain the genomic ranges of the exons for a particular transcript. Typically x will be obtained from a TxDb object txdb with exonsBy(txdb, by="tx", use.names=TRUE).

grouping is an optional argument that is only supported when x is a GRangesList object. It represents the grouping by gene of the top-level elements (i.e. the transcripts) in GRangesList object x. It can be either:

Value

For SplicingGraphs: a SplicingGraphs object with 1 element per gene.

For length: the number of genes in x, which is also the number of splicing graphs in x.

For names: the gene ids. Note that the names on a SplicingGraphs object are always unique and cannot be modified.

For seqnames: a named factor of the length of x containing the name of the chromosome for each gene.

For strand: a named factor of the length of x containing the strand for each gene.

For elementNROWS: the number of transcripts per gene.

For seqinfo: the seqinfo of the GRangesList or TxDb object that was used to construct the SplicingGraphs object.

Author(s)

H. Pagès

References

Heber, S., Alekseyev, M., Sze, S., Tang, H., and Pevzner, P. A. Splicing graphs and EST assembly problem Bioinformatics Date: Jul 2002 Vol: 18 Pages: S181-S188

Sammeth, M. (2009) Complete Alternative Splicing Events Are Bubbles in Splicing Graphs J. Comput. Biol. Date: Aug 2009 Vol: 16 Pages: 1117-1140

See Also

This man page is part of the SplicingGraphs package. Please see ?`SplicingGraphs-package` for an overview of the package and for an index of its man pages.

Other topics related to this man page and documented in other packages:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
## ---------------------------------------------------------------------
## 1. Load a toy gene model as a TxDb object
## ---------------------------------------------------------------------

library(GenomicFeatures)
suppressWarnings(
  toy_genes_txdb <- makeTxDbFromGFF(toy_genes_gff())
)

## ---------------------------------------------------------------------
## 2. Compute all the splicing graphs (1 graph per gene) and return them
##    in a SplicingGraphs object
## ---------------------------------------------------------------------

## Extract the exons grouped by transcript:
ex_by_tx <- exonsBy(toy_genes_txdb, by="tx", use.names=TRUE)

## Extract the transcripts grouped by gene:
tx_by_gn <- transcriptsBy(toy_genes_txdb, by="gene")

sg <- SplicingGraphs(ex_by_tx, tx_by_gn)
sg

## Alternatively 'sg' can be constructed directly from the TxDb
## object:
sg2 <- SplicingGraphs(toy_genes_txdb)  # same as 'sg'
sg2

## Note that because SplicingGraphs objects have a slot that is an
## environment (for caching the bubbles), they cannot be compared with
## 'identical()' (will always return FALSE). 'all.equal()' should be
## used instead:
stopifnot(isTRUE(all.equal(sg2, sg)))

## 'sg' has 1 element per gene and 'names(sg)' gives the gene ids:
length(sg)
names(sg)

## ---------------------------------------------------------------------
## 3. Basic manipulation of a SplicingGraphs object
## ---------------------------------------------------------------------

## Basic accessors:
seqnames(sg)
strand(sg)
seqinfo(sg)

## Number of transcripts per gene:
elementNROWS(sg)

## The transcripts of a given gene can be extracted with [[. The result
## is an *unnamed* GRangesList object containing the exons grouped by
## transcript:
sg[["geneD"]]

## See '?plotTranscripts' for how to plot those transcripts.

## The transcripts of all the genes can be extracted with unlist(). The
## result is a *named* GRangesList object containing the exons grouped
## by transcript. The names on the object are the gene ids:
ex_by_tx <- unlist(sg)
ex_by_tx

Bioconductor/SplicingGraphs documentation built on May 20, 2021, 11:19 a.m.