Skip to contents

Model Gene Dose-Response Curve Using drc

Usage

compute_single_dose_response(
  data,
  gene = NULL,
  pathway = NULL,
  normalisation = "limma_voom",
  treatment_value,
  control_value = "DMSO",
  batch = 1,
  k = 2
)

Arguments

data

A Seurat or TidySeurat object containing expression and metadata.

gene

A gene name (must match a row name in the object).

pathway

A character string present in the list of enriched pathways.

normalisation

One of "raw", "logNorm", "cpm", "clr", "SCT", "DESeq2", "edgeR", "RUVg", "RUVs", "RUVr", "limma_voom", "zinb". If empty, defaults to cpm

treatment_value

A character string matching one value in metadata column "Treatment_1".

control_value

A character string matching one value in metadata column "Treatment_1".

batch

Either empty, a single value, or a vector corresponding to the number of samples

k

Parameter k for RUVSeq methods, check RUVSeq tutorial

Value

A list with drc model, predicted values, and ggplot curve

Examples

if (FALSE) { # \dontrun{
rds_file<-system.file("/extdata/PMMSq033/PMMSq033.rds", package = "macpie")
mac<-readRDS(rds_file)
res <- compute_single_dose_response(data = mac,
gene = "PTPRA",
normalisation = "limma_voom",
treatment_value = "Camptothecin")
res$plot
res <- compute_single_dose_response(data = mac,
pathway = "Myc Targets V1",
treatment_value = "Camptothecin")
res$plot
} # }