markrobinsonuzh / cytofWorkflow

MIT License
14 stars 3 forks source link

adding conditions (timepoint, treatment, clinical data) to analysis #6

Closed CNicholasMDA closed 4 years ago

CNicholasMDA commented 4 years ago

Hi, At the risk of getting in over my molecular biologist head, how can I amend the script to include additional experimental variables; i.e. not just pre vs post, but also drug treatment, clinical response, etc? Thanks!

markrobinsonuzh commented 4 years ago

Dear @CNicholasMDA

As long as you have these covariates all organized in a data.frame, you should be able to add columns as below:

design <- createDesignMatrix(
  experiment_info, cols_design = c("condition", "treatment", "clinical_response")
)

Some more details in the vignette: https://bioconductor.org/packages/release/bioc/vignettes/diffcyt/inst/doc/diffcyt_workflow.html#set-up-design-matrix-or-model-formula

But also ask if you run into problems.

Best, Mark