From ae15b5001c38cd75730714e91305381e5ecfe581 Mon Sep 17 00:00:00 2001 From: Danila Bredikhin Date: Wed, 7 Jun 2023 13:03:45 +0400 Subject: [PATCH] v0.1.4 - Bump version - Add changelog - Fix tests for new AnnData dtype behaviour --- docs/source/changelog.rst | 18 ++++++++++++++++++ muon/__init__.py | 2 +- tests/test_atac_preproc.py | 6 +++--- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 4218da3..0d55dbf 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -9,6 +9,24 @@ Release notes * +v0.1.4 +------ + +This release comes with improvements and fixes: + +* :func:`muon.pp.intersect_obs` now works for modalities that have no ``.X`` + +* :func:`muon.pl.embedding` now saves the colour palette in ``.uns`` + +* :func:`muon.atac.pl.fragment_histogram` and :func:`muon.pl.histogram` now have save/show arguments + +* :func:`muon.atac.tl.count_fragments_features` now has a ``stranded`` argument + +* :func:`muon.atac.tl.nucleosome_signal` now works on more ``pysam`` setups + +* support for numpy 1.24 and newer scanpy versions + + v0.1.3 ------ diff --git a/muon/__init__.py b/muon/__init__.py index 52a5619..1e50138 100644 --- a/muon/__init__.py +++ b/muon/__init__.py @@ -13,4 +13,4 @@ from . import atac from . import prot -__version__ = "0.1.3" +__version__ = "0.1.4" diff --git a/tests/test_atac_preproc.py b/tests/test_atac_preproc.py index 5aa1929..e23659b 100644 --- a/tests/test_atac_preproc.py +++ b/tests/test_atac_preproc.py @@ -11,7 +11,7 @@ class TestTFIDF(unittest.TestCase): def setUp(self): np.random.seed(2020) x = np.abs(np.random.normal(size=(4, 5))) - self.adata = AnnData(x) + self.adata = AnnData(x, dtype=x.dtype) def test_tfidf(self): adata = self.adata.copy() @@ -49,11 +49,11 @@ class TestTFIDFSparse(unittest.TestCase): def setUp(self): np.random.seed(2020) x = rand(100, 10, density=0.2, format="csr") - self.adata = AnnData(x) + self.adata = AnnData(x, dtype=x.dtype) def test_tfidf(self): ac.pp.tfidf(self.adata, log_tf=True, log_idf=True) - self.assertEqual(str("%.3f" % self.adata.X[10, 9]), "18.748") + self.assertEqual(str("%.3f" % self.adata.X[10, 9]), "18.749") self.assertEqual(str("%.3f" % self.adata.X[50, 5]), "0.000")