Skip Navigation
NIH | National Cancer Institute | NCI Wiki   New Account Help Tips
Skip to end of metadata
Go to start of metadata

Transitioning from caBIO

caBIO will be retired in August 2013. This Wiki page provides examples of using other available data sources to retrieve genomic annotations and information on clinical trials.

Transitioning from caBIO presentation

Code Examples

The following code examples are provided below:

  • Retrieve Genomic Annotations from bioDBnet
  • Retrieve Clinical Trials from CTRP 

Retrieve Genomic Annotations from bioDBnet

The biological DataBase network (bioDBnet) integrates 28 widely used biololgical databases and provides access to genomic annotations.  Code examples are provided below. Additional information is available on the bioDBnet site (http://biodbnet.abcc.ncifcrf.gov).

Retrieve Taxon ID, Biocarta Pathways, Gene Ontology (GO) and Unigene ID
Retrieve Genomic Annotations
public static Gene search(Gene gene, Db2DbParams db2DbParams) {
              String db2dbResult = search(db2DbParams);
              // Remove Headers
              db2dbResult = db2dbResult.substring(db2dbResult.indexOf("\n")+1);
              
              // Split Columns
              String[] geneInfoArray = db2dbResult.split("\t");
              
              gene = setupGeneInfo(gene, geneInfoArray[1]);
              gene = setupTaxonId(gene, geneInfoArray[2]);
              gene = setupBiocartaPathways(gene, geneInfoArray[3]);
              
              String geneOntologies = geneInfoArray[4] + ";" + geneInfoArray[5] + ";" + geneInfoArray[6] + ";";
              gene = setupGeneOntology(gene, geneOntologies);
              
              gene = setupClusTerId(gene, geneInfoArray[7]);
              
              return gene;
       }
Retrieve Pathways and Associated Genes from bioDBnet
Retrieve Pathways
response.flushBuffer();    
  try{  
              
       String s = System.getProperty("gov.nih.nci.rembrandt.cacore.url")!=null ? (String)System.getProperty("gov.nih.nci.rembrandt.cacore.url") : "http://biodbnet.abcc.ncifcrf.gov/webServices/rest.php";
    URL url = new URL(s+"/biodbnetRestApi.xml?pathways=biocarta,ncipid,reactome&taxonId=9606");
    String pageNum = (String)request.getParameter("page"); 
    Document reportXML = null;
    SAXReader reader = new SAXReader();
    if (pageNum == null || pageNum.length() == 0) {
       reportXML = reader.read(url);  
       request.getSession().setAttribute(RembrandtConstants.SESSION_ATTR_PATHWAY_XML, reportXML);
       pageNum = "0";
    }
    HashMap<String, String> params = new HashMap<String, String>();
    params.put("page", pageNum);
    ReportGeneratorHelper.renderReportWithParams(request, null, RembrandtConstants.DEFAULT_PATHWAY_XSLT_FILENAME,out, params);
                          
    }
    catch(Exception e){
       out.println("The Pathway Service is currently Unavailable.  Please try again later. ");
    }         
Retrieve Gene Based on Pathway
response.flushBuffer();    
  try{
    String db = (String)request.getParameter("db");  
    String pathwayName = (String)request.getParameter("name");  
    String pathwayDisplayName = (String)request.getParameter("displayname"); 
    String s = System.getProperty("gov.nih.nci.rembrandt.cacore.url")!=null ? (String)System.getProperty("gov.nih.nci.rembrandt.cacore.url") : "http://biodbnet.abcc.ncifcrf.gov/webServices/rest.php";   
    
    String urlStr = ReportGeneratorHelper.composeGeneReportUrl(s, db, pathwayName);    
    URL url = new URL(urlStr);
    SAXReader reader = new SAXReader();    
    Document reportXML = reader.read(url);
    
    HashMap<String, String> params = new HashMap<String, String>();
    params.put("displayName", pathwayDisplayName);
    ReportGeneratorHelper.renderReportWithParams(request,reportXML,RembrandtConstants.DEFAULT_GENE_XSLT_FILENAME,out, params);
    
    }
    catch(Exception e){
    }                
Interface to Biocarta for Pathway Diagrams 
Retrieve Pathway Diagrams
// Setup the input and output Params before calling the bioDBnet service

public static final String GENETIC_INFO_ALL = "Gene Info, Taxon ID, Biocarta Pathway Name, GO - Biological Process, GO - Cellular Component, GO - Molecular Function, UniGene ID";
BioDBnetService bioDBnetService = BioDBnetService.getService();
Db2DbParams db2DbParams = bioDBnetService.setupInputs(geneIdentifier.getEntrezGeneID());
 
db2DbParams = bioDBnetService.setupOutput(db2DbParams, BioDBnetService.GENETIC_INFO_ALL);
gene = bioDBnetService.search(myGene, db2DbParams);
// Once the data is retrieved, the pathway names are listed with a link to the Biocarta site:
 
<c:forEach var="item" items="${gene.pathwayCollection}">
<li> <a target="_blank"  href="http://www.biocarta.com/pathfiles/<c:out value="${item.name}" escapeXml="false"/>.asp"> <c:out value="${item.displayValue}" escapeXml="false"/></a>
</li>
</c:forEach>

Retrieve Clinical Trials information from CTRP

The NCI CTRP maintains a comprehensive database containing regularly updated information on all NCI funded clinical trials. The NCI CTRP provides support for several clinical trials applications and services such as the NCI Clinical Trials Registration Site, the NCI Clinical Trials Accrual Site, and the Subject Accrual and Person Organization services. The NCI CTRP Release 3.9.1 provides web services for the retrieval of clinical trials information associated with drugs.  Additional information is available on the CTRP Wiki.

Retrieve Clinical Trials Information
        public static void main(String[] args) {
              CtrpIntegration ctrpIntegration = new CtrpIntegration();
              String url = "http://ncias-d416-v.nci.nih.gov:39080/registry/rest/studyProtocols?agentNsc=122758";
              
              Document document = ctrpIntegration.retrieveXmlDoc(url);
              
              Collection<ClinicalTrialProtocol> clinicalTrialProtocolCollection = ctrpIntegration.parseXmlDoc(document);
              
              for( ClinicalTrialProtocol clinicalTrialProtocol: clinicalTrialProtocolCollection) {
                     System.out.println("<<<<<<<<<<<<<<<<<<<");
                     System.out.println(clinicalTrialProtocol.getLeadOrganizationName());
                     System.out.println(clinicalTrialProtocol.getPDQIdentifier());
                     System.out.println(clinicalTrialProtocol.getNCTIdentifier());
                     System.out.println(clinicalTrialProtocol.getTitle());
                     System.out.println(clinicalTrialProtocol.getPhase());
                     System.out.println(clinicalTrialProtocol.getPIName());
                     System.out.println(clinicalTrialProtocol.getCurrentStatus());
              } 
       }         
  • No labels