Skip to content

Commit

Permalink
fixed issue with older anndata versions
Browse files Browse the repository at this point in the history
  • Loading branch information
HAL9032 committed Dec 5, 2024
1 parent 5e5c383 commit 9606066
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions episcanpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# some technical stuff
import sys
from packaging.version import Version
from .utils import check_versions, annotate_doc_types
from ._version import get_versions # version generated by versioneer

Expand All @@ -25,14 +26,21 @@
from . import preprocessing as pp
from . import count_matrix as ct
from . import plotting as pl

# import read functions
from .preprocessing._load_matrix import read_ATAC_10x, read_h5
from .preprocessing._load_matrix import read_h5 as read_h5_atac

# read functions from AnnData
from anndata import AnnData
from anndata import read
from anndata.io import read_h5ad, read_csv, read_excel, read_hdf, read_loom, read_mtx, read_text, read_umi_tools

import anndata

if Version(anndata.__version__) < Version("0.11.0rc2"):
from anndata import read_h5ad, read_csv, read_excel, read_hdf, read_loom, read_mtx, read_text, read_umi_tools
else:
from anndata.io import read_h5ad, read_csv, read_excel, read_hdf, read_loom, read_mtx, read_text, read_umi_tools


# import multidata information
Expand All @@ -41,4 +49,3 @@
# import settings for plots
import scanpy as sc
from scanpy import set_figure_params

0 comments on commit 9606066

Please sign in to comment.