Description Usage Arguments Value Examples
This function is not intended to be used directly. Use SBGNview instead. Some input arguments can be better prepared by SBGNview
.
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 | render.sbgn(input.sbgn, output.file, output.formats, sbgn.id.attr,
glyphs.user = list(), arcs.user = list(), arcs.info = "straight",
compartment.layer.info = "original",
user.data = matrix("no.user.data", nrow = 1),
global.parameters.list = NULL, if.write.files = TRUE,
if.plot.svg = TRUE, if.add.stamp = FALSE, key.pos = "topright",
color.panel.scale = 0.7, color.panel.n.grid = 21,
col.gene.high = "red", col.gene.low = "green",
col.gene.mid = "gray", col.cpd.low = "blue",
col.cpd.high = "yellow", col.cpd.mid = "gray", min.gene.value = -1,
max.gene.value = 1, mid.gene.value = 0, min.cpd.value = -1,
max.cpd.value = 1, mid.cpd.value = 0, pathway.name = "",
pathway.name.font.size = 1, if.plot.cardinality = FALSE,
multimer.margin = 5, compartment.opacity = 0.7,
auxiliary.opacity = 1, if.plot.annotation.nodes = FALSE,
inhibition.edge.end.shift = 5, edge.tip.size = 6,
if.use.number.for.long.label = FALSE, label.spliting.string = c(" ",
":", "-", ";", "/", "_"), complex.compartment.label.margin = 8,
if.write.shorter.label.mapping = TRUE, font.size = 3,
logic.node.font.scale = 3, status.node.font.scale = 3,
node.width.adjust.factor = 2, font.size.scale.gene = 3,
font.size.scale.cpd = 3, font.size.scale.complex = 1.1,
font.size.scale.compartment = 1.6,
if.scale.complex.font.size = FALSE,
if.scale.compartment.font.size = FALSE,
node.width.adjust.factor.compartment = 1,
node.width.adjust.factor.complex = 3, text.length.factor = 2,
text.length.factor.macromolecule = 2,
text.length.factor.compartment = 2, text.length.factor.complex = 2,
space.between.color.panel.and.entity = 100)
|
input.sbgn |
A character string. The path to a local SBGN-ML file. |
output.file, output.formats, sbgn.id.attr |
These parameters are the same as the ones in |
glyphs.user |
A list, optional. Each element is a "glyph" object. The element names are glyph IDs (attribute "id" of XHTML element "glyph"). Note this is not affected by parameter "sbgn.id.attr". The glyph elements contain glyph meta-data for plotting (e.g. text size, border width, border color etc.). Please see the glyph object documentation for more information. By default, SBGNview will run without this argument and return a glyph list extracted from the SBGN file. User can then customize this glyph list and assign it to "glyphs.user" in the next SBGNview run to update the graph. |
arcs.user |
A list, optional. Each member is an "arc" object. The element names are arc IDs (the value of "id" attribute in XHTML element "arc" or "arc.spline" in the SBGN-ML file). Some SBGN-ML files have no arc IDs, in this case SBGNview will create an arc ID using "source" and "target" node IDs). The arc object contains arc meta-data for plotting (e.g. arc line width, line color etc.). Please see the arc object documentation for more information. By default, SBGNview() will run without this argument and return an arc list. User can then customize this arc list and assign it to "arcs.user" in the next SBGNview() run to update the arcs. |
arcs.info |
A character string. It should be one of the following: "parse splines", "straight" or a string of svg code of arcs. If it is "parse splines", this function will look for XML element "arc.spline" in the SBGN-ML file and plot spline arcs. If it is "straight", the function will look for element "arc" and plot straight line arcs. If it is a string of svg code, it will write this code directly to the output svg file. |
compartment.layer.info |
A character vector. It is a vector containing the IDs of all compartment glyphs. It determins the layer arrangement of compartments. Compartments will be drawn following their sequence in this vector. Therefore, a compartment that appears later in the vector will be on the front layer and covers the compartments that are before it in this vector. This is important. In some cases compartments have overlap. A glyph laying in the overlapped region belongs to the compartment on the top layer. |
user.data |
A matrix. It holds both gene/protein data and compound data. Rows are gene or compounds, columns are experiments. Row names are gene IDs or compound IDs. The ID types must be the same as the type of glyph ID in the SBGN-ML file. |
global.parameters.list |
List. A record of parameters fed to "render.sbgn" for reuse. It will over-write other parameters. It is not designed to be used directly. |
if.write.files |
Logical. If generate image files. |
if.plot.svg |
Logical. If generate svg or only parse SBGN-ML file. |
if.add.stamp |
Logical. If add stamp on graph saying the source of SBGN-ML file and software that renders it. |
key.pos |
A character string. -Default: "topright" One of "bottomleft" , "bottomright", "topright", "topleft". The location of color panel: lower left, lower right, upper right, upper left |
color.panel.scale |
Numeric. -Default: 1.5 It controls the relative size of color scheme panel. |
color.panel.n.grid |
Numeric. -Default: 101 How many colors does the color scheme show. |
col.gene.high |
A character string. -Default: "red" |
col.gene.low |
A character string. -Default: "green" |
col.gene.mid |
A character string. -Default: "gray" |
col.cpd.low |
A character string. -Default: "blue" |
col.cpd.high |
A character string. -Default: "yellow" |
col.cpd.mid |
A character string. -Default: "gray" |
min.gene.value |
Numeric. -Default: -1 Color panel's min value for gene. Values smaller than this will have the same color as min.value. |
max.gene.value |
Numeric. -Default: 1 |
mid.gene.value |
Numeric. - Default: 0 |
min.cpd.value |
Numeric. -Default: -1 Color panel's min value for compound. Values smaller than this will have the same color as min.value. |
max.cpd.value |
Numeric. -Default: 1 |
mid.cpd.value |
Numeric. -Default: 0 |
pathway.name |
List Containing two elements: 1. pathway name 2. stamp information |
pathway.name.font.size |
Numeric |
if.plot.cardinality |
Logical. If plot cardinality glyphs. |
multimer.margin |
Numeric. -Default: 5 For multimers, they are represented by two partly overlapped shapes (rectangle, ellipse etc.). This parameter controls how much the two shapes overlap. |
compartment.opacity |
Numeric. -Default: 0.9 How transparent the compartments are. |
auxiliary.opacity |
Numeric. -Default: 1 Opacity of auxiliary glyphs. |
if.plot.annotation.nodes |
Logical. -Default: F Some SBGN-ML files have "annotation" glyphs. By default we don't plot them. |
inhibition.edge.end.shift |
Numeric. -Default: 4 The tip of "inhibition" arcs is a line segment. Sometimes it overlaps with target glyph's border. We can shift it along the arc to prevent the overlap. |
edge.tip.size |
Numeric. -Default: 4 |
if.use.number.for.long.label |
Logical. -Default: T If the label is too long, we can create a shorter name for it. e.g. "macromolecule_1". |
label.spliting.string |
A character vector. -Default: c(" ","-",";","/","_") When we split text into multiple lines, these characters will be used to split label (where a new line can be created). |
complex.compartment.label.margin |
-Default: 8 Move the label text vertically for compartment and complex. |
if.write.shorter.label.mapping |
Logical. -Default: T If if.use.number.for.long.label is "T", we can write the mapping between shorter name and the original label to a text file. |
font.size |
Numeric. -Default: 6 Affects font size of all types of glyphs. |
logic.node.font.scale |
Numeric. -Default: 6 Controls the size of logical glyphs ("and", "or", "not" etc.). |
status.node.font.scale |
Numeric. Scale the font size for status variable and unit of information nodes. |
node.width.adjust.factor |
Numeric. -Default: 3 Change font size according to the width of its glyph. If the glyph is too large (e.g. a compartment), its label may look too small. Then we can enlarge the label in proportion to the width of the glyph. It affects all types of glyphs. |
font.size.scale.gene |
Numeric. -Default: 3 Only affect font size of "macromolecule" glyphs. |
font.size.scale.cpd |
Numeric. -Default: 3 Only affects font size of "simple chemical" glyphs. |
font.size.scale.complex |
Numeric |
font.size.scale.compartment |
Numeric |
if.scale.complex.font.size |
Logical. -Default: T Whether we want to scale complex font size according to its width. |
if.scale.compartment.font.size |
Logical. -Default: T Whether scale compartment font size according to its width. |
node.width.adjust.factor.compartment |
Numeric. -Default: 1 How much the font size should change in proportion to the width of compartment. |
node.width.adjust.factor.complex |
Numeric. -Default: 4 How much the font size should change in proportion to the width of complex. |
text.length.factor |
Numeric. -Default: 2 How wide the wrapped text should be. If text is longer than the width controled by this parameter, the text is split into a new line, but only at characters in "label.spliting.string". Controls all glyphs. |
text.length.factor.macromolecule |
Numeric. Controls macromolecles glyphs. |
text.length.factor.compartment |
Numeric |
text.length.factor.complex |
Numeric |
space.between.color.panel.and.entity |
Numeric. -Default: 10 The minimum space between color panel and any other object in the graph. The function will always try to find a location of the color panel to minimize empty space on the whole graph. |
A list of three elements: glyphs.list, arcs.list, global.parameters.list
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ### The function render.sbgn() is not designed to run independently. Use SBGNview() instead.
data(pathways.info)
## Not run:
SBGNview.obj = SBGNview(
simulate.data = TRUE
,sbgn.dir = "./"
,input.sbgn = "P00001"
,output.file = "./test.local.file"
,output.formats = c("pdf")
,min.gene.value = -1
,max.gene.value = 1
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.