Is there any way to infer percentage from the branches in trajectories plotted in Monocle?
2
0
Entering edit mode
6.2 years ago
Batu ▴ 290

I would like to say that this percent of the cells choose the first branch and this percent of the cells choose second branch. Is there any way to infer this kind of percentage from trajectories plotted in Monocle?

single-cell single cell monocle R trajectory • 2.3k views
ADD COMMENT
1
Entering edit mode
6.2 years ago
Batu ▴ 290

I played with the elements inside CellDataSet object (Let's say it is 'a'). All of its data is stored in 'data' list inside this object, it can be reached with a@data. Inside data, you can find nGene, nUMI, cluster number... etc. for each cell. After ordering the cells with orderCells() function, the CellDataSet is updated with State and Pseudotime terms. Therefore, you have to run this function to get those terms. You can see which state (trajectory) the cell contains in from here. You can call them by a@data[['State']], assign it to a variable and check the number of the cells in each trajectory with table() function.

ADD COMMENT
0
Entering edit mode
5.9 years ago
leon.zhan • 0

The following code might help you get what you want. mono_object is the CellDataSet object after you run the orderCells() function.

state_cells <- mono_object@phenoData[['State']]

sample_cells <- mono_object@phenoData[['orig.ident']]

df <- data.frame(state_cells, sample_cells)

table(df)

ADD COMMENT

Login before adding your answer.

Traffic: 2294 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6