R/getNetworkSuid.R

Defines functions getNetworkSuid

Documented in getNetworkSuid

#' Get the SUID of a network
#'
#' @param network.name name of the network; default is "current" network
#' @param base.url cyrest base url for communicating with cytoscape
#' @return network viewid
#' @export
#' @examples
#' \donttest{
#' getNetworkSuid()
#' getNetworkSuid("myNetwork")
#' }

getNetworkSuid <- function(network.name='current', base.url='http://localhost:1234/v1'){
    cmd<-paste0('network get attribute network="',network.name,'" namespace="default" columnList="SUID"')
    res <- commandRun(cmd,base.url=base.url)
    network.suid <- gsub("\\{SUID:|\\}","",res)
    return(network.suid)
}
cytoscape/r2cytoscape documentation built on May 4, 2019, 6:36 p.m.