ventolab / CellphoneDB

CellPhoneDB can be used to search for a particular ligand/receptor, or interrogate your own HUMAN single-cell transcriptomics data.
https://www.cellphonedb.org/
MIT License
304 stars 52 forks source link

Exception: Some clusters/cell_types in microenvironments file are not present in metadata #184

Open Jessica1525809 opened 2 months ago

Jessica1525809 commented 2 months ago

Hi @ktroule , When I run cpdb_statistical_analysis_method.call with microenvironments file, the error arose: Exception: Some clusters/cell_types in microenvironments file are not present in metadata.

But I checked my metadata file and microenvironments file, their cell_types were consistent.

截屏2024-04-25 23 40 14

Here are my codes:

截屏2024-04-25 23 42 59

Thank you very much if you can solve my problem kindly!

ktroule commented 2 months ago

Hi.

Only thing that comes to mind right now its that one of the input files is not correctly formatted, check this.

Examples of files can be found here.

Kind regards.

Jessica1525809 commented 2 months ago

Hi @ktroule, I checked my files again but failed to find any problems. I think my files match the requirements. Here are my metadata file and microenvironments file. AllCategory_microenv.csv AllCategory_meta.csv Could you please check them for me? Thanks a lot! Best regards.

ktroule commented 2 months ago

Your files contain rows indices, the files should look like this: microenvironments.tsv

cell_type   microenvironment
PV MMP11    Env1
PV MYH11    Env1
PV STEAP4   Env1

metadata.tsv

barcode_sample  cell_type
AGCGATTAGTCTAACC-1_Pla_HDBR10917733 B_cells
ATCCGTGAGGCTAGAA-1_Pla_Camb10714918 B_cells
AGTAACCCATTAAAGG-1_Pla_HDBR10917733 B_cells
GTTCACCTCAATGAGG-1_Pla_HDBR10142864 B_cells

Regards