ChenWeiyan / LandSCENT

Landscape Single Cell Entropy
19 stars 6 forks source link

CellSR.o not showing the tsne plot and DoDiffusionMap.o$root is not calculated #11

Closed ayumatsubo closed 4 years ago

ayumatsubo commented 4 years ago

Hi Weiyan,

Thank you for a great package. I'm trying to analyze about 53k cells. Basically, I'm using the seurat object and convert to the SingleCellExperiment object.

  1. I succeeded to plot LandSR.total as tutorial, but CellSR.o didn't show the tsne like below. download-54

  2. When I calculated the DoDiffusionMap.o, the DoDiffusionMap.o$root was null so I cannot do following processes.

DoDiffusionMap.o <- DoDiffusionMap(Integration.l,
                                   mean_gap = 1, sd_gap = 1,
                                   root = c("cell", "state"),
                                   num_comp = 3,
                                   k = 30)

DoDiffusionMap didn't cause errors, but when I tried to Plot_DiffusionMap, the error happened like below.

Plot_DiffusionMap(DoDiffusionMap.o,TIPs = c(1,2,3),
                 dim = c(1, 2, 3),
                  color_by = "SR",
                  phi = 40,
                  theta = 135,
                  bty = "g",
                  PDF = FALSE)

Error message is

Error in destiny::DPT(dm, tips = Integration.l$root): you need to specify 1-3 tips, got 0
Traceback:

1. Plot_DiffusionMap(DoDiffusionMap.o, TIPs = c(1, 2, 3), dim = c(1, 
 .     2, 3), color_by = "SR", phi = 40, theta = 135, bty = "g", 
 .     PDF = FALSE)
2. destiny::DPT(dm, tips = Integration.l$root)
3. stop("you need to specify 1-3 tips, got ", length(tips))

Any help would be appreciated. Thank you.

ChenWeiyan commented 4 years ago

Hi,

Did you check if the SR are all properly calculated? Because if you set the input argument as root = c("cell", "state"), the root will be selected as the cell with maximum SR value. So if the SR of all cells are not correctly computed, the selection step will be interfered.

And from the plot you show above, it seems the SR values are not shown, although the legend gives the range of SR...It is a bit wired.

So maybe you need to check the SR values first and to see if they are all correct.

And I may then help you further.

Best, Weiyan

ayumatsubo commented 4 years ago

Thank you for the quick reply.

I checked the SR (Is it right by anyNA(SR.total$SR)?) and it returned FALSE. I can calculate and show Plot_LandSR with pre-calculated tsne coordinates by Seurat normally, so it is very strange for me not show Plot_CellSR.

Thank you.

ChenWeiyan commented 4 years ago

Hi,

Sometimes, Plot_CellSR cannot show the lower flat panel is because the argument num_grid is not properly set. You probably need to try other values.

But it is strange to me that you cannot select the root, however you get all SR values calculated.

Best, Weiyan

ayumatsubo commented 4 years ago

Thank you.

I changed the num_grid and I could show the Plot_CellSR, but very rough plot.

Also, I tried again to calculate DoDiffusionMap and it succeeded to plot (but I do not know why).

Thank you for your advice!.