Having trouble using the SAFE clustering method
2
0
Entering edit mode
6.2 years ago
Chynoki • 0

Hi, I would like to use SAFE clustering on my single-cell dataset, but it seems the scripts are bugged. I tried to run the example provided on SAFE's website, but I'm getting this error.

Error in individual_clustering(inputTags = expr.mat, SEED = 123) :
(list) object cannot be coerced to type 'double' In addition: Warning message: 'newSCESet' is deprecated. Use 'SingleCellExperiment' instead. See help("Deprecated")

Here is the code I ran in order to obtain this error:

expr.mat <- read.csv("/home/snin/workspace/SAFE_clustering/expression_matrix.csv", header = T)
rownames(expr.mat) <- expr.mat[,1]
expr.mat <- expr.mat[,-1]
cluster.result <- individual_clustering(inputTags=expr.mat, SEED=123)

Can you maybe advise me to resolve this issue?

Have a nice day.

Chynoki

single-cell RNA-Seq SAFE clustering cluster • 1.1k views
ADD COMMENT
0
Entering edit mode
6.2 years ago

Try

cluster.result <- individual_clustering(data.matrix(expr.mat), SEED=123)

If that does not work, then check your object to ensure that there are no characters in it. It has to be numeric. In some rare situations, a trailing space may appear after a number, in which case R will become confused. You can detect these by just converting the entire thing to text with:

as.character(expr.mat)
ADD COMMENT
0
Entering edit mode
6.2 years ago
Chynoki • 0

Hi, thanks for your answer.

I also contacted the dev of the tools and they told me the same. I used SAFEv1.0 instead of SAFEv2.0. Use SAFEv2.0 resolve my problem. It was the SCE package that were updated to v1.6 and SAFEv1.0 use SCEv1.3.

Now I have an other problem when running the tutorial.

This line:

ARI.SC3 = adjustedRandIndex(cluster[1,], celltype.info$cluster)

Give me the following error:

Error in as.vector(x) : object 'cluster' not found

I understand the error, but in the tutorial they do not instantiate a 'cluster' object.

I'm also waiting for an answer from the dev.

ADD COMMENT

Login before adding your answer.

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