livnatje / DIALOGUE

DIALOGUE is a dimensionality reduction method that uses cross-cell-type associations to identify multicellular programs (MCPs) and map the cell transcriptome as a function of its environment.
Other
103 stars 16 forks source link

Run with continuous phenotypes #49

Open edg1983 opened 1 month ago

edg1983 commented 1 month ago

Hi,

Thank you for the great tool!

If I understand correctly, the phenotypes provided for association can only be binary traits. Is this correct?

Can quantitative phenotypes be tested as well? Do you plan to add support for this in the future?

Thanks!

livnatje commented 3 weeks ago

Hi @edg1983, thanks! Quantitative phenotypes can be tested with the same HLM statistics used in DIALOGUE.pheno through apply.formula.HLM.

You can also examine association based on correlation between the MCP expression (e.g., average per sample) and the quantitative level of the phenotype of interest as another measure and for visualization purposes.

Hope this helps.

edg1983 commented 3 weeks ago

Hi.

Thanks for your suggestions. Following the tutorial, the DIALOGUE.pheno function at the apply.formula.HLM is not mentioned, so I'm not sure how to set up my analysis in this case. Can you give me some more insights?

So far, I've generated a cell_types object for my cell types using make.cell.type like this.

for (celltype in celltypes) {
  cell_types[[celltype]] <- make.cell.type(
    name = celltype,
    tpm = mtx_c,
    samples = samples_c,
    X = pcs_c,
    metadata = metadata_c,
    cellQ = cellQ_c)
}

Using this object as input, I followed the tutorial's steps to set up parameters and run DIAGOGUE using the DIALOGUE.run function.

param <- DLG.get.param(k = 5, abn.c=10,
                         results.dir = result_dir,
                         conf = c("age","sex","Exp","cellQ"), # Confounding factors
                         pheno = "PRED")

R<-DIALOGUE.run(rA = cell_types, # list of cell.type objects
                  main = "DIALOGUE_PRED_pheno",
                  param = param)

Is this supposed to automatically apply the correct workflow according to binary/quantitative phenotype or do you have to specify some specific parameter in param or in the DIALOGUE.run function? Or maybe I have to use a completely different workflow?

Thanks!