Skip to content

Commit

Permalink
Merge 41a6a82 into 669a94b
Browse files Browse the repository at this point in the history
  • Loading branch information
joyceyan authored Nov 4, 2024
2 parents 669a94b + 41a6a82 commit 25b6e62
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions DEV_ENV_WITHOUT_DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,25 @@ Run functional tests for WMG api against the `dev` environment.
**NOTE**: `dev` environment is a remote environment. These functional tests run locally against a backend in a remote environment called `dev`.

1. `AWS_PROFILE=single-cell-dev DEPLOYMENT_STAGE=dev pytest -v tests/functional/backend/wmg/test_wmg_api.py`

### Set up vips

You may run into issues with finding `_libvips` if you're running a Jupyter notebook locally that calls `pyvips`, such as when running CXG conversion locally. The error may look like this:

```
ModuleNotFoundError Traceback (most recent call last)
File ~/miniconda3/envs/py11/lib/python3.11/site-packages/pyvips/__init__.py:19
18 try:
---> 19 import _libvips
21 logger.debug('Loaded binary module _libvips')
ModuleNotFoundError: No module named '_libvips'
```

To resolve this, you'll need to install `vips` with `brew install vips`, because this is a dependency that `pyvips` has. If you're using conda, you'll have to also tell your conda environment where homebrew installed `vips`. You can do this with:

```
mkdir -p ~/miniconda3/envs/<CONDA_ENV_NAME>/etc/conda/activate.d
touch ~/miniconda3/envs/<CONDA_ENV_NAME>/etc/conda/activate.d/env_vars.sh
echo 'export DYLD_LIBRARY_PATH=/opt/homebrew/lib:$DYLD_LIBRARY_PATH' >> ~/miniconda3/envs/<CONDA_ENV_NAME>/etc/conda/activate.d/env_vars.sh
```
2 changes: 1 addition & 1 deletion backend/layers/processing/h5ad_data_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def validate_anndata(self):

def extract_anndata_elements_from_file(self):
logging.info(f"Reading in AnnData dataset: {path.basename(self.input_filename)}")
self.anndata = anndata.read_h5ad(self.input_filename, backed="r")
self.anndata = anndata.read_h5ad(self.input_filename)
logging.info("Completed reading in AnnData dataset!")

self.obs = self.transform_dataframe_index_into_column(self.anndata.obs, "obs", self.obs_index_column_name)
Expand Down

0 comments on commit 25b6e62

Please sign in to comment.