Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cells Ids do not match cell IDs in metadata #6

Open
rahulnutron opened this issue Jan 26, 2020 · 2 comments
Open

Cells Ids do not match cell IDs in metadata #6

rahulnutron opened this issue Jan 26, 2020 · 2 comments

Comments

@rahulnutron
Copy link

Dear scPred Team,

Thanks for the tool!

I was trying to use the tool with a Arabidopsis dataset. However getting a no cell id match error. Any suggestion to avoid the error?

pollen_counts <- mat
pollen_cpm <- apply(pollen_counts, 2, function(x) (x/sum(x))*1000000)
tb<-read.table("E:/new/testscpred")
pollen_metadata <- as.data.frame(tb)
colData(pollen)

table(pollen_metadata$Cell_type)
head(pollen)
set.seed(1234)
i <- createDataPartition(pollen_metadata$Cell_type, p = 0.70, list = FALSE)
train_data <- pollen_cpm[, i]
test_data <- pollen_cpm[, -i]

train_info <- pollen_metadata[i, , drop = FALSE]
test_info <- pollen_metadata[-i, , drop = FALSE]
set.seed(1234)
scp <- eigenDecompose(train_data, n = 10)

scPred::metadata(scp) <- train_info

scPred::metadata(scp) <- train_info
Error in scPred::metadata<-(*tmp*, value = list(Cell_type = c(1L, :
Cells Ids do not match cell IDs in metadata

@rahulnutron
Copy link
Author

i did
scp@metadata<-regen_metadata

but getting this error

scp <- getFeatureSpace(scp, pVar = "cell_type2")
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01s
Error in [[<-(*tmp*, names(res)[noFeatures], value = NULL) :
no such index at level 2
In addition: Warning message:
In getFeatureSpace(scp, pVar = "cell_type2") :
Warning: No features were found for classes:
Columella
Epi
LRC
Peri

@pfren1998
Copy link

I also encountered such a problem

Warning: No features were found for classes:
CD4T
CD8T
eosinophil
erythrocyte
myeloid.lineage.restricted.progenitor.cell
natural.killer.cell
Error in `[[<-`(`*tmp*`, names(res)[noFeatures], value = NULL) : 
  no such index at level 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants