Giter Club home page Giter Club logo

longarray's Introduction

title author date vignette output
Data representation for combinatorial pharmacogenomics
Vincent J. Carey, stvjc at channing.harvard.edu
`r format(Sys.time(), '%B %d, %Y')`
%\VignetteEngine{knitr::rmarkdown} %\VignetteIndexEntry{Data representation for combinatorial pharmacogenomics} %\VignetteEncoding{UTF-8}
BiocStyle::html_document
highlight number_sections theme toc
pygments
true
united
true
suppressWarnings({
suppressPackageStartupMessages({
library(pharmGxComb)
library(BiocStyle)
library(ggplot2)
library(magrittr)
library(dplyr)
})
})

Introduction

Consider the following table representing combination drug experimental design for a given cell line:

library(pharmGxComb)
data(dc)
table(dc$drugA_name[1:5000], 
   dc$drugB_name[1:5000])[1:5,1:5]

This is a small slice of data derivable from r nrow(dc) records in dc.

We can get an informal look at the effects on viability using a simple ggplot2 call in viabDots.

library(dplyr)
library(magrittr)
viabDots(dc, drugA="5-FU", drugB="ABT-888", incell_line="CAOV3")

A very naive test of interaction between 5-FU and ABT-888 concentrations on viability in CAOV3 is given with

summary(viabReg(dc, drugA="5-FU", drugB="ABT-888", incell_line="CAOV3"))

Thoughts on data structure and use cases

Drugs and cell lines are the main experimental factors. There is a single assay for viability. We may have genomic data as well, but the design underlying the genomic assays will determine how to think about data structure.

At this stage it does not seem clear how to reuse existing Bioc classes. Here are a few considerations, to be weighed against highest scientific priorities.

  • Ordering cell lines with respect to sensitivity to a given combination
all_lines = unique(dc$cell_line)
all_regs = lapply(all_lines, function(x)
    summary(viabReg(dc, drugA="5-FU", drugB="ABT-888", incell_line=x))$coef)
names(all_regs) = all_lines
all_regs_t = sapply(all_regs, function(x)x[4,3])
all_regs_p = sapply(all_regs, function(x)x[4,4])
rep = rbind(all_regs_t, all_regs_p)
rep[,order(rep[2,])[1:5]]
  • Assessing consistency of combination effects on related cell lines. In this case some aspects of the cell line ontology might be helpful. How many tokens for cell line in the test data can be mapped to CLO?
uu = unique(dc$cell_line)
clo = ontoProc::getCellLineOnto()
ii = lapply(uu, function(x) grep(x, clo$name, ignore.case=TRUE, value=TRUE))
jj = ii[sapply(ii,length)>0]
names(jj) = uu[sapply(ii,length)>0]
jj

So r length(jj)/r length(uu) is the fraction of cell line tokens "directly mappable" to cell line ontology terms.

  • Assessing consistency of effects among related compounds. Here the ChEBI compound ontology could help define "distances" between compounds; there are surely more precise approaches.
ch = ontoProc::getChebiOnto()
mm = lapply(alld, function(x) grep(x, ch$name, value=TRUE))
nn = mm[which(sapply(mm, function(x)length(x)>0))]
names(nn) = alld[which(sapply(mm, function(x)length(x)>0))]
nn

There are not many direct matches. When we have a tag, we can find out about the compound class.

ch$name[ch$parent[["CHEBI:8988"]]]

With standard naming, we can group compounds more effectively.

Summary

We need to elaborate the key use cases. The long table representation seems very useful but it does not immediately fit with the key Bioc classes.

It may be worth pointing out that there is an approach in restfulSE for lazily converting a long table layout to a "delayed" SummarizedExperiment. The back end is BigQuery so you will need to be able to authenticate to make use of the isb-cgc "project". library(restfulSE); example(BQ3_Array) and the related source spell this out. It is clumsy.

longarray's People

Contributors

p-smirnov avatar vjcitn avatar

Stargazers

Eric Milliman avatar

Watchers

Benjamin Haibe-Kains avatar James Cloos avatar  avatar  avatar

Forkers

vjcitn

longarray's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.