VCCRI / scTalk

Intercellular communication analysis for scRNA-seq data
GNU General Public License v3.0
6 stars 1 forks source link

error in generating circleplot #2

Closed wfma closed 4 years ago

wfma commented 4 years ago

Hi all!

Sorry to raise issues again, I have been working thru the vignette using my own dataset and have been able to generate significant cell-cell interaction in table format. However, when I try to generate a circle plot using the follow code, I get an error:

> cell.network.file = paste0("Permutation_tests_", file.lab, "_network.csv")
> CellCirclePlot(input.file = cell.network.file, 
+                adj_pval_thresh = 0.01)
Error in (function (edges, n = max(edges), directed = TRUE)  : 
  At structure_generators.c:86 : Invalid (negative) vertex id, Invalid vertex id

I have reviewed my result.table, etc. and they seem to be expected. What does this error mean?

Thanks, Wei

rj-patrick commented 4 years ago

Hi Wei,

Looks like this error can occur in igraph if node names contain a 0 integer value. Are your cluster IDs of the form 0,1,2,3 etc? If so, I've made a change that should fix the issue.

Cheers, Ralph

wfma commented 4 years ago

Awesome, Thanks Ralph that has fixed the issue!

On another note, we tend to put our cell identity under another heading within meta.data under the seurat object (we use singleR for automatic cell identification). How can we utilize these annotations and transfer them (or apply them) during our scTALK analysis?

Thanks, Wei

PS this is what our object's metadata looks like. image

rj-patrick commented 4 years ago

Hi Wei,

scTalk operates on whatever is defined in the 'active.ident' slot, so just set Idents(stanford) <- stanford@meta.data$SingleR.cells before running the pipeline.

Cheers, Ralph

wfma commented 4 years ago

amazing! got it!