Differences between revisions 4 and 5
Revision 4 as of 2009-08-03 07:46:36
Size: 5315
Editor: asp
Comment:
Revision 5 as of 2009-08-03 10:01:26
Size: 7824
Editor: asp
Comment:
Deletions are marked like this. Additions are marked like this.
Line 42: Line 42:
 1. Test request: test if the services are available. === Test request ===
T
est if the services are available.
Line 54: Line 55:
 1. ID mapping request: request to mapping the IDs of source ID types in one attribute to the target ID types and save in the target attribute === ID mapping request ===
R
equest to mapping the IDs of source ID types in one attribute to the target ID types and save in the target attribute
Line 87: Line 89:
 1. ID mapping dialog request: request to bring out the ID mapping main dialog
 1. ID mapping source config dialog request: request to bring out the ID mapping source configuration dialog
 1. ID mapping supported ID types fetching request: request to fetch the supported source and target ID types
=== ID mapping dialog request ===
Request to bring out the ID mapping main dialog
{{{
#!java
  String receiver = "CyThesaurus";
  String msgType = "MAPPING_DIALOG"; // request for ID mapping main dialog
  String msgId = receiver + System.currentTimeMillis();
  Message msg = new Message(msgId , pluginName, receiver, msgType , null);
  List<ResponseMessage> response = PluginsCommunicationSupport.sendMessageAndGetResponses(msg);
  if (!response.isempty()) {
      Map content = (Map)response.getContent();
      boolean succ = (Boolean) content.get("SUCCESS");
      if (succ) {
          // ID mapping was performed successfully
      } else {
          // ID mapping was not performed or failed
      }
  } else {
      // the ID mapping services are unavailable
  }
}}}
=== ID mapping source config dialog request ===
Request to bring out the ID mapping source configuration dialog
{{{
#!java
  String receiver = "CyThesaurus";
  String msgType = "MAPPING_SRC_CONFIG_DIALOG"; // request for ID mapping source configuration dialog
  String msgId = receiver + System.currentTimeMillis();
  Message msg = new Message(msgId , pluginName, receiver, msgType , null);
  List<ResponseMessage> response = PluginsCommunicationSupport.sendMessageAndGetResponses(msg);
  if (!response.isempty()) {
      Map content = (Map)response.getContent();
      boolean succ = (Boolean) content.get("SUCCESS");
      if (succ) {
          // ID mapping sources were configured successfully
      } else {
          // ID mapping sources were not configured or failed
      }
  } else {
      // the ID mapping services are unavailable
  }
}}}
=== ID mapping supported ID types fetching request ===
Request to fetch the supported source and target ID types
{{{
#!java
  String receiver = "CyThesaurus";
  String msgType = "REQUEST_SUPPORTED_ID_TYPE"; // request for fetching supported ID types
  String msgId = receiver + System.currentTimeMillis();
  Message msg = new Message(msgId , pluginName, receiver, msgType , null);
  List<ResponseMessage> response = PluginsCommunicationSupport.sendMessageAndGetResponses(msg);
  if (!response.isempty()) {
      Map content = (Map)response.getContent();
      boolean succ = (Boolean) content.get("SUCCESS");
      String report = (String) content.get("REPORT");
      if (succ) {
          // successfully fetched
          // report contains statistics

          String[] supportedSrcIDTypes = (String[]) content.get("SRC_ID_TYPE");
          String[] supportedTgtIDTypes = (String[]) content.get("Tgt_ID_TYPE");
          // do more things here ...
      } else {
          // failed
          // report contains error message
      }
  } else {
      // the ID mapping services are unavailable
  }
}}}

[UNDER CONSTRUCTION]

Introduction

CyThesaurus is a Cytoscape plugin providing identifier mapping services based on various resources. Currently the plugin support ID mapping resources from delimited text, PGDB file and BioMart web service. This plugin utilized BridgeDb API.

Use Cases

5 related use cases have been identified on Bader Lab ID Mapping page. 2 of them are closely related to this project:

  • Unification during dataset merging: During a merge operation e.g. of two protein-protein interaction datasets from independently created databases, it is vital to recognize that two protein objects, one from each data source, represent the same protein molecule, even if the protein objects don’t share any database accession numbers. Unification requires knowledge of record type e.g. you cannot reliably use a gene ID to unify proteins (mostly because splice variants exist).

  • Identifier translation: Some analysis methods require specific translations from one set of identifiers to another. For instance, our 'activity centers' analysis requires translation from protein or gene identifiers in a pathway database to Affymetrix probe set identifiers or other gene expression array platform identifiers.

Supported ID Mapping Resources

File- based

Delimited text file

  • File format (e.g. http://tinyurl.com/mergesvn/testData/yeast_id_mapping.txt):

    • Each column for one ID type
    • Each row except the first one represents IDs of different types mapping to each other
    • First row contains ID types
    • Multiple IDs are allowed to be contained in one cell (One to many mapping, or IDs of the same type maps to each other). Use special character (e.g., ';', '/', etc, or user defined) to separate IDs.

RDB based

PGDB file

Web service based

BioMart web service

BioMart web service has been utilized to provide ID mapping service in this plugin.

BridgeDb web service

Being developed.

PICR web service

Being developed.

Code Base

Currently the plugin is based on Cytoscape 2.6. Porting to Cytoscape 3.0 is in plan.

ID mapping service for other plugin

An inter-plugin communication module was developed to support CyThesaurus plugin providing ID mapping services to other plugins. It is recommended that other plugins, who need to request ID mapping services from CyThesaurus, include the package cytoscape-plugins-comm (.jar, javadoc, src). The following services are supported.

Test request

Test if the services are available.

   1   String receiver = "CyThesaurus"; // plugin name when passing messages
   2   String msgType = Message.MSG_TYPE_TEST; // indicate what this message requests for
   3   String msgId = receiver + System.currentTimeMillis();
   4   Message msg = new Message(msgId , pluginName, receiver, msgType , null);
   5   List<ResponseMessage> response = PluginsCommunicationSupport.sendMessageAndGetResponses(msg);
   6   if (!response.isempty()) {
   7       // the ID mapping services are available
   8   }
   9 

ID mapping request

Request to mapping the IDs of source ID types in one attribute to the target ID types and save in the target attribute

   1   String receiver = "CyThesaurus";
   2   String msgType = "REQUEST_MAPPING"; // request for ID mapping service
   3   String msgId = receiver + System.currentTimeMillis();
   4   Map content = new HashMap();
   5   content.add("NETWORK_ID", new String[]{"net1", "net2"}); 
   6   // or content.add("NETWORK_ID", "net1");
   7   content.add("SOURCE_ATTR", new String[]{"Attr1", "Attr2"});
   8   // or content.add("SOURCE_ATTR", "ID");
   9   content.add("SOURCE_ID_TYPE", new String[]{"Type1","Type2"});
  10   // or content.add("SOURCE_ID_TYPE", "Type1");
  11   content.add("TARGET_ATTR", "tgtAttr");
  12   content.add("TARGET_ID_TYPE", "tgtType");
  13   
  14   Message msg = new Message(msgId , pluginName, receiver, msgType , content);
  15   List<ResponseMessage> response = PluginsCommunicationSupport.sendMessageAndGetResponses(msg);
  16   if (!response.isempty()) {
  17       Map content = (Map)response.getContent();
  18       boolean succ = (Boolean) content.get("SUCCESS");
  19       String report = (String) content.get("REPORT");
  20       if (succ) {
  21           // successfully mapped
  22           // report contains statistics
  23       } else {
  24           // failed
  25           // report contains error message
  26       }
  27   } else {
  28       // the ID mapping services are unavailable
  29   }
  30 

ID mapping dialog request

Request to bring out the ID mapping main dialog

   1   String receiver = "CyThesaurus";
   2   String msgType = "MAPPING_DIALOG"; // request for ID mapping main dialog
   3   String msgId = receiver + System.currentTimeMillis();
   4   Message msg = new Message(msgId , pluginName, receiver, msgType , null);
   5   List<ResponseMessage> response = PluginsCommunicationSupport.sendMessageAndGetResponses(msg);
   6   if (!response.isempty()) {
   7       Map content = (Map)response.getContent();
   8       boolean succ = (Boolean) content.get("SUCCESS");
   9       if (succ) {
  10           // ID mapping was performed successfully
  11       } else {
  12           // ID mapping was not performed or failed
  13       }
  14   } else {
  15       // the ID mapping services are unavailable
  16   }
  17 

ID mapping source config dialog request

Request to bring out the ID mapping source configuration dialog

   1   String receiver = "CyThesaurus";
   2   String msgType = "MAPPING_SRC_CONFIG_DIALOG"; // request for ID mapping source configuration dialog
   3   String msgId = receiver + System.currentTimeMillis();
   4   Message msg = new Message(msgId , pluginName, receiver, msgType , null);
   5   List<ResponseMessage> response = PluginsCommunicationSupport.sendMessageAndGetResponses(msg);
   6   if (!response.isempty()) {
   7       Map content = (Map)response.getContent();
   8       boolean succ = (Boolean) content.get("SUCCESS");
   9       if (succ) {
  10           // ID mapping sources were configured successfully
  11       } else {
  12           // ID mapping sources were not configured or failed
  13       }
  14   } else {
  15       // the ID mapping services are unavailable
  16   }
  17 

ID mapping supported ID types fetching request

Request to fetch the supported source and target ID types

   1   String receiver = "CyThesaurus";
   2   String msgType = "REQUEST_SUPPORTED_ID_TYPE"; // request for fetching supported ID types
   3   String msgId = receiver + System.currentTimeMillis();
   4   Message msg = new Message(msgId , pluginName, receiver, msgType , null);
   5   List<ResponseMessage> response = PluginsCommunicationSupport.sendMessageAndGetResponses(msg);
   6   if (!response.isempty()) {
   7       Map content = (Map)response.getContent();
   8       boolean succ = (Boolean) content.get("SUCCESS");
   9       String report = (String) content.get("REPORT");
  10       if (succ) {
  11           // successfully fetched
  12           // report contains statistics
  13 
  14           String[] supportedSrcIDTypes = (String[]) content.get("SRC_ID_TYPE");
  15           String[] supportedTgtIDTypes = (String[]) content.get("Tgt_ID_TYPE");
  16           // do more things here ...
  17       } else {
  18           // failed
  19           // report contains error message
  20       }
  21   } else {
  22       // the ID mapping services are unavailable
  23   }
  24 

CyThesaurus_Plugin (last edited 2011-03-29 16:03:58 by asp)

Funding for Cytoscape is provided by a federal grant from the U.S. National Institute of General Medical Sciences (NIGMS) of the Na tional Institutes of Health (NIH) under award number GM070743-01. Corporate funding is provided through a contract from Unilever PLC.

MoinMoin Appliance - Powered by TurnKey Linux