Quick StartΒΆ

A minimal round-trip, from a single-cell reference and bulk RNA-seq data down to cell-type-specific drug sensitivity, using the in-vitro dataset bundled with the package (see Example Data).

library(Biobase); library(glmnet); library(reshape2); library(ClimbTheCliff)

data(sc.es); data(bulk.es); data(bulk_auc_data)

climb_output <- climb(sc.es, bulk.es, mode = "expression")

# Subset to one drug/timepoint, and pre-select the genes most predictive of it
# (essential on real data β€” see the note in the CLIFF reference)
drug_data <- bulk_auc_data[bulk_auc_data$drug == "Cytarabine_48h", ]
bulk_mat <- t(exprs(bulk.es))[drug_data$sample, ]
sel.genes <- cliff_gene_selection(bulk_mat, drug_data$auc, min.genes = 10)
climb_output$expr.highres <- climb_output$expr.highres[, sel.genes, ]
climb_output$expr.overall <- climb_output$expr.overall[sel.genes, ]

cliff_output <- cliff(climb_output, drug_data, mode = "overall")

head(climb_output$props.corrected)  # cell-type proportions per bulk sample
head(cliff_output[[1]])             # cell-type-specific drug sensitivity (PI_hat_nk)

Note

cliff() requires climb() to have been run with mode = "expression" β€” it reads expr.highres, expr.overall, and props.corrected from climb_output, none of which are computed in mode = "abundance".

See CLIMB reference and CLIFF reference for the full parameter list, or Methods for the underlying model.