Error message: Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘assay’ for signature ‘"character", "character"’
legeinei123 opened this issue · 1 comments
Hi,
I was hoping you could help me with an error I'm getting.
My code is as follows:
sce_list<-c("sce_p57", "sce_ch")
sce_comb<-sce_cbind(sce_list, method = "intersect", exprs = c("logcounts"), colData_names = c("Genotype", "Stage"))
I'm getting the error
The assay named 'logcounts' will be used to determine the proportion of zeroes for each batch
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘assay’ for signature ‘"character", "character"’
First line is fine, I assume just a warning, but could you perhaps help me figure out why it is coming up with an error? sce_p57 has been analyzed quite a lot, while sce_ch is just a table of logcounts with two columns in colData. They don't have the same amount of genes either (see below).
These are the structures of the single cell experiment objects:
sce_ch
class: SingleCellExperiment
dim: 14109 335
metadata(0):
assays(1): logcounts
rownames(14109): Gnai3 Cdc45 ... NA..11744 NA..11745
rowData names(0):
colnames(335): SLX.9711.N701_S502 SLX.9711.N701_S503 ... SLX.9714.N712_S507 SLX.9714.N712_S517
colData names(3): Genotype name Stage
reducedDimNames(0):
altExpNames(0):
sce_p57
class: SingleCellExperiment
dim: 29736 534
metadata(0):
assays(2): counts logcounts
rownames(29736): Gnai3 Cdc45 ... ERCC-00170 ERCC-00171
rowData names(6): GeneID Chr ... Strand Length
colnames(534): P57WT_PLATE8_A01 P57WT_PLATE8_A02 ... P57KO_PLATE29_H11 P57KO_PLATE29_H12
colData names(50): Genotype plate ... geno_and_seuratlabel phases
reducedDimNames(3): PCA UMAP TSNE
altExpNames(1): index_sort
Thanks very much!
Hi,
Please try the following
sce_list<- list(sce_p57, sce_ch)
sce_comb<-sce_cbind(sce_list, method = "intersect", exprs = c("logcounts"), colData_names = c("Genotype", "Stage"))
Alternatively, you can try sce_comb <- cbind(sce_p57, sce_ch)
that recently implemented in SingleCellExperiment
package.
Yingxin