Objectives

The IP2 platform creates multiple types of quantitative output files as analysis of the data and uses tabular or graphical tools for display in web browser. The graphical web user interface is a great tool to easily access data for scientists. Meanwhile, for automation and high throughput data access, we designed IP2 API to access output files through any applications outside the IP2.

IP2 SETUP

JDK Version notes

The IP2 API supports JDK 1.7 or higher. Note that we have currently tested this implementation with JDK 1.7 and 1.8.

Installation

  1. Download ip2Api
  2. Unzip the ip2api.zip
  3. Set your CLASSPATH to include the “ip2api-X.X.X.jar”.
    Assuming you unzipped ip2api.zip in /home the following is an example:
    export CLASSPATH=$CLASSPATH:/home/ip2api/ip2api-1.0.0.jar:.
  4. If you want to use the parser in your existing java project then add ip2api.jar file as your project library.
  5. Update the jdbc.properties file located in your ip2api.zip and place that in your project home directory (or in classpath)

Note : Please make sure that your machine can access the ip2_data path as stored in ip2 server database.

QUANTITATIVE TYPES

  1. Label-free analysis
  2. Isobaric labeling(TMT)
  3. MS1-based labeling Analysis (SILAC,Dimethyl)

IP2API usage

  1. Update the jdbc.properties file with the ip2 database access information.
  2. Fetch all projects by providing the IP2 username.
    a. ProjectService.getAllProjects(“rpark”)
  3. For each project retrieve the label free analysis results using:
    a. QuantitationService.getAllLabelfree(project.getId());
  4. Check the label free is verified or not
    a. labelfree.getVerified()
  5. Read the label free data
    a. LabelFreeStatReader labelFreeStatReader = new LabelFreeStatReader(labelfree.getCensusFilePath());
  6. Read the metadata (experiment) information for the QuantCompare
    a. ExperimentService.getAllExperimentsForQuantitationIds(quantCompare.getQuantitationIds());
  7. Read the metadata (experiment) information for the Quntitation (label free)
    a. ExperimentService.getAllExperiments(labelfree.getMspExperimentIds());

Service Details

  1. ProjectService – This will provide the information related to the project.
    a. getAllProjects – Return list of projects for specific username.
    b. getProject – Return a project metadata for specific id.
  2. QuantitationService – This will provide information to read all types of quantitative data.
    a. getAllLabelfree – Return list of labelfree quantitative results based on specific project id.
    b. getAllSILAC – Return list of SILAC quantitation based on specific project id.
    c. getAllN15 – Reurn list of N15 quantitation based on specific project id.
    d. get – Return quantitation based on specific id.
  3. ExperimentService – This will return experimental metadta details
    a. getAllExperiments – Return list of experiments based on specific project id.
    b. get – Return experiment based on specific id.
    c. getAllExperimentsForQuantitationIds – Return list of Experiment objects based on the provided quantitation ids. quantitationIds can be multiple delimated by the space.
    d. getAllExperiments – Return list of Experiment objects based on the provided experiment ids. experimentIds can be multiple delimated by the space.
  4. QuantCompareService – This will provide information related to QuantCompare.
    a. list – Return list of quantcompare results based on specific project id.
    b. get – Return a quantcompare result based on specific id.
  5. DbSearchService – This will returns the information related to DbSearch data.
    a. get – Return DbSearch based on specific id.

Sample Code

Retrieve project list by IP2 user account name

List<Project> list = ProjectService.getAllProjects(userName);
        for( Project project : list) {
            // Retrieve the project information        
           System.out.println("Project name: " + project.getName());
           System.out.println("Project id: " + project.getId());
           System.out.println("Project path: " + project.getHomeFolder());
           System.out.println("Project description: " + project.getDescription());
        }

Retrieve a project by project id

Project project = ProjectService.getProject(projectId);
System.out.println("Project name: " + project.getName());
System.out.println("Project id: " + project.getId());
System.out.println("Project path: " + project.getHomeFolder());
System.out.println("Project description: " + project.getDescription());

Retrieve experiment list by project id

List<MspExperiment> list = ExperimentService.getAllExperiments(projectId);
        for( MspExperiment exp : list) {
            System.out.println("Experiment name: " + exp.getHomeFolder());
            System.out.println("Sample name: " + exp.getSampleName());
        }

Retrieve an experiment by experiment id

MspExperiment exp = ExperimentService.get(expId);
        System.out.println("Experiment name: " + exp.getHomeFolder());
        System.out.println("Sample name: " + exp.getSampleName());

Sample code for reading Label-free

for( Project project : ProjectService.getAllProjects("rpark")) {
   List labelfreeList = QuantitationService.getAllLabelfree(project.getId());
   // labelfreeList is a Object of Quantitation, For more available methods and fields, please check javadoc for Quantitation class.
   for(Quantitation labelfree : labelfreeList){
      if(labelfree.getVerified()) { // Read verified label free only.
          for( MspExperiment exp : ExperimentService.getAllExperiments(labelfree.getMspExperimentIds())){
             System.out.println(exp.getId()); // Please check javadoc for more Experiment methods.
          }
       LabelFreeStatReader labelFreeStatReader = new LabelFreeStatReader(labelfree.getCensusFilePath());
       labelFreeStatReader.getPlines(); // Get the p lines of the label free
       labelFreeStatReader.getRepList(); // Get the rep list of the label free
       // For more methods please visit javadoc for LabelFreeStatReader
    }
 }
}

Sample code for reading QuantCompare

for( Project project : ProjectService.getAllProjects("rpark")) {     
    List annovaCompareList = QuantCompareService.getAllANOVACompare(project.getId());
    for(QuantCompare quantCompare : annovaCompareList) {
        for( MspExperiment exp : ExperimentService.getAllExperimentsForQuantitationIds(quantCompare.getQuantitationIds())) {
           System.out.println(exp.getId());// Please check javadoc for more Experiment methods.
        }
        QuantStatReader reader = new QuantStatReader(quantCompare.getId(), quantCompare.getPath());
        System.out.println(reader.getQuantAnovaCompares().size());
    }
}

Please check Javadoc for more detailed methods and fields information.

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment