1 Introduction

bhklab’s PharmacoDB unites multiple drug sensitivity databases. A REST API is available and interfaces to some basic endpoints are provided in this package. We also provide some basic support for working with the Cell Line Ontology and ChEBI.

A basic purpose of this package is to support exploration of the completeness and utility of available ontologies for cell lines and drugs. A relevant study of the possibility of “drug set enrichment analysis” has been published by Napolitano and colleagues.

We note that detailed RESTful interrogation of many ontologies is supported by the rols package. In the long run we would like to make use of the EBI Ontology Lookup System as a central resource of this package, but to develop concepts at these early stages, static images of ontologies are employed.

2 Basic software design for pogos

This package attacks two problems: organization of data on cell-line response to treatments by diverse compounds, and communication with PharmacoDb.

2.1 Data structures for pharmacogenomics

This package provides two key data structures for managing pharmacogenomic experimental results

  • DRTraceSet: for a given dosage schedule for a given compound, manage the dose-response profiles for a number of cell lines. An example is
## DRTraceSet for 5 cell lines, drug Irinotecan, dataset CCLE
  • DRProfSet: for a given cell line, provide the dose-response profiles for a number of compounds. Example:
## DRProfSet with 23 dose-response profiles for cell line MCF7
##  dataset: CCLE

The plot method reveals a basic motivation for DRTraceSet.

The plot method for DRProfSet has a complementary purpose.

2.2 Interrogating PharmacoDb

The communications part of the package is somewhat fragile, as changes to the upstream service at Princess Margaret can lead to failures here.

The heart of the query facility is shown here, unevaluated. The datasetCodes and cellLineCodes are extracted from reference data that may itself go out of date.

    xx = GET(sprintf("https://pharmacodb.pmgenomics.ca/api/v1/intersections/2/%d/%d?indent=true", 
        cellLineCodes[cell_line], datasetCodes[dataset]))
    ans = fromJSON(readBin(xx$content, what = "character"))
    ans = lapply(ans, function(comb) {
        new("DRProfile", cell_line = cell_line, dataset = dataset, 
            drug = comb$compound$name, drug_code = comb$compound$id, 
            cell_line_code = comb$cell_line$id, doses = vapply(comb$dose_responses, 
                function(x) x$dose, numeric(1)), responses = vapply(comb$dose_responses, 
                function(x) x$response, numeric(1)))
    })

3 Some stored reference data

We precomputed tables for cell lines, compounds, and tissues. These are available as DataFrame instances as cell_lines_v1, compounds_v1, datasets_v1, and tissues_v1, in the data element of the package.

Numerical ids are defined by the PharmacoDB.

3.1 Cell lines

3.2 Compounds

3.3 Datasets

3.4 Coverage of pharmacogenomic compound names by ChEBI

As an illustration of long-term intention of this package, consider the following snapshot of a slice of ChEBI.

## Loading required package: ontologyIndex
## snapshotDate(): 2022-04-21
## loading from cache

It is natural to map the compounds studied in pharmacogenomics to these compound classes as a step towards understanding common and distinct mechanisms of action. But in the following display, we see that some common chemotherapeutic agents are characterized in very generic terms:

Should paclitaxel be identified as an “organic molecular entity” with no additional detail? Is there additional information in ChEBI or related ontologies to help organize information on related compounds?

3.5 Relationships among cell lines

Cell line nomenclature is often unnatural. The Cell Line Ontology should be helpful in systematizing cell lines used in pharmacogenomics. Nevertheless there is some apparent lack of consistency.

## snapshotDate(): 2022-04-21
## loading from cache

The MCF7 line should probably be annotated as related to human mammary tissue.

4 Working with specific elements

We want to maximize utility of institutionally curated terminology for components of pharmacodb.

4.1 Cell line identifiers

4.1.1 Bridging to Cell Line Ontology

The following identifiers are available in the PharmacoDB cell lines:

c("143B", "1321N1", "184B5")

What are they? What organs do they represent? One way to proceed is through parent terms in Cell Line Ontology.

## snapshotDate(): 2022-04-21
## loading from cache
##                                          CLO:0000517 
##        "immortal human brain-derived cell line cell" 
##                                          CLO:0000560 
## "immortal human bone element-derived cell line cell" 
##                                          CLO:0000563 
##           "immortal human epithelial cell line cell"

TODO: how can we connect the anatomic vocabulary in these terms to formal anatomical terms in UBERON or CARO?

4.1.2 Vocabularies of anatomy

The Experimental Factor Ontology unifies various ontologies and includes terms related to anatomic systems. At least with the infrastructure available in ontologyIndex and ontologyPlot, it seems there are opportunities to add meaningful connections.

## snapshotDate(): 2022-04-21
## loading from cache

It is likely important to remember the distinction between an ontology, a structured collection of concept terms, and a curated vocabulary or ontology annotation, which covers concept “instances”.

4.2 Compounds

4.2.1 Bridging to ChEBI

This will involve more work. We have the compounds in PharmacoDB. How many match the compound names in Chebi?

## snapshotDate(): 2022-04-21
## loading from cache
## [1] 0.21

Direct matches are relatively rare. Attempts to use approximate matching with agrep have so far been unproductive. As an example, which we do not run:

5 Retrieving dose-response data for cell-line/compound intersections

Given a cell-line code and a database, we can retrieve all the experiments associated with it in that database.

CCLE for MCF-7:

The compoundsByCell function employs this pattern to establish lists of experiments per cell type.

We can recreate (approximately: the dose and response units need to be clarified) Figure 4b from Barretina et al. 2012 as follows (defaults to DRTraceSet are specifically chosen to compute this figure):