statOmics / tradeSeq

TRAjectory-based Differential Expression analysis for SEQuencing data
Other
237 stars 27 forks source link

plotGeneCount with Monocle pseudotime #47

Closed BrianLohman closed 4 years ago

BrianLohman commented 4 years ago

Hello,

I am trying to use the plotGeneCount function but the first argument is a Slingshot object. Is there a way to use this plotting function downstream of Monocle? I tried cds@phenoData@data$Pseudotime but that returned:

donor1_startRes <- startVsEndTest(donor1_fibroblast_sce)
oStart <- order(donor1_startRes$waldStat, decreasing = TRUE)
sigGeneStart <- names(donor1_fibroblast_sce)[oStart[3]]

> plotGeneCount(donor1_fibroblast_cds@phenoData@data$Pseudotime, exprs(donor1_fibroblast_cds), gene = sigGeneStart)
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘reducedDim’ for signature ‘"numeric", "missing"’

I would guess that the function is looking for some class of object specific to the Slingshot output, but I'm not entirely sure.

The plotSmoothers function works just fine with these data.

Thanks for you continued help.

Brian

HectorRDB commented 4 years ago

Hi, The plotGeneCount function plots the cells in reduced dimension, color by gene count for a specified gene, and add lineages. The monocle package already provides this types of features (I think it is the monocle::plot_cell_trajectory function) so we did not develop a new one.

BrianLohman commented 4 years ago

Hello,

Ah, that's a good point and totally fair.

Cheers,

Brian