cole-trapnell-lab / monocle-release

276 stars 116 forks source link

How to downsample cells in Monocle 3? #407

Closed giovanegt closed 4 years ago

giovanegt commented 4 years ago

Hi all, I am using Monocle 3 to analyze diff gene expression and to perform trajectory analysis in two samples: ctrl and treated cells.

First, I created a combined CDS file and I performed the default analysis. Next, I called choose_cells() to select cells from specific clusters, that I want to have a deeper look (run diff gene expression and trajectory analysis).

The problem is that I ended up with different number of cells between the two conditions (ctrl and treated cells) and this is interfering with further analysis. I would like to downsample the cells, so that there's an equal number of each condition.

Question: How to downsample cells to have the same number of cells in both conditions, after I subset the combined CDS file?

I tried to use reference_cells=500 when I was plotting the trajectory of my cells over pseudotime, but it did not work. below is the error message I've got.

Error in plot_cells(big_cds_subset, group_cells_by = "cluster", color_cells_by = "assigned_cell_type", : unused argument (reference_cells = 500)

Any help is greatly appreciated.

I thank you in advance

hpliner commented 4 years ago

Hello,

This issue appears to be an issue about our new package, Monocle 3. Please post any issues for Monocle 3 to the monocle3 repository at https://github.com/cole-trapnell-lab/monocle3.

Monocle 3 Development team