Code
stringlengths
103
85.9k
Summary
listlengths
0
94
Please provide a description of the function:def getNodes(self, networkId, column, query, verbose=None): response=api(url=self.___url+'networks/'+str(networkId)+'/nodes', PARAMS={'column':column, 'query':query}, method="GET", verbose=verbose, parse_params=False) return response
[ "\n Returns a list of all nodes in the network specified by the `networkId` parameter as SUIDs.\n \n If the `column` and `query` parameters are specified, the results will be limited to rows in the node table where the value in the column specified by the `column` parameter matches the value sp...
Please provide a description of the function:def deleteEdge(self, networkId, edgeId, verbose=None): response=api(url=self.___url+'networks/'+str(networkId)+'/edges/'+str(edgeId)+'', method="DELETE", verbose=verbose) return response
[ "\n Deletes the edge specified by the `edgeId` and `networkId` parameters.\n\n :param networkId: SUID of the network containing the edge.\n :param edgeId: SUID of the edge\n :param verbose: print more\n\n :returns: default: successful operation\n " ]
Please provide a description of the function:def getFirstNetworkView(self, networkId, file, verbose=None): response=api(url=self.___url+'networks/'+str(networkId)+'/views/first', PARAMS={'file':file}, method="GET", verbose=verbose, parse_params=False) return response
[ "\n This returns the first view of the network. Cytoscape can have multiple views per network model, but this feature is not exposed in the Cytoscape GUI. GUI access is limited to the first available view only.\n \n If the `file` parameter is left unspecified, the response will contain data in ...
Please provide a description of the function:def getAdjEdges(self, networkId, nodeId, verbose=None): response=api(url=self.___url+'networks/'+str(networkId)+'/nodes/'+str(nodeId)+'/adjEdges', method="GET", verbose=verbose, parse_params=False) return response
[ "\n Returns a list of connected edges as SUIDs for the node specified by the `nodeId` and `networkId` parameters.\n\n :param networkId: SUID of the network containing the node\n :param nodeId: SUID of the node\n :param verbose: print more\n\n :returns: 200: successful operation\n ...
Please provide a description of the function:def createNetworkView(self, networkId, verbose=None): PARAMS=set_param(['networkId'],[networkId]) response=api(url=self.___url+'networks/'+str(networkId)+'/views', PARAMS=PARAMS, method="POST", verbose=verbose) return response
[ "\n Creates a new Network View for the Network specified by the `networkId` parameter.\n\n :param networkId: SUID of the Network\n :param verbose: print more\n\n :returns: 201: Network View SUID\n " ]
Please provide a description of the function:def deleteAllNetworkViews(self, networkId, verbose=None): response=api(url=self.___url+'networks/'+str(networkId)+'/views', method="DELETE", verbose=verbose) return response
[ "\n Deletes all Network Views available in the Network specified by the `networkId` parameter. Cytoscape can have multiple views per network model, but this feature is not exposed in the Cytoscape GUI. GUI access is limited to the first available view only.\n\n :param networkId: SUID of the Network\n ...
Please provide a description of the function:def getNetworkVisualProps(self, networkId, viewId, verbose=None): response=api(url=self.___url+'networks/'+str(networkId)+'/views/'+str(viewId)+'/network', method="GET", verbose=verbose, parse_params=False) return response
[ "\n Returns a list of the Visual Properties for the Network View specified by the `viewId` and `networkId` parameters.\n \n Additional details on common Visual Properties can be found in the [Basic Visual Lexicon JavaDoc API](http://chianti.ucsd.edu/cytoscape-3.6.1/API/org/cytoscape/view/presen...
Please provide a description of the function:def createGroup(self, networkId, body, verbose=None): PARAMS=set_param(['networkId','body'],[networkId,body]) response=api(url=self.___url+'networks/'+str(networkId)+'/groups', PARAMS=PARAMS, method="POST", verbose=verbose) return response
[ "\n Create a new group in the network specified by the parameter `networkId`. The contents are specified the message body.\n\n :param networkId: SUID of the Network\n :param body: New Group name and contents\n :param verbose: print more\n\n :returns: 200: successful operation\n ...
Please provide a description of the function:def add_edge(self, isDirected=None,name=None,network=None,sourceName=None,targetName=None, verbose=False): network=check_network(self,network,verbose=verbose) PARAMS=set_param(["isDirected","name","network","sourceName","targetName"],\ [isDir...
[ "\n Add a new edge between two existing nodes in a network. The names of the\n nodes must be specified and much match the value in the 'name' column for\n each node.\n\n :param isDirected (string, optional): Whether the edge should be directed\n or not. Even though all edges i...
Please provide a description of the function:def create(self, edgeList=None, excludeEdges=None, networkName=None, nodeList=None, source=None, verbose=False): network=check_network(self,source, verbose=verbose) PARAMS=set_param(["edgeList","excludeEdges","networkName","nodeList","source"], \ ...
[ "\n Create a new network from a list of nodes and edges in an existing source network.\n The SUID of the network and view are returned.\n\n :param edgeList (string, optional): Specifies a list of edges. The keywords\n all, selected, or unselected can be used to specify edges by their...
Please provide a description of the function:def create_empty(self, name=None, renderers=None, RootNetworkList=None, verbose=False): PARAMS=set_param(["name","renderers","RootNetworkList"],[name,renderers,RootNetworkList]) response=api(url=self.__url+"/create empty", PARAMS=PARAMS, method="POST...
[ "\n Create a new, empty network. The new network may be created as part of\n an existing network collection or a new network collection.\n\n :param name (string, optional): Enter the name of the new network.\n :param renderers (string, optional): Select the renderer to use for the\n ...
Please provide a description of the function:def export(self, options=None, OutputFile=None, verbose=False): PARAMS=set_param(["options","OutputFile"],[options,OutputFile]) response=api(url=self.__url+"/export", PARAMS=PARAMS, method="POST", verbose=verbose) return response
[ "\n Export a network to a network file (e.g. XGMML, SIF, etc.)\n\n :param options (string, optional): The format of the output file. = ['CX JSON (*.cx)',\n 'Cytoscape.js JSON (*.cyjs)', 'GraphML files (*.graphml, *.xml)', 'NNF (*.nnf)',\n 'PSI-MI Level 1', 'PSI-MI Level 2.5', 'SI...
Please provide a description of the function:def import_file(self, dataTypeList=None, defaultInteraction=None, delimiters=None, \ delimitersForDataList=None, afile=None, firstRowAsColumnNames=None, \ indexColumnSourceInteraction=None, indexColumnTargetInteraction=None, indexColumnTypeInteraction=None, \...
[ "\n Import a new network from a tabular formatted file type (e.g. csv, tsv,\n Excel, etc.). Use network load file to load network formatted files. This\n command will create a new network collection if no current network collection\n is selected, otherwise it will add the network to the ...
Please provide a description of the function:def list(self, verbose=False): response=api(url=self.__url+"/list", method="POST", verbose=verbose) return response
[ "\n List all of the networks in the current session.\n\n :param verbose: print more\n\n :returns: [ list of network suids ]\n " ]
Please provide a description of the function:def list_attributes(self, namespace=None, network=None, verbose=False): network=check_network(self,network,verbose=verbose) PARAMS=set_param(["namespace","network"],[namespace,network]) response=api(url=self.__url+"/list attributes", PARAMS=P...
[ "\n Returns a list of column names assocated with a network.\n\n :param namespace (string, optional): Node, Edge, and Network objects\n support the default, local, and hidden namespaces. Root networks also\n support the shared namespace. Custom namespaces may be specified\n ...
Please provide a description of the function:def load_file(self, afile=None, verbose=False): PARAMS=set_param(["file"],[afile]) response=api(url=self.__url+"/load file", PARAMS=PARAMS, method="POST", verbose=verbose) return response
[ "\n Load a new network from a network file type (e.g. SIF, XGMML, etc.).\n Use network import file to load networks from Excel or csv files. This\n command will create a new network collection if no current network collection\n is selected, otherwise it will add the network to the curren...
Please provide a description of the function:def load_url(self, url=None, verbose=False): PARAMS=set_param(["url"],[url]) response=api(url=self.__url+"/load url", PARAMS=PARAMS, method="POST", verbose=verbose) return response
[ "\n Load a new network from a URL that points to a network file type (e.g.\n SIF, XGMML, etc.). Use network import url to load networks from Excel or\n csv files. This command will create a new network collection if no current\n network collection is selected, otherwise it will add the n...
Please provide a description of the function:def rename(self, name=None, sourceNetwork=None, verbose=False): sourceNetwork=check_network(self,sourceNetwork,verbose=verbose) PARAMS=set_param(["name","sourceNetwork"],[name,sourceNetwork]) response=api(url=self.__url+"/rename", PARAMS=PARA...
[ "\n Rename an existing network. The SUID of the network is returned\n\n :param name (string): Enter a new title for the network\n :param sourceNetwork (string): Specifies a network by name, or by SUID\n if the prefix SUID: is used. The keyword CURRENT, or a blank value\n c...
Please provide a description of the function:def select(self, adjacentEdges=None, edgeList=None, extendEdges=None, firstNeighbors=None, \ invert=None, network=None, nodeList=None, verbose=False): network=check_network(self,network,verbose=verbose) PARAMS=set_param(["adjacentEdges","edge...
[ "\n Select nodes and/or edges in a network. This command provides options to\n invert the selection, add first neighbors, add adjacent edges of selected\n nodes, and add adjacent nodes of selected edges\n\n :param adjacentEdges (string, optional): If 'true', then select any edges\n ...
Please provide a description of the function:def new(self, verbose=False): response=api(url=self.__url+"/new", verbose=verbose) return response
[ "\n Destroys the current session and creates a new, empty one.\n\n :param wid: Window ID\n :param verbose: print more\n " ]
Please provide a description of the function:def open(self, session_file=None,session_url=None, verbose=False): PARAMS=set_param(["file", "url"],[session_file, session_url]) response=api(url=self.__url+"/open", PARAMS=PARAMS, verbose=verbose) return response
[ "\n Opens a session from a local file or URL.\n\n :param session_file: The path to the session file (.cys) to be loaded.\n :param session_url: A URL that provides a session file.\n :param verbose: print more\n " ]
Please provide a description of the function:def save(self, session_file, verbose=False): PARAMS={"file":session_file} response=api(url=self.__url+"/save", PARAMS=PARAMS, verbose=verbose) return response
[ "\n Saves the current session to an existing file, which will be replaced.\n If this is a new session that has not been saved yet, use 'save as'\n instead.\n\n :param session_file: The path to the file where the current session\n must be saved to.\n :param verbose: print mo...
Please provide a description of the function:def createSessionFile(self, file, verbose=None): PARAMS=set_param(['file'],[file]) response=api(url=self.___url+'session', PARAMS=PARAMS, method="POST", verbose=verbose) return response
[ "\n Saves the current session to a file. If successful, the session file location will be returned.\n\n :param file: Session file location as an absolute path\n :param verbose: print more\n\n :returns: 200: successful operation\n " ]
Please provide a description of the function:def deleteSession(self, verbose=None): response=api(url=self.___url+'session', method="DELETE", verbose=verbose) return response
[ "\n This deletes the current session and initializes a new one. A message is returned to indicate the success of the deletion.\n\n :param verbose: print more\n\n :returns: 200: successful operation\n " ]
Please provide a description of the function:def getSessionFromFile(self, file, verbose=None): response=api(url=self.___url+'session', PARAMS={'file':file}, method="GET", verbose=verbose, parse_params=False) return response
[ "\n Loads a session from a local file and returns the session file name\n\n :param file: Session file location as an absolute path\n :param verbose: print more\n\n :returns: 200: successful operation\n " ]
Please provide a description of the function:def apply(self, styles=None, verbose=False): PARAMS=set_param(["styles"],[styles]) response=api(url=self.__url+"/apply", PARAMS=PARAMS, method="POST", verbose=verbose) return response
[ "\n Applies the specified style to the selected views and returns the\n SUIDs of the affected views.\n\n :param styles (string): Name of Style to be applied to the selected\n views. = ['Directed', 'BioPAX_SIF', 'Bridging Reads Histogram:unique_0',\n 'PSIMI 25 Style', 'Cove...
Please provide a description of the function:def create_style(self,title=None,defaults=None,mappings=None,verbose=VERBOSE): u=self.__url host=u.split("//")[1].split(":")[0] port=u.split(":")[2].split("/")[0] version=u.split(":")[2].split("/")[1] if defaults: ...
[ "\n Creates a new visual style\n\n :param title: title of the visual style\n :param defaults: a list of dictionaries for each visualProperty\n :param mappings: a list of dictionaries for each visualProperty\n :param host: cytoscape host address, default=cytoscape_host\n :pa...
Please provide a description of the function:def update_style(self, title=None,defaults=None,mappings=None, verbose=False): u=self.__url host=u.split("//")[1].split(":")[0] port=u.split(":")[2].split("/")[0] version=u.split(":")[2].split("/")[1] if defaults: ...
[ "\n Updates a visual style\n\n :param title: title of the visual style\n :param defaults: a list of dictionaries for each visualProperty\n :param mappings: a list of dictionaries for each visualProperty\n\n :returns: nothing\n " ]
Please provide a description of the function:def mapVisualProperty(self, visualProperty=None,mappingType=None, mappingColumn=None, lower=None,center=None,upper=None,\ discrete=None,\ network="current",table="node",\ namespac...
[ "\"\n Generates a dictionary for a given visual property\n\n :param visualProperty: visualProperty\n :param mappingType: mappingType\n :param mappingColumn: mappingColumn\n :param lower: for \"continuous\" mappings a list of the form [value,rgb_string]\n :param center: for ...
Please provide a description of the function:def simple_defaults(self, defaults_dic): defaults=[] for d in defaults_dic.keys(): dic={} dic["visualProperty"]=d dic["value"]=defaults_dic[d] defaults.append(dic) return defaults
[ "\n Simplifies defaults.\n\n :param defaults_dic: a dictionary of the form { visualProperty_A:value_A, visualProperty_B:value_B, ..}\n\n :returns: a list of dictionaries with each item corresponding to a given key in defaults_dic\n " ]
Please provide a description of the function:def attribute_circle(self, EdgeAttribute=None, network=None, \ NodeAttribute=None, nodeList=None, singlePartition=None,\ spacing=None, verbose=False): network=check_network(self,network,verbose=verbose) PARAMS=set_param(["EdgeAttribute","network","NodeAttribute","no...
[ "\n\t\tExecute the Attribute Circle Layout on a network.\n\n\t\t:param EdgeAttribute (string, optional): The name of the edge column\n\t\t\tcontaining numeric values that will be used as weights in the layout\n\t\t\talgorithm. Only columns containing numeric values are shown\n\t\t:param network (string, optional): ...
Please provide a description of the function:def attributes_layout(self, EdgeAttribute=None, maxwidth=None, minrad=None, \ network=None, NodeAttribute=None,nodeList=None, radmult=None, \ spacingx=None, spacingy=None, verbose=False): network=check_network(self,network,verbose=verbose) PARAMS=set_param(["EdgeAtt...
[ "\n\t\tExecute the Group Attributes Layout on a network\n\n\t\t:param EdgeAttribute (string, optional): The name of the edge column\n\t\t\tcontaining numeric values that will be used as weights in the layout\n\t\t\t\talgorithm. Only columns containing numeric values are shown\n\t\t:param maxwidth (string, optional)...
Please provide a description of the function:def circular(self,EdgeAttribute=None,leftEdge=None,network=None,\ NodeAttribute=None,nodeHorizontalSpacing=None,nodeList=None,\ nodeVerticalSpacing=None,rightMargin=None,singlePartition=None,topEdge=None,\ verbose=None): network=check_network(self,network,verbose=ver...
[ "\n\t\tExecute the Circular Layout on a network\n\n\t\t:param EdgeAttribute (string, optional): The name of the edge column contai\n\t\t\tning numeric values that will be used as weights in the layout algor\n\t\t\tithm. Only columns containing numeric values are shown\n\t\t:param leftEdge (string, optional): Left e...
Please provide a description of the function:def copycat(self,gridUnmapped=None,selectUnmapped=None,sourceColumn=None,\ sourceNetwork=None,targetColumn=None,targetNetwork=None,verbose=None): PARAMS=set_param(['gridUnmapped','selectUnmapped','sourceColumn',\ 'sourceNetwork','targetColumn','targetNetwork'],[gridU...
[ "\n\t\tSets the coordinates for each node in the target network to the coordinates\n\t\tof a matching node in the source network.\n\t\tOptional parameters such as gridUnmapped and selectUnmapped determine\n\t\tthe behavior of target network nodes that could not be matched.\n\n\t\t:param gridUnmapped (string, option...
Please provide a description of the function:def cose(self,compoundGravityRange=None,compoundGravityStrength=None,\ EdgeAttribute=None,gravityRange=None,gravityStrength=None,idealEdgeLength=None,\ incremental=None,LayoutQuality=None,network=None,NodeAttribute=None,\ nodeList=None,repulsionStrength=None,smartEdgeL...
[ "\n\t\tExecute the Compound Spring Embedder (CoSE) on a network\n\n\t\t:param compoundGravityRange (string, optional): Compound gravity range (0-1\n\t\t\t00)\n\t\t:param compoundGravityStrength (string, optional): Compound gravity strengt\n\t\t\th (0-100)\n\t\t:param EdgeAttribute (string, optional): The name of th...
Please provide a description of the function:def degree_circle(self,EdgeAttribute=None,network=None,NodeAttribute=None,\ nodeList=None,singlePartition=None,verbose=None): network=check_network(self,network,verbose=verbose) PARAMS=set_param(['EdgeAttribute','network','NodeAttribute','nodeList',\ 'singlePartit...
[ "\n\t\tExecute the Degree Sorted Circle Layout on a network.\n\n\t\t:param EdgeAttribute (string, optional): The name of the edge column contai\n\t\t\tning numeric values that will be used as weights in the layout algor\n\t\t\tithm. Only columns containing numeric values are shown\n\t\t:param network (string, optio...
Please provide a description of the function:def force_directed(self,defaultEdgeWeight=None,defaultNodeMass=None,\ defaultSpringCoefficient=None,defaultSpringLength=None,EdgeAttribute=None,\ isDeterministic=None,maxWeightCutoff=None,minWeightCutoff=None,network=None,\ NodeAttribute=None,nodeList=None,numIteration...
[ "\n\t\tExecute the Prefuse Force Directed Layout on a network\n\n\t\t:param defaultEdgeWeight (string, optional): The default edge weight to con\n\t\t\tsider, default is 0.5\n\t\t:param defaultNodeMass (string, optional): Default Node Mass, in numeric va\n\t\t\tlue\n\t\t:param defaultSpringCoefficient (string, opti...
Please provide a description of the function:def fruchterman_rheingold(self,attraction_multiplier=None,conflict_avoidance=None,\ defaultEdgeWeight=None,EdgeAttribute=None,gravity_multiplier=None,\ layout3D=None,max_distance_factor=None,maxWeightCutoff=None,minWeightCutoff=None,\ network=None,nIterations=None,Node...
[ "\n\t\tExecute the Edge-weighted Force directed (BioLayout) on a network\n\n\t\t:param attraction_multiplier (string, optional): Divisor to calculate the a\n\t\t\tttraction force, in numeric value\n\t\t:param conflict_avoidance (string, optional): Constant force applied to avo\n\t\t\tid conflicts, in numeric value\...
Please provide a description of the function:def genemania_force_directed(self,curveSteepness=None,defaultEdgeWeight=None,\ defaultSpringCoefficient=None,defaultSpringLength=None,EdgeAttribute=None,\ ignoreHiddenElements=None,isDeterministic=None,maxNodeMass=None,\ maxWeightCutoff=None,midpointEdges=None,minNodeM...
[ "\n\t\tExecute the GeneMANIA Force Directed Layout on a network.\n\n\t\t:param curveSteepness (string, optional):\n\t\t:param defaultEdgeWeight (string, optional): The default edge weight to con\n\t\t\tsider, default is 0.5\n\t\t:param defaultSpringCoefficient (string, optional):\n\t\t:param defaultSpringLength (st...
Please provide a description of the function:def get_preferred(self,network=None,verbose=None): network=check_network(self,network,verbose=verbose) PARAMS=set_param(['network'],[network]) response=api(url=self.__url+"/get preferred", PARAMS=PARAMS, method="POST", verbose=verbose) return response
[ "\n\t\tReturns the name of the current preferred layout or empty string if not\n\t\tset. Default is grid.\n\n\t\t:param network (string, optional): Gets the name of the current preferred l\n\t\t\tayout\n\t\t" ]
Please provide a description of the function:def grid(self,EdgeAttribute=None,network=None,NodeAttribute=None,\ nodeHorizontalSpacing=None,nodeList=None,nodeVerticalSpacing=None,verbose=None): network=check_network(self,network,verbose=verbose) PARAMS=set_param(['EdgeAttribute','network','NodeAttribute',\ 'n...
[ "\n\t\tExecute the Grid Layout on a network.\n\n\t\t:param EdgeAttribute (string, optional): The name of the edge column contai\n\t\t\tning numeric values that will be used as weights in the layout algor\n\t\t\tithm. Only columns containing numeric values are shown\n\t\t:param network (string, optional): Specifies ...
Please provide a description of the function:def hierarchical(self,bandGap=None,componentSpacing=None,EdgeAttribute=None,\ leftEdge=None,network=None,NodeAttribute=None,nodeHorizontalSpacing=None,\ nodeList=None,nodeVerticalSpacing=None,rightMargin=None,topEdge=None,\ verbose=None): network=check_network(sel...
[ "\n\t\tExecute the Hierarchical Layout on a network.\n\n\t\t:param bandGap (string, optional): Band gap, in numeric value\n\t\t:param componentSpacing (string, optional): Component spacing, in numeric v\n\t\t\talue\n\t\t:param EdgeAttribute (string, optional): The name of the edge column contai\n\t\t\tning numeric ...
Please provide a description of the function:def isom(self,coolingFactor=None,EdgeAttribute=None,initialAdaptation=None,\ maxEpoch=None,minAdaptation=None,minRadius=None,network=None,NodeAttribute=None,\ nodeList=None,radius=None,radiusConstantTime=None,singlePartition=None,\ sizeFactor=None,verbose=None): n...
[ "\n\t\tExecute the Inverted Self-Organizing Map Layout on a network.\n\n\t\t:param coolingFactor (string, optional): Cooling factor, in numeric value\n\t\t:param EdgeAttribute (string, optional): The name of the edge column contai\n\t\t\tning numeric values that will be used as weights in the layout algor\n\t\t\tit...
Please provide a description of the function:def kamada_kawai(self,defaultEdgeWeight=None,EdgeAttribute=None,\ m_anticollisionSpringStrength=None,m_averageIterationsPerNode=None,\ m_disconnectedNodeDistanceSpringRestLength=None,\ m_disconnectedNodeDistanceSpringStrength=None,m_layoutPass=None,\ m_nodeDistanceRe...
[ "\n\t\tExecute the Edge-weighted Spring Embedded Layout on a network.\n\n\t\t:param defaultEdgeWeight (string, optional): The default edge weight to con\n\t\t\tsider, default is 0.5\n\t\t:param EdgeAttribute (string, optional): The name of the edge column contai\n\t\t\tning numeric values that will be used as weigh...
Please provide a description of the function:def set_preferred(self,preferredLayout=None,verbose=None): PARAMS=set_param(['preferredLayout'],[preferredLayout]) response=api(url=self.__url+"/set preferred", PARAMS=PARAMS, method="POST", verbose=verbose) return response
[ "\n\t\tSets the preferred layout. Takes a specific name as defined in the API\n\t\tDefault is grid.\n\n\t\t:param preferredLayout (string, optional): Layout to use as preferred, for\n\t\t\tallowed names see Layout API\n\t\t" ]
Please provide a description of the function:def stacked_node_layout(self,EdgeAttribute=None,network=None,NodeAttribute=None,\ nodeList=None,x_position=None,y_start_position=None,verbose=None): network=check_network(self,network,verbose=verbose) PARAMS=set_param(['EdgeAttribute','network','NodeAttribute','node...
[ "\n\t\tExecute the Stacked Node Layout on a network.\n\n\t\t:param EdgeAttribute (string, optional): The name of the edge column contai\n\t\t\tning numeric values that will be used as weights in the layout algor\n\t\t\tithm. Only columns containing numeric values are shown\n\t\t:param network (string, optional): Sp...
Please provide a description of the function:def create_column(self,columnName=None,listType=None,table=None,ntype=None,verbose=None): PARAMS=set_param(['columnName','listType','table','type'],[columnName,\ listType,table,ntype]) response=api(url=self.__url+"/create column", PARAMS=PARA...
[ "\n Appends an additional column of attribute values to the current table.\n\n :param columnName (string, optional): The new column name\n :param listType (string, optional): Can be one of integer, long, double, or\n string.\n :param table (string, optional): Specifies a t...
Please provide a description of the function:def create_table(self,keyColumn=None,keyColumnType=None,title=None,verbose=None): PARAMS=set_param(['keyColumn','keyColumnType','title'],[keyColumn,\ keyColumnType,title]) response=api(url=self.__url+"/create table", PARAMS=PARAMS, method="PO...
[ "\n Adds a new table to the network.\n\n :param keyColumn (string, optional): Specifies the name of a column in the\n table\n :param keyColumnType (string, optional): The syntactical type of the value\n used in the key\n :param title (string, optional): The name of ...
Please provide a description of the function:def delete_column(self,column=None,table=None,verbose=None): PARAMS=set_param(['column','table'],[column,table]) response=api(url=self.__url+"/delete column", PARAMS=PARAMS, method="POST", verbose=verbose) return response
[ "\n Remove a column from a table, specified by its name. Returns the name of\n the column removed.\n\n :param column (string, optional): Specifies the name of a column in the tab\n le\n :param table (string, optional): Specifies a table by table name. If the pr\n ef...
Please provide a description of the function:def delete_row(self,keyValue=None,table=None,verbose=None): PARAMS=set_param(['keyValue','table'],[keyValue,table]) response=api(url=self.__url+"/delete row", PARAMS=PARAMS, method="POST", verbose=verbose) return response
[ "\n Deletes a row from a table.Requires the table name or SUID and the row key.\n\n :param keyValue (string): Specifies the primary key of a value in the row o\n f a table\n :param table (string, optional): Specifies a table by table name. If the pr\n efix SUID: is used, t...
Please provide a description of the function:def get_value(self,column=None,keyValue=None,table=None,verbose=None): PARAMS=set_param(['column','keyValue','table'],[column,keyValue,table]) response=api(url=self.__url+"/get value", PARAMS=PARAMS, method="POST", verbose=verbose) return res...
[ "\n Returns the value from a cell as specified by row and column ids.\n\n :param column (string, optional): Specifies the name of a column in the tab\n le\n :param keyValue (string, optional): Specifies a row of a table using the pr\n imary key as the indentifier\n ...
Please provide a description of the function:def import_url(self,caseSensitiveNetworkCollectionKeys=None,\ caseSensitiveNetworkKeys=None,dataTypeList=None,\ DataTypeTargetForNetworkCollection=None,DataTypeTargetForNetworkList=None,\ delimiters=None,delimitersForDataList=None,firstRowAsColumnName...
[ "\n Similar to Import Table this uses a long list of input parameters to\n specify the attributes of the table, the mapping keys, and the destination\n table for the input.\n\n :param caseSensitiveNetworkCollectionKeys (string, optional): Determines wh\n ether capitalization i...
Please provide a description of the function:def list_tables(self,includePrivate=None,namespace=None,atype=None,verbose=None): PARAMS=set_param(['includePrivate','namespace','type'],\ [includePrivate,namespace,atype]) response=api(url=self.__url+"/list", PARAMS=PARAMS, method="POST", ve...
[ "\n Returns a list of the table SUIDs associated with the passed network parameter.\n\n :param includePrivate (string, optional): A boolean value determining wheth\n er to return private as well as public tables\n :param namespace (string, optional): An optional argument to contrain ...
Please provide a description of the function:def list_columns(self,table=None,verbose=None): PARAMS=set_param(['table'],[table]) response=api(url=self.__url+"/list columns", PARAMS=PARAMS, method="POST", verbose=verbose) return response
[ "\n Returns the list of columns in the table.\n\n :param table (string, optional): Specifies a table by table name. If the pr\n efix SUID: is used, the table corresponding the SUID will be returne\n d.\n :returns: list of columns in the table.\n " ]
Please provide a description of the function:def list_rows(self,rowList=None,table=None,verbose=None): PARAMS=set_param(['rowList','table'],[rowList,table]) response=api(url=self.__url+"/list rows", PARAMS=PARAMS, method="POST", verbose=verbose) return response
[ "\n Returns the list of primary keys for each of the rows in the specified table.\n\n :param rowList (string, optional): Specifies a list of rows. The pattern CO\n LUMN:VALUE sets this parameter to any rows that contain the specifie\n d column value; if the COLUMN prefix is not u...
Please provide a description of the function:def merge(self,DataTypeTargetForNetworkCollection=None,\ dataTypeTargetForNetworkList=None,mergeType=None,SourceMergeColumns=None,\ SourceMergeKey=None,SourceTable=None,TargetKeyNetworkCollection=None,\ TargetMergeKey=None,TargetNetworkCollection=None...
[ "\n Merge tables together joining around a designated key column. Depending\n on the arguments, might merge into multiple local tables.\n\n :param DataTypeTargetForNetworkCollection (string, optional): The collectio\n n of networks where the merged table will reside\n :param d...
Please provide a description of the function:def rename_column(self,columnName=None,newColumnName=None,table=None,verbose=None): PARAMS=set_param(['columnName','newColumnName','table'],[columnName,newColumnName,table]) response=api(url=self.__url+"/rename column", PARAMS=PARAMS, method="POST", ...
[ "\n Changes the name of a specified column in the table.\n\n :param columnName (string): The name of the column that will be renamed.\n :param newColumnName (string): The new name of the column.\n :param table (string, optional): Specifies a table by table name. If the pr\n ef...
Please provide a description of the function:def set_title(self,table=None,title=None,verbose=None): PARAMS=set_param(['table','title'],[table,title]) response=api(url=self.__url+"/set title", PARAMS=PARAMS, method="POST", verbose=verbose) return response
[ "\n Changes the visible identifier of a single table.\n\n :param table (string, optional): Specifies a table by table name. If the pr\n efix SUID: is used, the table corresponding the SUID will be returne\n d.\n :param title (string, optional): The name of the table used i...
Please provide a description of the function:def set_values(self,columnName=None,rowList=None,table=None,value=None,verbose=None): PARAMS=set_param(['columnName','rowList','table','value'],[columnName,rowList,table,value]) response=api(url=self.__url+"/set values", PARAMS=PARAMS, method="POST",...
[ "\n Set all the values in the specified list of rows with a single value.\n\n :param columnName (string, optional): Specifies the name of a column in the\n table\n :param rowList (string, optional): Specifies a list of rows. The pattern CO\n LUMN:VALUE sets this parame...
Please provide a description of the function:def getTable(self, columns=None, table=None, network = "current", namespace='default', verbose=VERBOSE): u=self.__url host=u.split("//")[1].split(":")[0] port=u.split(":")[2].split("/")[0] version=u.split(":")[2].split("/")[1] ...
[ "\n Gets tables from cytoscape.\n\n :param table: table to retrieve eg. node\n :param columns: columns to retrieve in list format\n :param network (string, optional): Specifies a network by name, or by\n SUID if the prefix SUID: is used. The keyword CURRENT, or a blank\n ...
Please provide a description of the function:def loadTableData(self, df, df_key='index',table="node", table_key_column = "name", \ network="current",namespace="default",verbose=False): u=self.__url host=u.split("//")[1].split(":")[0] port=u.split(":")[2].split("/")[0] ...
[ "\n Loads tables into cytoscape.\n\n :param df: a pandas dataframe to load\n :param df_key: key column in df, default=\"index\"\n :param table: target table, default=\"node\"\n :param table_key_column: table key column, default=\"name\"\n :param network (string, optional): ...
Please provide a description of the function:def getTableCount(verbose=None): response=api(url=self.url+'tables/count', method="GET", verbose=verbose, parse_params=False) return response
[ "\n Returns the number of global tables.\n\n :param verbose: print more\n\n :returns: 200: successful operation\n " ]
Please provide a description of the function:def set_value(self, visual_property, value): if visual_property is None or value is None: raise ValueError('Both VP and value are required.') new_value = [ { 'visualProperty': visual_property, ...
[ "Set a single Visual Property Value\n\n :param visual_property: Visual Property ID\n :param value: New value for the VP\n :return: None\n " ]
Please provide a description of the function:def set_values(self, values): if values is None: raise ValueError('Values are required.') new_values = [] for vp in values.keys(): new_val = { 'visualProperty': vp, 'value': values[vp] ...
[ "\n Set multiple Visual properties at once.\n\n :param values:\n :return:\n " ]
Please provide a description of the function:def get_value(self, visual_property): res = requests.get(self.url + '/' + visual_property) return res.json()['value']
[ "Get a value for the Visual Property\n\n :param visual_property:\n :return:\n " ]
Please provide a description of the function:def get_values(self): results = requests.get(self.url).json() values = {} for entry in results: values[entry['visualProperty']] = entry['value'] return values
[ "Get all visual property values for the object\n\n :return: dictionary of values (VP ID - value)\n " ]
Please provide a description of the function:def update_network_view(self, visual_property=None, value=None): new_value = [ { "visualProperty": visual_property, "value": value } ] res = requests.put(self.__url + '/network', ...
[ "\n Updates single value for Network-related VP.\n\n :param visual_property:\n :param value:\n :return:\n " ]
Please provide a description of the function:def applyLayout(self, algorithmName, networkId, column, verbose=None): response=api(url=self.___url+'apply/layouts/'+str(algorithmName)+'/'+str(networkId)+'', PARAMS={'column':column}, method="GET", verbose=verbose, parse_params=False) return respon...
[ "\n Applies the Layout specified by the `algorithmName` parameter to the Network specified by the `networkId` parameter. If the Layout is has an option to use a Column, it can be specified by the `column` parameter.\n\n :param algorithmName: Name of layout algorithm\n :param networkId: SUID of ...
Please provide a description of the function:def copyCurrentLayout(self, sourceViewSUID, targetViewSUID, body, verbose=None): response=api(url=self.___url+'apply/layouts/copycat/'+str(sourceViewSUID)+'/'+str(targetViewSUID)+'', method="PUT", body=body, verbose=verbose) return response
[ "\n Copy one network view layout onto another, setting the node location and view scale to match. This makes visually comparing networks simple.\n\n :param sourceViewSUID: Source network view SUID (or \"current\")\n :param targetViewSUID: Target network view SUID (or \"current\")\n :para...
Please provide a description of the function:def applyStyle(self, styleName, networkId, verbose=None): response=api(url=self.___url+'apply/styles/'+str(styleName)+'/'+str(networkId)+'', method="GET", verbose=verbose, parse_params=False) return response
[ "\n Applies the Visual Style specified by the `styleName` parameter to the network specified by the `networkId` parameter.\n\n :param styleName: Name of the Visual Style\n :param networkId: SUID of the Network\n :param verbose: print more\n\n :returns: 200: successful operation\n ...
Please provide a description of the function:def updateLayoutParameters(self, algorithmName, body, verbose=None): response=api(url=self.___url+'apply/layouts/'+str(algorithmName)+'/parameters', method="PUT", body=body, verbose=verbose) return response
[ "\n Updates the Layout parameters for the Layout algorithm specified by the `algorithmName` parameter.\n\n :param algorithmName: Name of the layout algorithm\n :param body: A list of Layout Parameters with Values.\n :param verbose: print more\n\n :returns: default: successful oper...
Please provide a description of the function:def getLayout(self, algorithmName, verbose=None): response=api(url=self.___url+'apply/layouts/'+str(algorithmName)+'', method="H", verbose=verbose, parse_params=False) return response
[ "\n Returns all the details, including names, parameters, and compatible column types for the Layout algorithm specified by the `algorithmName` parameter.\n\n :param algorithmName: Name of the Layout algorithm\n :param verbose: print more\n\n :returns: 200: successful operation\n ...
Please provide a description of the function:def updateNetworkInNdex(self, suid, body, verbose=None): surl=self.___url sv=surl.split('/')[-1] surl=surl.rstrip(sv+'/') response=api(url=surl+'/cyndex2/'+sv+'/networks/'+str(suid)+'', method="PUT", body=body, verbose=verbose) ...
[ "\n Update an NDEx network.\n\n :param suid: Cytoscape Collection/Subnetwork SUID\n :param body: Properties required to update a network record in NDEx.\n :param verbose: print more\n\n :returns: 200: successful operation; 404: Network does not exist\n " ]
Please provide a description of the function:def saveNetworkToNdex(self, suid, body, verbose=None): surl=self.___url sv=surl.split('/')[-1] surl=surl.rstrip(sv+'/') PARAMS=set_param(['suid','body'],[suid,body]) response=api(url=surl+'/cyndex2/'+sv+'/networks/'+str(suid)...
[ "\n Save a network/collection to NDEx\n\n :param suid: Cytoscape Collection/Subnetwork SUID\n :param body: Properties required to save network to NDEx.\n :param verbose: print more\n\n :returns: 200: successful operation; 404: Network does not exist\n " ]
Please provide a description of the function:def getNetworkSummary(self, suid, verbose=None): surl=self.___url sv=surl.split('/')[-1] surl=surl.rstrip(sv+'/') response=api(url=surl+'/cyndex2/'+sv+'/networks/'+str(suid)+'', method="GET", verbose=verbose, parse_params=False) ...
[ "\n Returns summary of collection containing the specified network.\n\n :param suid: Cytoscape Collection/Subnetwork SUID\n :param verbose: print more\n\n :returns: 200: successful operation\n " ]
Please provide a description of the function:def getAppInfo(self, verbose=None): surl=self.___url sv=surl.split('/')[-1] surl=surl.rstrip(sv+'/') response=api(url=surl+'/cyndex2/v1', method="GET", verbose=verbose, parse_params=False) return response
[ "\n App version and other basic information will be provided.\n\n :param verbose: print more\n\n :returns: 200: successful operation\n " ]
Please provide a description of the function:def updateCurrentNetworkInNdex(self, body, verbose=None): surl=self.___url sv=surl.split('/')[-1] surl=surl.rstrip(sv+'/') response=api(url=surl+'/cyndex2/'+sv+'/networks/current', method="PUT", body=body, verbose=verbose) re...
[ "\n Update current network's record in NDEx\n\n :param body: Properties required to update a network record in NDEx.\n :param verbose: print more\n\n :returns: 200: successful operation; 404: Network does not exist\n " ]
Please provide a description of the function:def saveCurrentNetworkToNdex(self, body, verbose=None): surl=self.___url sv=surl.split('/')[-1] surl=surl.rstrip(sv+'/') PARAMS=set_param(['body'],[body]) response=api(url=surl+'/cyndex2/'+sv+'/networks/current', PARAMS=PARAM...
[ "\n Save current network/collection to NDEx\n\n :param body: Properties required to save current network to NDEx.\n :param verbose: print more\n\n :returns: 200: successful operation; 404: Current network does not exist\n " ]
Please provide a description of the function:def export(self, Height=None, options=None, outputFile=None, Resolution=None,\ Units=None, Width=None, Zoom=None, view="current", verbose=False): PARAMS=set_param(["Height","options","outputFile","Resolution",\ "Units","Width","Zoom","view"],...
[ "\n Exports the current view to a graphics file and returns the path to the\n saved file. PNG and JPEG formats have options for scaling, while other\n formats only have the option 'exportTextAsFont'. For the PDF format,\n exporting text as font does not work for two-byte char...
Please provide a description of the function:def fit_content(self, verbose=False): PARAMS={} response=api(url=self.__url+"/fit content", PARAMS=PARAMS, method="POST", verbose=verbose) return response
[ "\n Zooms out the current view in order to display all of its elements.\n\n :param verbose: print more\n\n " ]
Please provide a description of the function:def get_current(self, layout=None, network=None, verbose=False): PARAMS={} response=api(url=self.__url+"/get_current", PARAMS=PARAMS, method="POST", verbose=verbose) return response
[ "\n Returns the current view or null if there is none.\n\n :param verbose: print more\n\n :returns: current view or null if there is none\n " ]
Please provide a description of the function:def update_defaults(self, prop_value_dict): body = [] for key in prop_value_dict: entry = { 'visualProperty': key, 'value': prop_value_dict[key] } body.append(entry) url = ...
[ "\n Updates the value of one or more visual properties.\n\n :param prop_value_dict: Dictionary containing, for each visual property,\n the new value to use.\n " ]
Please provide a description of the function:def updateDefaults(self, name, body, verbose=None): response=api(url=self.___url+'styles/'+str(name)+'/defaults', method="PUT", body=body, verbose=verbose) return response
[ "\n Updates the default values for the Visual Properties in the Visual Style specified by the `name` parameter.\n \n Additional details on common Visual Properties can be found in the [Basic Visual Lexicon JavaDoc API](http://chianti.ucsd.edu/cytoscape-3.6.1/API/org/cytoscape/view/presentation/...
Please provide a description of the function:def getSingleVisualProperty(self, visualProperty, verbose=None): response=api(url=self.___url+'styles/visualproperties/'+str(visualProperty)+'', method="GET", verbose=verbose, parse_params=False) return response
[ "\n Return the Visual Property specified by the `visualProperty` parameter.\n \n Additional details on common Visual Properties can be found in the [Basic Visual Lexicon JavaDoc API](http://chianti.ucsd.edu/cytoscape-3.6.1/API/org/cytoscape/view/presentation/property/BasicVisualLexicon.html)\n\...
Please provide a description of the function:def createStyle(self, body, verbose=None): PARAMS=set_param(['body'],[body]) response=api(url=self.___url+'styles', PARAMS=PARAMS, method="POST", verbose=verbose) return response
[ "\n Creates a new Visual Style using the message body.\n \n Returns the title of the new Visual Style. If the title of the Visual Style already existed in the session, a new one will be automatically generated and returned.\n\n :param body: The details of the new Visual Style to be creat...
Please provide a description of the function:def deleteAllStyles(self, verbose=None): response=api(url=self.___url+'styles', method="DELETE", verbose=verbose) return response
[ "\n Deletes all vision styles except for default style\n\n :param verbose: print more\n\n :returns: default: successful operation\n " ]
Please provide a description of the function:def getStyle(self, name, verbose=None): response=api(url=self.___url+'styles/'+str(name)+'.json', method="GET", verbose=verbose, parse_params=False) return response
[ "\n Visual Style in [Cytoscape.js CSS](http://js.cytoscape.org/#style) format.\n\n :param name: Name of the Visual Style\n :param verbose: print more\n\n :returns: 200: successful operation\n " ]
Please provide a description of the function:def getStyleCount(self, verbose=None): response=api(url=self.___url+'styles/count', method="GET", verbose=verbose, parse_params=False) return response
[ "\n Returns the number of Visual Styles available in the current session\n\n :param verbose: print more\n\n :returns: 200: successful operation\n " ]
Please provide a description of the function:def deleteMapping(self, name, vpName, verbose=None): response=api(url=self.___url+'styles/'+str(name)+'/mappings/'+str(vpName)+'', method="DELETE", verbose=verbose) return response
[ "\n Deletes the Visual Property mapping specified by the `vpName` and `name` parameters.\n\n :param name: Name of the Visual Style containing the Visual Mapping\n :param vpName: Name of the Visual Property that the Visual Mapping controls\n :param verbose: print more\n\n :returns:...
Please provide a description of the function:def getRangeValues(self, vp, verbose=None): response=api(url=self.___url+'styles/visualproperties/'+str(vp)+'/values', method="GET", verbose=verbose, parse_params=False) return response
[ "\n Returns a list of all available values for the Visual Property specified by the `vp` parameter.\n \n This method is only for Visual Properties with a Discrete Range, such as NODE_SHAPE or EDGE_LINE_TYPE.\n \n Additional details on common Visual Properties can be found in the [...
Please provide a description of the function:def deleteStyle(self, name, verbose=None): response=api(url=self.___url+'styles/'+str(name)+'', method="DELETE", verbose=verbose) return response
[ "\n Deletes the Visual Style specified by the `name` parameter.\n\n :param name: Visual Style Name\n :param verbose: print more\n\n :returns: default: successful operation\n " ]
Please provide a description of the function:def createMappings(self, name, body, verbose=None): PARAMS=set_param(['name','body'],[name,body]) response=api(url=self.___url+'styles/'+str(name)+'/mappings', PARAMS=PARAMS, method="POST", verbose=verbose) return response
[ "\n Create a new Visual Mapping function and add it to the Visual Style specified by the `name` parameter. Existing mappings in the Visual Style will be overidden by the new mappings created.\n \n The types of mapping available in Cytoscape are explained in depth [here](http://manual.cytoscape....
Please provide a description of the function:def updateMapping(self, name, vp, body, verbose=None): response=api(url=self.___url+'styles/'+str(name)+'/mappings/'+str(vp)+'', method="PUT", body=body, verbose=verbose) return response
[ "\n Update the visual mapping specified by the `name` and `vp` parameters.\n \n The types of mapping available in Cytoscape are explained in depth [here](http://manual.cytoscape.org/en/stable/Styles.html#how-mappings-work). An example of the data format for each is included below. For additiona...
Please provide a description of the function:def getMapping(self, name, vp, verbose=None): response=api(url=self.___url+'styles/'+str(name)+'/mappings/'+str(vp)+'', method="GET", verbose=verbose, parse_params=False) return response
[ "\n Returns the Visual Mapping assigned to the Visual Property specified by the `name` and `vp` parameters.\n \n The types of mapping available in Cytoscape are explained in depth [here](http://manual.cytoscape.org/en/stable/Styles.html#how-mappings-work). An example of the data format for each...
Please provide a description of the function:def status(self, verbose=False): try: response=api(url=self.__url, method="GET", verbose=verbose) except Exception as e: print('Could not get status from CyREST:\n\n' + str(e)) else: print('CyREST online!')
[ "\n Checks the status of your CyREST server.\n " ]
Please provide a description of the function:def version(self, verbose=False): response=api(url=self.__url+"version",method="H", verbose=verbose) response=json.loads(response) for k in response.keys(): print(k, response[k])
[ "\n Checks Cytoscape version\n " ]
Please provide a description of the function:def result(self, filetype="PNG", saveas=None, verbose=False): from wand.image import Image as WImage from shutil import copyfile import tempfile from time import sleep import os sleep(1) u=self.__url ...
[ "\n Checks the current network. \n \n :param filetype: file type eg.PDF, PNG, CYS, CYJS; default=\"PNG\" \n :param saveas: /path/to/non/tmp/file.prefix\n :param host: cytoscape host address, default=cytoscape_host\n :param port: cytoscape port, default=1234\n :re...
Please provide a description of the function:def map_column(self, only_use_one=None, source_column=None, species=None, target_selection= None, verbose=False): PARAMS=set_param(["only_use_one","source_column","species","target_selection"],[only_use_one,source_column,species,target_selection]) re...
[ "\n Uses the BridgeDB service to look up analogous identifiers from a wide\n selection of other databases\n\n :param only_use_one (string, optional): When multiple identifiers can be\n mapped from a single term, this forces a singular result\n :param source_column (string): Sp...
Please provide a description of the function:def echo(self, variableName, verbose=False): PARAMS={"variableName":variableName} response=api(url=self.__url+"/echo", PARAMS=PARAMS, verbose=verbose) return response
[ "\n The echo command will display the value of the variable specified by the\n variableName argument, or all variables if variableName is not provided.\n\n :param variableName: The name of the variable or '*' to display the value of all variables.\n :param verbose: print more\n " ...
Please provide a description of the function:def open_dialog(self, verbose=False): response=api(url=self.__url+"/open dialog", verbose=verbose) return response
[ "\n The command line dialog provides a field to enter commands and view\n results. It also provides the help command to display namespaces,\n commands, and arguments.\n\n :param verbose: print more\n " ]