kharchenkolab / cacoa

Single-cell Case Control Analysis
46 stars 7 forks source link

Cacoa not working with Seurat object #48

Closed adityamahadevaniyer closed 12 months ago

adityamahadevaniyer commented 1 year ago

Hi team, I have been using Seurat object for the analysis. Could you please get clarify what do you mean by sample.per.cell argument? I have been inputting two factor group information under sample.groups and annotated cell type column as cell.groups. if I use orig.ident column as sample.groups., I get an error saying sample groups must be a two level factor describing which samples are being contrasted. Thank you, Aditya

adityamahadevaniyer commented 1 year ago

seu = seurat.object

sample.groups = seu$group

cell.groups = seu$celltype

sample.per.cell = seu$orig.ident

ref.level = “Untreated”

target.level = “Treated”

cao <- Cacoa$new(seu, sample.groups=sample.groups, cell.groups=cell.groups, sample.per.cell=sample.per.cell, ref.level=ref.level, target.level=target.level, graph.name= “SNN1”) I did create a graph name while running FindNeighbors()

The cao object is successfully created but i am unable to run these commands

cao$estimateCellLoadings()

Error- dimensions should to be positive

cao$estimateExpressionShiftMagnitudes()

Error- 2 factor level is needed

adityamahadevaniyer commented 12 months ago

issue solved here. thank you. https://www.biostars.org/p/9576873/#9577207