---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-6-7835ead5dcea> in <module>
----> 1 adata = adata[adata.obs['n_genes'] > 200, :]
~/.conda/envs/single_cell_integration/lib/python3.6/site-packages/anndata/base.py in __getitem__(self, index)
1292 def __getitem__(self, index):
1293 """Returns a sliced view of the object."""
-> 1294 return self._getitem_view(index)
1295
1296 def _getitem_view(self, index):
~/.conda/envs/single_cell_integration/lib/python3.6/site-packages/anndata/base.py in _getitem_view(self, index)
1296 def _getitem_view(self, index):
1297 oidx, vidx = self._normalize_indices(index)
-> 1298 return AnnData(self, oidx=oidx, vidx=vidx, asview=True)
1299
1300 # this is used in the setter for uns, if a view
~/.conda/envs/single_cell_integration/lib/python3.6/site-packages/anndata/base.py in __init__(self, X, obs, var, uns, obsm, varm, layers, raw, dtype, shape, filename, filemode, asview, oidx, vidx)
674 if not isinstance(X, AnnData):
675 raise ValueError('`X` has to be an AnnData object.')
--> 676 self._init_as_view(X, oidx, vidx)
677 else:
678 self._init_as_actual(
~/.conda/envs/single_cell_integration/lib/python3.6/site-packages/anndata/base.py in _init_as_view(self, adata_ref, oidx, vidx)
705 self._varm = ArrayView(adata_ref.varm[vidx_normalized], view_args=(self, 'varm'))
706 # hackish solution here, no copy should be necessary
--> 707 uns_new = deepcopy(self._adata_ref._uns)
708 # need to do the slicing before setting the updated self._n_obs, self._n_vars
709 self._n_obs = self._adata_ref.n_obs # use the original n_obs here
~/.conda/envs/single_cell_integration/lib/python3.6/copy.py in deepcopy(x, memo, _nil)
178 y = x
179 else:
--> 180 y = _reconstruct(x, memo, *rv)
181
182 # If is its own copy, don't memoize.
~/.conda/envs/single_cell_integration/lib/python3.6/copy.py in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
278 if state is not None:
279 if deep:
--> 280 state = deepcopy(state, memo)
281 if hasattr(y, '__setstate__'):
282 y.__setstate__(state)
~/.conda/envs/single_cell_integration/lib/python3.6/copy.py in deepcopy(x, memo, _nil)
148 copier = _deepcopy_dispatch.get(cls)
149 if copier:
--> 150 y = copier(x, memo)
151 else:
152 try:
~/.conda/envs/single_cell_integration/lib/python3.6/copy.py in _deepcopy_dict(x, memo, deepcopy)
238 memo[id(x)] = y
239 for key, value in x.items():
--> 240 y[deepcopy(key, memo)] = deepcopy(value, memo)
241 return y
242 d[dict] = _deepcopy_dict
~/.conda/envs/single_cell_integration/lib/python3.6/copy.py in deepcopy(x, memo, _nil)
148 copier = _deepcopy_dispatch.get(cls)
149 if copier:
--> 150 y = copier(x, memo)
151 else:
152 try:
~/.conda/envs/single_cell_integration/lib/python3.6/copy.py in _deepcopy_tuple(x, memo, deepcopy)
218
219 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
--> 220 y = [deepcopy(a, memo) for a in x]
221 # We're not going to put the tuple in the memo, but it's still important we
222 # check for it, in case the tuple contains recursive mutable structures.
~/.conda/envs/single_cell_integration/lib/python3.6/copy.py in <listcomp>(.0)
218
219 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
--> 220 y = [deepcopy(a, memo) for a in x]
221 # We're not going to put the tuple in the memo, but it's still important we
222 # check for it, in case the tuple contains recursive mutable structures.
~/.conda/envs/single_cell_integration/lib/python3.6/copy.py in deepcopy(x, memo, _nil)
178 y = x
179 else:
--> 180 y = _reconstruct(x, memo, *rv)
181
182 # If is its own copy, don't memoize.
~/.conda/envs/single_cell_integration/lib/python3.6/copy.py in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
278 if state is not None:
279 if deep:
--> 280 state = deepcopy(state, memo)
281 if hasattr(y, '__setstate__'):
282 y.__setstate__(state)
~/.conda/envs/single_cell_integration/lib/python3.6/copy.py in deepcopy(x, memo, _nil)
148 copier = _deepcopy_dispatch.get(cls)
149 if copier:
--> 150 y = copier(x, memo)
151 else:
152 try:
~/.conda/envs/single_cell_integration/lib/python3.6/copy.py in _deepcopy_dict(x, memo, deepcopy)
238 memo[id(x)] = y
239 for key, value in x.items():
--> 240 y[deepcopy(key, memo)] = deepcopy(value, memo)
241 return y
242 d[dict] = _deepcopy_dict
~/.conda/envs/single_cell_integration/lib/python3.6/copy.py in deepcopy(x, memo, _nil)
178 y = x
179 else:
--> 180 y = _reconstruct(x, memo, *rv)
181
182 # If is its own copy, don't memoize.
~/.conda/envs/single_cell_integration/lib/python3.6/copy.py in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
278 if state is not None:
279 if deep:
--> 280 state = deepcopy(state, memo)
281 if hasattr(y, '__setstate__'):
282 y.__setstate__(state)
~/.conda/envs/single_cell_integration/lib/python3.6/copy.py in deepcopy(x, memo, _nil)
148 copier = _deepcopy_dispatch.get(cls)
149 if copier:
--> 150 y = copier(x, memo)
151 else:
152 try:
~/.conda/envs/single_cell_integration/lib/python3.6/copy.py in _deepcopy_dict(x, memo, deepcopy)
238 memo[id(x)] = y
239 for key, value in x.items():
--> 240 y[deepcopy(key, memo)] = deepcopy(value, memo)
241 return y
242 d[dict] = _deepcopy_dict
~/.conda/envs/single_cell_integration/lib/python3.6/copy.py in deepcopy(x, memo, _nil)
178 y = x
179 else:
--> 180 y = _reconstruct(x, memo, *rv)
181
182 # If is its own copy, don't memoize.
~/.conda/envs/single_cell_integration/lib/python3.6/copy.py in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
305 key = deepcopy(key, memo)
306 value = deepcopy(value, memo)
--> 307 y[key] = value
308 else:
309 for key, value in dictiter:
~/.conda/envs/single_cell_integration/lib/python3.6/site-packages/anndata/base.py in __setitem__(self, idx, value)
455 else:
456 adata_view, attr_name = self._view_args
--> 457 _init_actual_AnnData(adata_view)
458 getattr(adata_view, attr_name)[idx] = value
459
~/.conda/envs/single_cell_integration/lib/python3.6/site-packages/anndata/base.py in _init_actual_AnnData(adata_view)
373
374 def _init_actual_AnnData(adata_view):
--> 375 if adata_view.isbacked:
376 raise ValueError(
377 'You cannot modify elements of an AnnData view, '
~/.conda/envs/single_cell_integration/lib/python3.6/site-packages/anndata/base.py in isbacked(self)
1188 def isbacked(self):
1189 """``True`` if object is backed on disk, ``False`` otherwise."""
-> 1190 return self.filename is not None
1191
1192 @property
~/.conda/envs/single_cell_integration/lib/python3.6/site-packages/anndata/base.py in filename(self)
1204 want to copy the previous file, use ``copy(filename='new_filename')``.
1205 """
-> 1206 return self.file.filename
1207
1208 @filename.setter
AttributeError: 'AnnData' object has no attribute 'file'