asrhou / scMatch

scMatch: a single-cell gene expression profile annotation tool using reference datasets
MIT License
23 stars 21 forks source link

Deprecated function .ix (pandas) replaced by .iloc #14

Open zeryas opened 2 years ago

zeryas commented 2 years ago

Hi,

I had the following error message when using scMatch.py code :

Traceback (most recent call last): File "/mnt/CC_SinglC/scMatch/scMatch.py", line 357, in main(testType, opt.dFormat, opt.testDS, opt.testGenes, opt.refDS, refTypeList, keepZeros, testMethodList, opt.coreNum) File "/mnt/CC_SinglC/scMatch/scMatch.py", line 197, in main AnnSCData(testType, em, refDS, refType, hidSpecDict[refType], keepZeros, testMethod, coreNum, savefolder) File "/mnt/CC_SinglC/scMatch/scMatch.py", line 92, in AnnSCData refDB = refDB.ix[~refDB.index.duplicated(keep='first'),] File "/usr/lib/python3.10/site-packages/pandas/core/generic.py", line 5575, in getattr return object.getattribute(self, name) AttributeError: 'DataFrame' object has no attribute 'ix'

After search found that the pandas function .ix is deprecated and was replaced by .iloc function based on this post https://stackoverflow.com/questions/59991397/attributeerror-dataframe-object-has-no-attribute-ix

Maybe You could update the Code to more recent pandas version or specify the pandas version required for the code to work

Thank you !

savitaj commented 1 year ago

Has this been corrected?