Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

[ERROR] Invalid Counts data #130

Closed
cyanching opened this issue Nov 20, 2019 · 6 comments
Closed

[ERROR] Invalid Counts data #130

cyanching opened this issue Nov 20, 2019 · 6 comments

Comments

@cyanching
Copy link

cyanching commented Nov 20, 2019

Hey there! I am new to cellphonedb, I have tried to export my normalised count data into the same format as the example you have then run the statistical_analysis method on my meta and count files, but I keep getting the error: Invalid Counts data, I have called count data from my Seurat object, then wrote a txt table:

human_count <- human.Seurat@assays$RNA@counts %>% as.data.frame() %>% rownames_to_column() %>% rename(Gene = rowname)

write.table(human_count,"human_count_integrated_30PC.txt",sep="\t")

Is there anything I did wrong? Could you suggest a solution?

@keenhl
Copy link

keenhl commented Nov 20, 2019

Is the column order in the counts file the same as the row order in the meta file?

@cyanching
Copy link
Author

Hey keenhl, thank you for your reply! I already solved the issue by adjusting the formating of my count file!

@keenhl
Copy link

keenhl commented Nov 25, 2019

Good. Thanks for the update.

@singcell
Copy link

@cyanching Can you share how your formatting solved the problem. i have the same issue.

@cyanching
Copy link
Author

@cyanching Can you share how your formatting solved the problem. i have the same issue.

I corrected the format of my count file, so I have (1,1) as 'Gene', then filed the first col with ensemble gene ID, the first row with cell ID, the rest with count data.

@zhanglab2008
Copy link

@cyanching Can you share how your formatting solved the problem. i have the same issue.

I corrected the format of my count file, so I have (1,1) as 'Gene', then filed the first col with ensemble gene ID, the first row with cell ID, the rest with count data.

Great tip! I also had the same error when I ran the codes from the Nature Protocol paper. I solved it using your methods. Thanks!

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

No branches or pull requests

4 participants