fhcrc / deenurp

16S rRNA gene sequence curation and phylogenetic reference set creation
GNU General Public License v3.0
4 stars 3 forks source link

pandas warning in filter_outliers #50

Open nhoffman opened 8 years ago

nhoffman commented 8 years ago
/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/pandas/core/indexing.py:284: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  self.obj[key] = _infer_fill_value(value)
/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/pandas/core/indexing.py:461: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
crosenth commented 8 years ago

On my list to fix soon

nhoffman commented 6 years ago

@crosenth - there are actually a number of warnings when the tests are run... when you get a chance, maybe you can figure out how to fix them?

crosenth commented 6 years ago

I have fixed some of the warnings.

There is an additional warning coming from numpy.median that numpy may fix in a future numpy release.

deenurp-env/lib/python2.7/site-packages/numpy/core/fromnumeric.py:664: UserWarning: Warning: 'partition' will ignore the 'mask' of the MaskedArray.
  a.partition(kth, axis=axis, kind=kind, order=order)
nhoffman commented 6 years ago

I'm in the process of fixing this - the easiest fix seems to be to discard the masked values using the .compressed() method before passing to np.percentile()