etal / cnvkit

Copy number variant detection from targeted DNA sequencing
http://cnvkit.readthedocs.org
Other
549 stars 166 forks source link

Deprecated pandas operations #502

Closed lculibrk closed 4 years ago

lculibrk commented 4 years ago

Hi,

It looks like export theta is no longer functional with pandas >= 1.0, as I get this error when trying to run cnvkit.py export theta:

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'

downgrading pandas to 0.25.3 seems to be a workaround, although it seems that the conda recipe will automatically install the most recent pandas that it can find.

etal commented 4 years ago

Thanks, looks like the pandas 1.0 release happened while I was out on leave and broke this feature.

However, there are better methods for tumor purity estimation available now -- I recommend PureCN, which can take CNVkit's .cnn and .cnr files directly as input.

tohsumi-repare commented 4 years ago

Greetings. I was wondering if the theta export function could be updated so it works with the latest Panda? I am interested in running THetA using the output of CNVkit. Thank you very much!

etal commented 4 years ago

I've updated the pandas .loc calls for export theta here: f7bb71a

I see there are some other .loc[:, ...] calls elsewhere in the codebase that should probably be replaced, too.