Home » Functions

Functions

Functions available in this version are :

  • Creating and editing pathways
  • Visualizing Data on pathways
  • Performing pathway statistics
  • Exports pathways in various formats
  • Querying pathways to obtain participants

Method Summary

addDataNode Adds a DataNode to a pathway GPML file saved on disk and saves it in the result directory
addDataNodeByURI Adds a DataNode to a Pathway GPML file downloaded by it’s Wikipathwas ID and saves it in the result directory
addLine Adds a Line to a Pathway GPML saved on disk, connecting two DataNodes specified by the IDs of the two DataNodes and saves the changed pathway GPML file in the result directory
addLineByID Adds a Line to a Pathway GPML saved on disk, connecting two DataNodes specified by the unique Graph IDs of the two DataNodes and saves the changed pathway GPML file in the result directory
addLineByIDByURI Adds a Line to a Pathway GPML downloaded from Wikipathways by it’s Wikipathways ID, connecting two DataNodes specified by the unique Graph IDs of the two DataNodes and saves the changed pathway GPML file in the result directory
addLineByURI Adds a Line to a Pathway GPML downloaded from Wikipathways by it’s Wikipathways ID, connecting two DataNodes specified by the IDs of the two DataNodes and saves the changed pathway GPML file in the result directory
annotateElement Annotates DataNodes and Lines to a pathway GPML file saved on disk, with an identifier and data source and saves the pathway GPML file in the result directory. Annotation can also be added while adding DataNodes and Lines
annotateElementByURI Annotates DataNodes and Lines to a Wikipathways pathway downloaded by it’s Wikipathways ID, with an identifier and data source and saves the pathway GPML file in the result directory.
calculatePathwayStatistics Calculate Pathway statistics – overrepresentation analysis
createPathway Creates a new empty pathway GPML file and saves it in the result directory
createVisualization Create a Visualization XML file for DataNodes containing color gradients and rules
exportPathway Creates a image file from the pathway GPML saved in disk and saves it in the result directory
exportPathwayByte Exports a byte array of the image of a pathway GPML file saved on disk
exportPathwayByteFromURI Exports a byte array of the image of a Wikipathways pathway downloaded by it’s Wikipathways ID
exportPathwayFromURI Exports a pathway image of a Wikipathways pathway, provided it’s WikiPathways ID in png, svg or pdf formats
getPathwayByURIParticipants Get the list of participating pathway elements from a pathway GPML file By URI
getPathwayParticipants Get the list of participating pathway elements from a pathway GPML file saved on disk
importData Imports tab delimited data and creates a PGEX file
removeElementById Removes a DataNode or Line by it’s unique Graph ID from a pathway GPML file saved on disk and saves it in the result directory
removeElementByIdByURI Removes a DataNode or Line by it’s unique Graph ID from a pathway GPML file downloaded from Wikipathways using it’s Wikipathways ID and saves it in the result directory
removeElementByID Removes a DataNode or Line by it’s ID from a pathway GPML saved on disk and saves it in the result directory.
removeElementByIDByURI Removes a DataNode or Line by it’s ID from a Wikipathways pathway GPML file downloaded using it’s Wikipathways ID and saves it in the result directory.
test Test the server client connection
visualizeData Data is visualized on the pathway GPML file saved on disk

Method Detail

test



public java.lang.String test()


Test the server client connection


Returns:
“it works” if the server client connection is working





createPathway



public java.lang.String createPathway(java.lang.String pathwayID,
java.lang.String pathwayauthor,
java.lang.String organism,
java.lang.String resultdirectory)


Creates a new empty pathway GPML file and saves it in the result directory



Parameters:
pathwayID – ID of pathway
pathwayauthor – ID of author
organism – ID of organism
resultdirectory – Absolute path of the result directory
Returns:
Pathway file ID and disk location





addDataNode



public java.lang.String addDataNode(java.lang.String pathwayfilepath,
java.lang.String datanodeID,
java.lang.String datanodetype,
java.lang.String datanodeid,
java.lang.String datanodesource,
java.lang.String resultdirectory)


Adds a DataNode to a pathway GPML file saved on disk and saves it in the result directory



Parameters:
pathwayfilepath – Absolute path of the pathway GPML file
datanodeID – ID of the DataNode
datanodetype – Biological Type of the DataNode, “GeneProduct”, “Metabolite”,
“Protein”, “RNA”, “Pathway” or “Unknown”
datanodeid – Identifier for the DataNode
datanodesource – DataSource for the DataNode
Returns:
A Unique GraphID of the DataNode





addDataNodeByURI



public java.lang.String addDataNodeByURI(java.lang.String uri,
java.lang.String datanodeID,
java.lang.String datanodetype,
java.lang.String datanodeid,
java.lang.String datanodesource,
java.lang.String resultdirectory)


Adds a DataNode to a Pathway GPML file downloaded by it’s Wikipathwas ID and saves it in
the result directory



Parameters:
uri – A Wikipathways ID for the pathway
datanodeID – ID of the DataNode
datanodetype – Biological Type of the DataNode
datanodeid – Identifier for the DataNode
datanodesource – DataSource for the DataNode
Returns:
A Unique GraphID of the DataNode added





addLine



public java.lang.String addLine(java.lang.String pathwayfilepath,
java.lang.String lineID,
java.lang.String startdatanode,
java.lang.String enddatanode,
java.lang.String startarrowtype,
java.lang.String endarrowtype,
java.lang.String lineid,
java.lang.String linesource,
java.lang.String resultdirectory)


Adds a Line to a Pathway GPML saved on disk, connecting two DataNodes
specified by the IDs of the two DataNodes and saves the changed
pathway GPML file in the result directory



Parameters:
pathwayfilepath – Absolute path of the pathway GPML file
lineID – ID of the Line
startdatanode – ID of the DataNode where the Line starts
enddatanode – ID of the DataNode where the Line ends
startarrowtype – Type of the arrow at the start of the line
endarrowtype – Type of the arrow at the end of the Line
lineid – Identifier for the Line
linesource – DataSource for the Line
Returns:
A Unique GraphID for the Line added





addLineByURI



public java.lang.String addLineByURI(java.lang.String uri,
java.lang.String lineID,
java.lang.String startdatanode,
java.lang.String enddatanode,
java.lang.String startarrowtype,
java.lang.String endarrowtype,
java.lang.String lineid,
java.lang.String linesource,
java.lang.String resultdirectory)


Adds a Line to a Pathway GPML downloaded from Wikipathways by it’s Wikipathways ID,
connecting two DataNodes specified by the IDs of the two DataNodes and saves the
changed pathway GPML file in the result directory



Parameters:
uri – A Wikipathways ID for the pathway
lineID – ID of the Line
startdatanode – ID of the DataNode where the Line starts
enddatanode – ID of the DataNode where the Line ends
startarrowtype – Type of the arrow at the start of the line
endarrowtype – Type of the arrow at the end of the Line
lineid – Identifier for the Line
linesource – DataSource for the Line
Returns:
A Unique GraphID for the Line added





addLineByID



public java.lang.String addLineByID(java.lang.String pathwayfilepath,
java.lang.String lineID,
java.lang.String startdatanodegraphid,
java.lang.String enddatanodegraphid,
java.lang.String startarrowtype,
java.lang.String endarrowtype,
java.lang.String lineid,
java.lang.String linesource,
java.lang.String resultdirectory)


Adds a Line to a Pathway GPML saved on disk, connecting two DataNodes specified
by the unique Graph IDs of the two DataNodes and saves the changed pathway GPML
file in the result directory



Parameters:
pathwayfilepath – Absolute path of the pathway GPML file
lineID – ID of the Line
startdatanodegraphid – ID of the DataNode where the Line starts
enddatanodegraphid – ID of the DataNode where the Line ends
startarrowtype – Type of the arrow at the start of the line
endarrowtype – Type of the arrow at the end of the Line
lineid – Identifier for the Line
linesource – DataSource for the Line
Returns:
A Unique GraphID for the Line added





addLineByIDByURI



public java.lang.String addLineByIDByURI(java.lang.String uri,
java.lang.String lineID,
java.lang.String startdatanodegraphid,
java.lang.String enddatanodegraphid,
java.lang.String startarrowtype,
java.lang.String endarrowtype,
java.lang.String lineid,
java.lang.String linesource,
java.lang.String resultdirectory)


Adds a Line to a Pathway GPML downloaded from Wikipathways by it’s Wikipathways ID,
connecting two DataNodes specified by the unique Graph IDs of the two DataNodes and
saves the changed pathway GPML file in the result directory



Parameters:
uri – A Wikipathways ID for the pathway
lineID – ID of the Line
startdatanodegraphid – ID of the DataNode where the Line starts
enddatanodegraphid – ID of the DataNode where the Line ends
startarrowtype – Type of the arrow at the start of the line
endarrowtype – Type of the arrow at the end of the Line
lineid – Identifier for the Line
linesource – DataSource for the Line
Returns:
A Unique GraphID for the Line added





annotateElement



public java.lang.String annotateElement(java.lang.String pathwayfilepath,
java.lang.String elementID,
java.lang.String elementid,
java.lang.String elementsource,
java.lang.String resultdirectory)


Annotates DataNodes and Lines to a pathway GPML file saved on disk, with an
identifier and data source and saves the pathway GPML file in the result directory
Annotation can also be added while adding DataNodes and Lines



Parameters:
pathwayfilepath – Absolute path of the pathway GPML file
elementID – ID of the DataNode or Line
elementid – Identifier for the DataNode or Line
elementsource – DataSource of the identifier for the DataNode or Line
Returns:
A Unique GraphID of the DataNode or Line annotated





annotateElementByURI



public java.lang.String annotateElementByURI(java.lang.String uri,
java.lang.String elementID,
java.lang.String elementid,
java.lang.String elementsource,
java.lang.String resultdirectory)


Annotates DataNodes and Lines to a Wikipathways pathway downloaded by it’s Wikipathways
ID, with an identifier and data source and saves the pathway GPML file in the
result directory. Annotation can also be added while adding DataNodes and Lines.



Parameters:
uri – A wikipathways ID for the pathway
elementID – ID of the DataNode or Line
elementid – Identifier for the DataNode or Line
elementsource – DataSource of the identifier for the DataNode or Line
resultdirectory – Absolute path of the directory where the
pathway GPML file should be saved
Returns:
A Unique GraphID of the DataNode or Line annotated





removeElementByID



public java.lang.String removeElementByID(java.lang.String pathwayfilepath,
java.lang.String elementID,
java.lang.String resultdirectory)


Removes a DataNode or Line by it’s ID from a pathway GPML saved on disk and saves
it in the result directory. Removes all DataNodes and Lines with that ID.



Parameters:
pathwayfilepath – Absolute path of the pathway GPML file
elementID – ID of the element (DataNode or Line) to be removed
resultdirectory – Absolute path of the directory where the
pathway GPML file should be saved
Returns:
ID of the element removed and the pathway it was removed from.





removeElementByIDByURI



public java.lang.String removeElementByIDByURI(java.lang.String uri,
java.lang.String elementID,
java.lang.String resultdirectory)


Removes a DataNode or Line by it’s ID from a Wikipathways pathway GPML file downloaded
using it’s Wikipathways ID and saves it in the result directory. Removes all
DataNodes and Lines with that ID.



Parameters:
uri – A Wikipathways ID for the pathway
elementID – ID of the element (DataNode or Line) to be removed
resultdirectory – Absolute path of the directory where the
pathway GPML file should be saved
Returns:
A pathway GPML file is saved in the result directory





removeElementById



public java.lang.String removeElementById(java.lang.String pathwayfilepath,
java.lang.String elementgraphid,
java.lang.String resultdirectory)


Removes a DataNode or Line by it’s unique Graph ID from a pathway GPML file saved on disk
and saves it in the result directory



Parameters:
pathwayfilepath – Absolute path of the pathway GPML file
elementgraphid – Unique Graph ID of the DataNode or Line to be removed
resultdirectory – Absolute path of the directory where the pathway
GPML file should be saved
Returns:
A pathway GPML file is saved in the resultdirectory





removeElementByIdByURI



public java.lang.String removeElementByIdByURI(java.lang.String uri,
java.lang.String elementgraphid,
java.lang.String resultdirectory)


Removes a DataNode or Line by it’s unique Graph ID from a pathway GPML file downloaded
from Wikipathways using it’s Wikipathways ID and saves it in the result directory



Parameters:
uri – A Wikipathways ID for the pathway
elementgraphid – Unique Graph ID of the DataNode or Line to be removed
resultdirectory – Absolute path of the directory where the pathway
GPML file should be saved
Returns:
A pathway GPML file is saved in the resultdirectory





exportPathway



public java.lang.String exportPathway(java.lang.String pathwayfilepath,
java.lang.String exportfiletype,
java.lang.String resultdirectory)
throws org.pathvisio.core.model.ConverterException,
java.io.IOException,
org.bridgedb.IDMapperException


Creates a image file from the pathway GPML saved in disk and saves it in the
result directory



Parameters:
pathwayfilepath – Absolute path of the pathway GPML file
exportfiletype – The image format to export the pathway in. Possible formats “png”,
“svg” or “pdf”.
resultdirectory – Absolute path of the directory where the image should be saved
Returns:
Pathway image created in the result directory
Throws:
org.pathvisio.core.model.ConverterException
java.io.IOException
org.bridgedb.IDMapperException





exportPathwayFromURI



public java.lang.String exportPathwayFromURI(java.lang.String uri,
java.lang.String exportfiletype,
java.lang.String resultdirectory)
throws org.pathvisio.core.model.ConverterException,
java.io.IOException,
org.bridgedb.IDMapperException


Exports a pathway image of a Wikipathways pathway,
provided it’s WikiPathways ID in png, svg or pdf formats



Parameters:
uri – Wikipathways ID of the pathway
exportfiletype – Type of image required (png, svg or pdf))
resultdirectory – Absolute path of the directory where the image should be saved
Returns:
Pathway image created in result directory
Throws:
org.pathvisio.core.model.ConverterException
java.io.IOException
org.bridgedb.IDMapperException





exportPathwayByte



public byte[] exportPathwayByte(java.lang.String pathwayfilepath,
java.lang.String filetype)
throws org.pathvisio.core.model.ConverterException,
java.io.IOException,
org.bridgedb.IDMapperException


Exports a byte array of the image of a pathway GPML file saved on disk



Parameters:
pathwayfilepath – Absolute path of the pathway GPML file
filetype – Type of image “png”, “svg” or “pdf”
Returns:
Byte Array
Throws:
org.pathvisio.core.model.ConverterException
java.io.IOException
org.bridgedb.IDMapperException





exportPathwayByteFromURI



public byte[] exportPathwayByteFromURI(java.lang.String uri,
java.lang.String exportfiletype)
throws org.pathvisio.core.model.ConverterException,
java.io.IOException,
org.bridgedb.IDMapperException


Exports a byte array of the image of a Wikipathways pathway downloaded by it’s
Wikipathways ID



Parameters:
uri – Wikipathways ID of the pathay
exportfiletype – Type of image required (“png”,”svg” or “pdf”)
Returns:
Byte Array of the pathway image
Throws:
org.pathvisio.core.model.ConverterException
java.io.IOException
org.bridgedb.IDMapperException





importData



public java.lang.String importData(java.lang.String inputfilepath,
java.lang.String dbfilepath,
java.lang.String resultdirectorypath)
throws java.io.IOException,
org.bridgedb.IDMapperException,
java.lang.ClassNotFoundException


Imports tab delimited data and creates a PGEX file



Parameters:
inputfilepath – Absolute path of the tab delimited input file
dbfilepath – Absolute path of the database file
resultdirectorypath – Absolute path of the directory to save results in
Returns:
Creates a PGEX file in the result directory
Throws:
java.io.IOException
org.bridgedb.IDMapperException
java.lang.ClassNotFoundException





createVisualization



public java.lang.String createVisualization(java.lang.String gexfilepath,
java.lang.String gsample,
java.lang.String gcolors,
java.lang.String gvalues,
java.lang.String rsample,
java.lang.String rcolors,
java.lang.String rexpressions)
throws java.lang.SecurityException,
java.lang.IllegalArgumentException,
org.bridgedb.IDMapperException,
org.pathvisio.core.model.ConverterException,
java.io.IOException,
java.lang.NoSuchFieldException,
java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
org.pathvisio.data.DataException


Create a Visualization XML file for DataNodes
Contains color gradients and rules



Parameters:
gexfilepath – Absolute path of the PGEX file
gsample – Samples on which the color gradients should be applied
samples should be separated by “;”
gcolors – Colors for the color gradients
the colors for the same gradient should be separated by “,”
and colors for the next gradient should be given after a “;”
gvalues – Values corresponding to the colors of the color gradient
the values for the same gradient should be separated by “,”
and values for the next gradient should be given after a “;”
rsample – Samples on which the color rules should be applied
samples should be separated with “;”
rcolors – Colors for the color rules
colors should be separated by a “;”
rexpressions – Expressions for the color rules
expressions should be separated with “;”
Returns:
An XML file containing the visualization is saved in the same directory
as the PGEX file
Throws:
java.lang.SecurityException
java.lang.IllegalArgumentException
org.bridgedb.IDMapperException
org.pathvisio.core.model.ConverterException
java.io.IOException
java.lang.NoSuchFieldException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
org.pathvisio.data.DataException





visualizeData



public java.lang.String visualizeData(java.lang.String pathwayfilepath,
java.lang.String gexfilepath,
java.lang.String dbfilepath,
java.lang.String resultdirectory)


Data is visualized on the pathway GPML file saved on disk



Parameters:
pathwayfilepath – Absolute path of the pathway GPML file
gexfilepath – Absolute path of the PGEX file
dbfilepath – Absolute path of the database file
resultdirectory – Absolute path of the directory where the results should be saved
Returns:
Data is visualized and the html pages for the pathway and it’s
backpages are saved in the resultdirectory





calculatePathwayStatistics



public java.lang.String calculatePathwayStatistics(java.lang.String pathwaydirectory,
java.lang.String gexfilepath,
java.lang.String dbfilepath,
java.lang.String criteria,
java.lang.String resultdirectory)


Calculate Pathway statistics – overrepresentation analysis



Parameters:
pathwaydirectory – Absolute path of the directory which contains the pathways
gexfilepath – Absolute path of the PGEX file
dbfilepath – Absolute path of the database file
criteria – The criteria based on which the Zscore should be calculated
resultdirectory – Absolute path of the directory where the results should be saved
Returns:
String stating that results have been exported





getPathwayParticipants



public java.lang.String getPathwayParticipants(java.lang.String pathwayfilepath,
java.lang.String pathwayelementtype,
java.lang.String resultdirectory)


Get the list of participating pathway elements from a pathway GPML file saved on disk



Parameters:
pathwayfilepath – Absolute path of the pathway GPML file
pathwayelementtype – The Biological type of the Pathway Element
Returns:
List of pathwayelements present in the given pathway of the
pathwayelementtype provided





getPathwayByURIParticipants



public java.lang.String getPathwayByURIParticipants(java.lang.String uri,
java.lang.String pathwayelementtype,
java.lang.String resultdirectory)


Get the list of participating pathway elements from a pathway GPML file By URI



Parameters:
uri – A Wikipathways ID for the pathway
pathwayelementtype – The Biological type of the Pathway Element
Returns:
List of the elements present in the given pathway matching the Pathway element type
provided





4 Comments

  1. Christ says:

    would it be helpful to have a method by which you could look search the ID of a line or DataNode by name?
    currently if I want to delete an element or annotate it, I have to look up the ID in the GPML file first

  2. Christ says:

    With the addDataNode argument a result directory is required.
    But that’s always the same as the directory the pathway file is located.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: