Hi Hannah / everyone,
I am a big fan of the monocle package and garnett seems like an amazing addition. I've recently been using multiparameter mass cytometry and was wondering if garnett could be used for that as well.
I've managed to generate and train the classifier but I get the following error when I try to classify the cells:
Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘colData’ for signature ‘"CellDataSet"’
The code I use to train is:
cds_classifier <- train_cell_classifier(cds = cds,
marker_file = "blood_garnett_markers.txt",
db = "none",
cds_gene_id_type = "SYMBOL",
marker_file_gene_id_type = "SYMBOL",
classifier_gene_id_type = "SYMBOL")
That works. However, when I run:
cds <- classify_cells(cds = cds,
classifier = cds_classifier,
db = "none",
cds_gene_id_type = "SYMBOL",
cluster_extend = FALSE,
verbose = TRUE)
I get the "colData" error I pasted above. I'm pasting the traceback below:
Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘colData’ for signature ‘"CellDataSet"’
7. | stop(gettextf("unable to find an inherited method for function %s for signature %s", sQuote(fdef@generic), sQuote(cnames)), domain = NA) |
6. | (function (classes, fdef, mtable) { methods <- .findInheritedMethods(classes, fdef, mtable) if (length(methods) == 1L) ... |
4. | row.names(colData(cds)) |
3. | `[.data.frame`(class_df, row.names(colData(cds)), ) |
2. | class_df[row.names(colData(cds)), ] |
1. | classify_cells(cds = cds, classifier = cds_classifier, db = "none", cds_gene_id_type = "SYMBOL", cluster_extend = FALSE, verbose = TRUE) |
I imagine it's something to do with gene identifiers - obviously given that it's a mass cytometry dataset, they don't have ENSEMBL ids. But I thought specifying db = "none" and using "SYMBOL" wherever appropriate could do the trick.
Can anyone shed some light on how to get over the final hurdle?
Many thanks.