Distance matrix for monocle and seurat object
1
0
Entering edit mode
17 months ago
rprog008 ▴ 70

Dear members,

I am trying to create a distance matrix for both Seurat and monocle object for clustering analysis of single cell RNA data analysis. Though I am following the tutorial in their respective websites, i am unable to retrieve distance matrix in any way.

Below is code for Monocle:

   HSMM<- newCellDataSet(data,
                                  phenoData = pd,
                                  featureData = fd,
                                  lowerDetectionLimit = 0.5,
                                  expressionFamily = negbinomial.size())
    HSMM <- estimateSizeFactors(HSMM)
    HSMM <- estimateDispersions(HSMM)
    HSMM <- reduceDimension(HSMM, max_components = 2, num_dim = 6,
                            reduction_method = 'tSNE', verbose = T)
    HSMM <- clusterCells(HSMM, num_clusters = 5)

and seurat

pbmc1<- CreateSeuratObject(dat, min.cells = 3, project = "test",min.features = 200)
pbmc1 <- subset(pbmc1, subset = nFeature_RNA > 200 & nFeature_RNA < 6000 & percent.mt < 5)
pbmc1 <- NormalizeData(pbmc1)
pbmc1 <- FindVariableFeatures(pbmc1, selection.method = "vst")
pbmc1<- ScaleData(pbmc1, features = rownames(pbmc1))
pbmc1 <- RunPCA(pbmc2, features = VariableFeatures(pbmc2), ndims.print = 6:10, nfeatures.print = 10)

I would be obliged if any one helps me

Thanks in advance

single cell RNA monocle seurat • 826 views
ADD COMMENT
0
Entering edit mode

Both methods have their own clustering functions. You're using Monocle's function, but Seurat's is FindClusters. Additionally, it's not clear what your actual issue is. Are you getting error messages?

ADD REPLY
0
Entering edit mode

I apologize, if my question is unclear.

I am trying to retrieve the distance matrix from both seurat and monocle object in matrix form.

For instance in case of monocle, if I am writing

cellPairwiseDistances(HSMM)

or

HSMm@cellPairwiseDistances

I am getting 0x0 matrix.

However, clustering has been performed successfully.

ADD REPLY
0
Entering edit mode
9 months ago

Hello,

I am having this same issue with 0x0 matrix with my cds. Despite successful clustering, I can't get cellPairwiseDistance(cds) or reducedDimS(cds) to output anything but 0x0 matrices. Were you ever able to resolve?

ADD COMMENT

Login before adding your answer.

Traffic: 1589 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