sgraph-methods {SplicingGraphs} | R Documentation

## Extract a splicing graph as a plottable graph-like object

### Description

Extract the splicing graph for a given gene from a SplicingGraphs object and return it as a plottable graph-like object.

### Usage

    sgraph(x, keep.dup.edges=FALSE, tx_id.as.edge.label=FALSE, as.igraph=FALSE)

    ## PLotting:

    ## S4 method for signature 'SplicingGraphs,missing'
    plot(x, y, ...)
    slideshow(x)

### Arguments

`x` | TODO
`keep.dup.edges` | If `FALSE` (the default), then edges with the same global edge id are merged together. Use `keep.dup.edges=TRUE` if this merging should not be performed.
`tx_id.as.edge.label` | Whether or not to use the transcript ids as edge labels.
`as.igraph` | TODO
`y` | TODO
`...` | Additional arguments. `plot` passes these to `plot,Ragraph,ANY-method` for use in, e.g., adding a `main` title to the plot.

### Details

TODO

### Value

TODO

### Author(s)

H. Pagès

### 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.

### Examples

    example(SplicingGraphs)  # create SplicingGraphs object 'sg'
    sg

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

    graphA <- sgraph(sg["geneA"], tx_id.as.edge.label=TRUE)

    if (interactive()) {
      ## Edges are labeled with the transcript ids (or names), in blue.
      ## The orange arrows are edges corresponding to exons:
      plot(graphA)

      ## Note that plot() works directly on a SplicingGraphs object of
      ## length 1:
      plot(sg["geneB"])

      ## Slideshow of the graphs:
      slideshow(sg)
    }

[Package SplicingGraphs version 1.22.2 Index]