Description Usage Arguments Details Value Author(s) See Also Examples
sgedges
(resp. sgnodes
) extracts the edges (resp. the nodes)
of the splicing graph of a given gene from a SplicingGraphs object.
1 2 3 4 |
x |
A SplicingGraphs object of length 1. |
txweight |
TODO |
keep.dup.edges |
If |
TODO
TODO
H. Pagès
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.
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 | ## ---------------------------------------------------------------------
## 1. Make SplicingGraphs object 'sg' from toy gene model (see
## '?SplicingGraphs')
## ---------------------------------------------------------------------
example(SplicingGraphs) # create SplicingGraphs object 'sg'
sg
## 'sg' has 1 element per gene and 'names(sg)' gives the gene ids.
names(sg)
## ---------------------------------------------------------------------
## 2. Basic usage
## ---------------------------------------------------------------------
sgedges(sg["geneD"])
sgnodes(sg["geneD"])
outdeg(sg["geneD"])
indeg(sg["geneD"])
## ---------------------------------------------------------------------
## 3. Sanity checks
## ---------------------------------------------------------------------
check_way1_vs_way2 <- function(res1, res2)
{
edges1 <- res1[res1$ex_or_in != "", ] # remove artificial edges
edges2 <- mcols(unlist(res2, use.names=FALSE))
stopifnot(identical(edges1, edges2))
}
for (i in seq_along(sg)) {
sgi <- sg[i]
## After removal of the artificial edges, the edges returned
## by 'sgedges()' should be the same as those returned
## by 'sgedgesByGene()' on a SplicingGraphs object of length 1.
check_way1_vs_way2(
sgedges(sgi),
sgedgesByGene(sgi))
## After removal of the artificial edges, the edges returned
## by 'sgedges( , keep.dup.edges=TRUE)' should be the same as
## those returned by 'sgedgesByGene( , keep.dup.edges=TRUE)' or by
## 'sgedgesByTranscript()' on a SplicingGraphs object of length 1.
res1 <- DataFrame(sgedges(sgi, keep.dup.edges=TRUE))
check_way1_vs_way2(
res1,
sgedgesByGene(sgi, keep.dup.edges=TRUE))
check_way1_vs_way2(
res1,
sgedgesByTranscript(sgi))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.