EmanuelGoncalves / crispy

Python module to analyse CRISPR-based libraries
BSD 3-Clause "New" or "Revised" License
10 stars 3 forks source link

KeyError: 'Passing list-likes to .loc or [] with any missing labels is no longer supported #4

Closed laulabbumc closed 3 years ago

laulabbumc commented 3 years ago

I could run your sample inputs. However even our in-house datasets have the EXACT format in count_table, copy_number_table and library_table, I still get this error message:

KeyError: 'Passing list-likes to .loc or [] with any missing labels is no longer supported, see https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#deprecate-loc-reindex-listlike'

/mnt/efs/home/stb3865/bin/run_crispy.py(36)main() -> sgrna_fc=sgrna_fc.mean(1), copy_number=copynumber, library=lib.loc[sgrna_fc.index] I appreciate you could help. Thank you!

EmanuelGoncalves commented 3 years ago

This is a pandas error. you are querying sgrna_fc indices that are not in your library file. I'll close this ticket as this is not a crispy problem.

laulabbumc commented 3 years ago

I have checked it. And this is not the case. In fact, all of the sgRNA_IDs are in the library file. And the library file contains more sgRNA_IDs than the count matrix file has .