synergy_bliss: Construct synergy matrix of values expected from Bliss...

Description Usage Arguments Value Examples

View source: R/synergy.R

Description

Construct synergy matrix of values expected from Bliss independence those actually observed

Usage

1
synergy_bliss(D, treatment_1, treatment_2)

Arguments

D

dataset

treatment_1

treatment in D

treatment_2

treatment in D

Value

A list with two matrixes, one for the values expected under Bliss independence, a + b - (a*b), and one for what was actually observed.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
samples = rep("s1", 16)
t1 = rep( c("DMSO", "d1", "d1", "d1"), 4)
t2 = c( rep( "DMSO", 4), rep("d2", 12) )
c1 = rep( c(0, 50, 100, 200), 4)
c2 = c(0,0,0,0, 50,50,50,50, 100,100,100,100, 200,200,200,200)
value_ind=c(1,0.8,0.7,0.6,0.8,0.7,0.6,0.5,0.7,0.6,0.5,0.4,0.6,0.5,0.4,0.3)
value_syn=c(1,0.8,0.7,0.6,0.8,0.8,0.5,0.2,0.7,0.2,0.1,0.05,0.6,0.1,0.05,0.01)

 DS_i=create_synergy_dataset( sample_types=samples, treatments_1=t1,
                         treatments_2=t2, concentrations=c1, 
                         concentrations_2=c2, values=value_ind, 
                         negative_control="DMSO")
 DS_s=create_synergy_dataset( sample_types=samples, treatments_1=t1,
                         treatments_2=t2, concentrations=c1, 
                         concentrations_2=c2, values=value_syn, 
                         negative_control="DMSO")
                         
b_ind = synergy_bliss(DS_i, "d1", "d2")
b_syn = synergy_bliss(DS_s, "d1", "d2")
layout(matrix(1:2,1,2))
plot_color_grid(b_ind$excess, color_bounds = c(-1,1))
plot_color_grid(b_syn$excess, color_bounds = c(-1,1))

DavidQuigley/HTDoseResponseCurve documentation built on Jan. 23, 2021, 5:10 a.m.