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

Error in .rowNamesDF<-(x, value = value) : invalid 'row.names' length #12

Open
Yuanxiao369 opened this issue Jul 4, 2023 · 1 comment

Comments

@Yuanxiao369
Copy link

Hello, I get an error when I use the function 'ConstExpRef'. The error is

Error in .rowNamesDF<-(x, value = value) : invalid 'row.names' length
In addition: Warning message:
In data.frame(..., check.names = FALSE) :
row names were found from a short variable and have been discarded

It occurs at this step "Now compute marker specificity scores and filter markers".

I prepare the three file this function needs. The first one is exp.m matrix, I used the data matrix of seurat object; and celltype.idx file in 'named num' class; and a chr vector of namesCellT.v.

Below is the running result of this function:

> expref <- ConstExpRef(exp.m = exp.m, celltype.idx = mycell.idx,
                       namesCellT.v = namescell)
[1] "Finding marker genes"
$Astrocyte
[1] 17071
$B_cell
[1] 12450
$Endothelial
[1] 9661
$Fibroblasts
[1] 19259
$Myeloid
[1] 20702
$NK_cell
[1] 16420
$T_cell
[1] 19082
$Tumor
[1] 22852
[1] "Now compute marker specificity scores and filter markers"
Error in `.rowNamesDF<-`(x, value = value) : invalid 'row.names' length
In addition: Warning message:
In data.frame(..., check.names = FALSE) :
  row names were found from a short variable and have been discarded

I don't know why I get this error. Looking forward to your answer. Thanks!

@Yuanxiao369
Copy link
Author

I have just solved this problem. The error occurred because I didn't set the value of markspecTH.v, so that one celltype of my data could not be detected very well. The default threshold of markspecTH.v is too high for my data.
And this error doesn't mean the fault of data rownames.

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

1 participant