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
305 stars 52 forks source link

Error in building DB for v3.0.0 #133

Closed avsarg closed 7 months ago

avsarg commented 11 months ago

Hi all and CellPhoneDB team,

I want to run statistical method with CellPhoneDB v3. But, because there is no cellphonedb.zip for v3.0.0, I downloaded the files for it with “T00_DownloadDB” and copied the “sources” document from v4.1.0. Hence, I have all required files to run the “T00_BuildDBFromFiles” notebook. However, when I run the code (_db_utils.create_db(cpdb_inputdir)), I got the error below. As far as I saw, the 'uniprot_5' column is missed in complex_input.csv.

KeyError: "['version', 'uniprot_5'] not in index"

Can you help to build the cellphonedb.zip file for v3?

Thanks,

datasome commented 11 months ago

Hi Gülben, If I understand you correctly, you are using CellPhoneDB package (https://github.com/ventolab/CellphoneDB) v4.0.0 to build your own cellphonedb.zip using *_input.csv files from https://github.com/ventolab/cellphonedb-data/releases/tag/v3.0.0.

If the above is correct, what I recommend you do is:

  1. Insert into complex_input.csv a new (empty) column: uniprot_5 between 'uniprot_4' and 'transmembrane'
  2. Add to complex_input.csv a new column: version - just after the column 'comments_complex'. That column (if filled) is used by CellphoneDB package to try and detect duplicate complexes - between the original CellphoneDB ones and the ones the user is adding. You can just leave this column blank if you're not worried by duplicates. But if you want the duplicate test to run at cellphonedb.zip creation time, just put say 'CellPhoneDBcore<=3.0' in version column for all the original CellphoneDB complexes, and say 'my_own' against the complexes you've added yourself.

I hope the above is enough for cellphonedb.zip to be created successfully from v3.0.0 of *_input.tsv files. Let us know how you get on.

Best,

Robert.

avsarg commented 11 months ago

Hi Robert,

Thanks for your reply. I modified the complex_input.csv file as you recommended, and It is worked :)

Best,

avsarg commented 10 months ago

Hi again!

In the above message, I said it`s worked, but (unfortunately) it worked for only _complexinput.csv file :/ Now it gives the error for “is_ppi” column in _interactioninput.csv file. How can I fill this column, where is it based on?

Thanks in advance.

ktroule commented 10 months ago

is_ppi can be filled with boolean characters TRUE/FALSE.