gps2xgmml: Export an 'mds' object to Cytoscape .xgmml format

Description Usage Arguments Details Value Examples


gps2xgmml creates a .xgmml file for visualizing MDS results in Cytoscape. Two-dimensional MDS maps can be visualized in Cytoscape as usual. For three-dimensional maps Cytoscape's 3D Renderer ( is required.


gps2xgmml(x, fname='out.xgmml', names.arg, fontSize=4, col=gplots::col2hex('steelblue'), cex)



Object of class mds


Name of output file


Names for each point. If missing, they're taken from x.


Font size


Fill colour(s) for the plotting symbols. Should be given in hexadecimal, e.g. as returned by function col2hex from gplots. Tips: col2hex('steelblue') looks nice in 2D/3D plots, col2hex('steelblue') looks nice in 2D plots and a bit faded on 3D plots.


Expansion factor for plotting symbols. By default, cex=12 for 2D plots and cex=100 for 3D plots.


The .xgmml file contains the map co-ordinates in 2 or 3 dimensions, depending on the number of dimensions stored in the input mds object. To visualize properly a file with 3D co-ordinates, you need to install Cytoscape's 3D Renderer ( and start Cytoscape following the instructions provided therein.

An .xgmml file with 3D co-ordinates can still be visualized in regular Cytoscape but the z-axis will be ignored.


Generates an .xgmml file that can be opened in Cytoscape (File -> Import -> Network).


#See help(mds) for an example

Example output

Loading required package: GenomicRanges
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,, basename, cbind, colMeans, colSums, colnames,
    dirname,, duplicated, eval, evalq, get, grep, grepl,
    intersect, is.unsorted, lapply, lengths, mapply, match, mget,
    order, paste, pmax,, pmin,, rank, rbind,
    rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which, which.max, which.min

Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':


Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: MASS
Loading required package: changepoint
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

Successfully loaded changepoint package version 2.2.2
 NOTE: Predefined penalty values changed in version 2.2.  Previous penalty values with a postfix 1 i.e. SIC1 are now without i.e. SIC and previous penalties without a postfix i.e. SIC are now with a postfix 0 i.e. SIC0. See NEWS and help files for further details.

chroGPS documentation built on Oct. 31, 2019, 4:52 a.m.