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
106 stars 16 forks source link

A few issues when trying to start using method #4

Closed tessadgreen closed 3 years ago

tessadgreen commented 3 years ago

Hi, I've started trying to apply the method and am running into a few issues:

1) it looks like in the example data X is actually n x k, not k x n as described in the tutorial.

2) I have to specifically add names to my list of cell types--there's no automatic
I'm trying out DIALOGUE on some scRNA-seq data an issue, and I think the problem is that each of my cell types isn't present in all of my samples.

3) Need to create the output directory prior to calling run.DIALOGUE

4) The method seems to fail if each cell type doesn't have at least two representatives from each sample. Each cell type has a name (string), tpm (m x n), samples (n x 1), X (k1 x n), and metadata (n x k2). When I call DIALOGUE.run I get the following error/traceback

8: stop("a dimension is zero") 7: svd(xlist[[i]]) 6: matrix(svd(xlist[[i]])$v[, 1:ncomponents], ncol = ncomponents) 5: MultiCCA(xlist, penalty = penalties[, i], niter = niter, type = type, ws = ws, trace = trace) 4: MultiCCA.permute(X, type = rep("standard", length(X)), trace = F) 3: DIALOGUE1.PMD(X = X, k = k, PMD2 = PMD2) 2: DIALOGUE1(rA, k = k, main = main, results.dir = results.dir, conf = conf, PMD2 = PMD2) 1: DIALOGUE.run(rA = celltypelist, main = "TNBC", k = 3, results.dir = "DIALOGUE_results/", conf = c("nUMI", "PatientID", "timepoint"))

I get an error here because not all samples have the same dimension n. I think that the issue might be that most cell types don't have cells from all 6 samples. Each of the elements in the list X have dimension j x k, where k is the number of PCs and j is the number of samples with cells present in that element.

I changed some of my sample labels just to make sure that fixed the issue (it did) but would prefer a different solution if I want to go forward with the method's results. Do you have any suggestions?

Thank you!

tessadgreen commented 3 years ago

Additional possible bug -- the bar graph plot didn't generate properly for cell types with periods in their name

livnatje commented 3 years ago

Hi Tessa,

Thanks for the feedback, and we will incorporate these changes in the new version to allow different name conventions etc.

As for the main issue #4, you are right, DIALOGUE currently uses only samples where all the cell types have a reasonable representation. If you only have 6 samples, I would recommend using less cell types so that you could use all samples. In the future we will also support sparsity, but currently do not have that functionality.

Also, in the new version DIALOGUE ensures the results are empirically significant to confirm generalizable. However, it is still recommended to use datasets with at least 10 samples.

Best, Livnat

tessadgreen commented 3 years ago

Thank you Livnat, that's very helpful. Looking forward to the new version!

Best, Tessa

livnatje commented 3 years ago

Hi Tessa,

The new version of DIALOGUE is now available. New features include the unsupervised, data-driven identification of the cell types participating in each program, and permutation tests to identify generalizable MCPs.

Best, Livnat

tessadgreen commented 3 years ago

Thank you for letting me know, I’m looking forward to trying it out.

I also wanted to ask—you refer in the paper to Dialogue using ligand-receptor interaction networks but from what I can tell it’s not in the code base—am I missing something there?

Thank you!

On Oct 12, 2021, at 12:31 PM, Livnat Jerby @.***> wrote:

Hi Tessa,

The new version of DIALOGUE is now available. New features include the unsupervised, data-driven identification of the cell types participating in each program, and permutation tests to identify generalizable MCPs.

Best, Livnat

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/livnatje/DIALOGUE/issues/4#issuecomment-941175750, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGLF56FJKRSQYWPCB7V42ZDUGRPFRANCNFSM5E6BESVA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.