You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to do a pseudo time analysis using monocle3 after having imported my data with the Seurat-wrappers.
I am essentially following this: https://rpubs.com/mahima_bose/Seurat_and_Monocle3_p
Here is my code:
`monocle_data_raw <- as.cell_data_set(three_plates_nocellcycle)
#checking the metadata
head(colData(monocle_data_raw))
#Looks good
#Now get feature/gene metadata
fData(monocle_data_raw)
#Gives me: DataFrame with 19261 rows and 0 columns
Hi, I am trying to do a pseudo time analysis using monocle3 after having imported my data with the Seurat-wrappers.
I am essentially following this: https://rpubs.com/mahima_bose/Seurat_and_Monocle3_p
Here is my code:
`monocle_data_raw <- as.cell_data_set(three_plates_nocellcycle)
#checking the metadata
head(colData(monocle_data_raw))
#Looks good
#Now get feature/gene metadata
fData(monocle_data_raw)
#Gives me: DataFrame with 19261 rows and 0 columns
#Now check rownames
rownames(fData(monocle_data_raw))[1:10]
#Gives me: [1] "0610005C13Rik" "0610009B22Rik" "0610009E02Rik" "0610009L18Rik" "0610010F05Rik"
#[6] "0610010K14Rik" "0610012G03Rik" "0610030E20Rik" "0610040B10Rik" "1110002J07Rik"
#Now do a dataframe with the gene names
fData(monocle_data_raw)$gene_short_name <- rownames(fData(monocle_data_raw))
head(fData(monocle_data_raw))
#Gives me: DataFrame with 6 rows and 1 column
#gene_short_name
#
#0610005C13Rik 0610005C13Rik
#0610009B22Rik 0610009B22Rik
#0610009E02Rik 0610009E02Rik
#0610009L18Rik 0610009L18Rik
#0610010F05Rik 0610010F05Rik
#0610010K14Rik 0610010K14Rik
#Get counts
head(counts(monocle_data_raw))
#Gives a load of genes and counts
#Now: IMPORTANT! Retrieve clustering information from Seurat object!!!!
#1. Assign partitions
recreate.partitions <- c(rep(1, length(monocle_data_raw@colData@rownames)))
names(recreate.partitions) <- as.factor(recreate.partitions)
recreate.partitions
monocle_data_raw@clusters@listData[["UMAP"]][["partitions"]] <- recreate.partitions
#Assign cluster info
list.cluster <- [email protected]
monocle_data_raw@clusters@listData[["UMAP"]][["clusters"]] <- list.cluster
#Assign UMAP coordinates
monocle_data_raw@int_colData@listData[["reducedDims"]]@ListData[["UMAP"]] <- three_plates_nocellcycle@reductions$[email protected]
#Now Learn Trajectory
monocle_data_raw <- learn_graph(monocle_data_raw, use_partition = F)
`
This is where I get this error:
Error: colnames(cds)!=names(cds@clusters[[reduction_method]]$partitions)
The text was updated successfully, but these errors were encountered: