diff --git a/poetry.lock b/poetry.lock index b7eb194e..ffe2425d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2335,31 +2335,32 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "polars" -version = "0.19.19" +version = "0.20.6" description = "Blazingly fast DataFrame library" optional = false python-versions = ">=3.8" files = [ - {file = "polars-0.19.19-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:812dbb0cc7027fd41ce6b3eaf100b94828fc082fab026409d48792e3e7014095"}, - {file = "polars-0.19.19-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:21a334e18c83a259211ca6ec182498f3a89297fde9b8f75021c6881ff4411201"}, - {file = "polars-0.19.19-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d383fac392b08a6d5830c99f6e735a48e390c1535c8f1e67707fcaab6863ade5"}, - {file = "polars-0.19.19-cp38-abi3-manylinux_2_24_aarch64.whl", hash = "sha256:eec0e72dce84b85c427bbf395d2e181f33e60677695b95ee2e87fed51043bdea"}, - {file = "polars-0.19.19-cp38-abi3-win_amd64.whl", hash = "sha256:6c9e597efac74f00ef9cdfd9ba8a9128ed24276916bd3d60adc6e604530e4b37"}, - {file = "polars-0.19.19.tar.gz", hash = "sha256:3e904d197aabf36e37fda263470eaf51ec92fb865cdea4f93947713480199303"}, + {file = "polars-0.20.6-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:59845bae0b614b3291baa889cfc2a251e1024129696bb655596f2b5556e9f9a1"}, + {file = "polars-0.20.6-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:9e86736f68440bf97a9100fa0a79ae7ce616d1af6fd4669fff1345f03aab14c0"}, + {file = "polars-0.20.6-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4f4e3335fdcc863f6aac0616510b1baa5e13d5e818ebbfcb980ad534bd6edc2"}, + {file = "polars-0.20.6-cp38-abi3-manylinux_2_24_aarch64.whl", hash = "sha256:7c7b494beea914a54bcae8868dee3988a88ecb48525df948e07aacf2fb83e711"}, + {file = "polars-0.20.6-cp38-abi3-win_amd64.whl", hash = "sha256:a96b157d68697c8d6ef2f7c2cc1734d498c3c6cc0c9c18d4fff7283ccfabdd1d"}, + {file = "polars-0.20.6.tar.gz", hash = "sha256:b53553308bc7e2b4f841b18f1949b61ed7f2cf155c5c64712298efa5af67a997"}, ] [package.extras] adbc = ["adbc_driver_sqlite"] -all = ["polars[adbc,cloudpickle,connectorx,deltalake,fsspec,gevent,matplotlib,numpy,pandas,pyarrow,pydantic,pyiceberg,sqlalchemy,timezone,xlsx2csv,xlsxwriter]"] +all = ["polars[adbc,cloudpickle,connectorx,deltalake,fsspec,gevent,numpy,pandas,plot,pyarrow,pydantic,pyiceberg,sqlalchemy,timezone,xlsx2csv,xlsxwriter]"] cloudpickle = ["cloudpickle"] connectorx = ["connectorx (>=0.3.2)"] -deltalake = ["deltalake (>=0.13.0)"] +deltalake = ["deltalake (>=0.14.0)"] fsspec = ["fsspec"] gevent = ["gevent"] matplotlib = ["matplotlib"] numpy = ["numpy (>=1.16.0)"] openpyxl = ["openpyxl (>=3.0.0)"] pandas = ["pandas", "pyarrow (>=7.0.0)"] +plot = ["hvplot (>=0.9.1)"] pyarrow = ["pyarrow (>=7.0.0)"] pydantic = ["pydantic"] pyiceberg = ["pyiceberg (>=0.5.0)"] @@ -3161,24 +3162,24 @@ python-versions = ">=3.6" files = [ {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b42169467c42b692c19cf539c38d4602069d8c1505e97b86387fcf7afb766e1d"}, {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-macosx_13_0_arm64.whl", hash = "sha256:07238db9cbdf8fc1e9de2489a4f68474e70dffcb32232db7c08fa61ca0c7c462"}, - {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:d92f81886165cb14d7b067ef37e142256f1c6a90a65cd156b063a43da1708cfd"}, {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:fff3573c2db359f091e1589c3d7c5fc2f86f5bdb6f24252c2d8e539d4e45f412"}, + {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-manylinux_2_24_aarch64.whl", hash = "sha256:aa2267c6a303eb483de8d02db2871afb5c5fc15618d894300b88958f729ad74f"}, {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:840f0c7f194986a63d2c2465ca63af8ccbbc90ab1c6001b1978f05119b5e7334"}, {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:024cfe1fc7c7f4e1aff4a81e718109e13409767e4f871443cbff3dba3578203d"}, {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-win32.whl", hash = "sha256:c69212f63169ec1cfc9bb44723bf2917cbbd8f6191a00ef3410f5a7fe300722d"}, {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-win_amd64.whl", hash = "sha256:cabddb8d8ead485e255fe80429f833172b4cadf99274db39abc080e068cbcc31"}, {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:bef08cd86169d9eafb3ccb0a39edb11d8e25f3dae2b28f5c52fd997521133069"}, {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-macosx_13_0_arm64.whl", hash = "sha256:b16420e621d26fdfa949a8b4b47ade8810c56002f5389970db4ddda51dbff248"}, - {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-manylinux2014_aarch64.whl", hash = "sha256:b5edda50e5e9e15e54a6a8a0070302b00c518a9d32accc2346ad6c984aacd279"}, {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:25c515e350e5b739842fc3228d662413ef28f295791af5e5110b543cf0b57d9b"}, + {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-manylinux_2_24_aarch64.whl", hash = "sha256:1707814f0d9791df063f8c19bb51b0d1278b8e9a2353abbb676c2f685dee6afe"}, {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:46d378daaac94f454b3a0e3d8d78cafd78a026b1d71443f4966c696b48a6d899"}, {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:09b055c05697b38ecacb7ac50bdab2240bfca1a0c4872b0fd309bb07dc9aa3a9"}, {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-win32.whl", hash = "sha256:53a300ed9cea38cf5a2a9b069058137c2ca1ce658a874b79baceb8f892f915a7"}, {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-win_amd64.whl", hash = "sha256:c2a72e9109ea74e511e29032f3b670835f8a59bbdc9ce692c5b4ed91ccf1eedb"}, {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:ebc06178e8821efc9692ea7544aa5644217358490145629914d8020042c24aa1"}, {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-macosx_13_0_arm64.whl", hash = "sha256:edaef1c1200c4b4cb914583150dcaa3bc30e592e907c01117c08b13a07255ec2"}, - {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-manylinux2014_aarch64.whl", hash = "sha256:7048c338b6c86627afb27faecf418768acb6331fc24cfa56c93e8c9780f815fa"}, {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d176b57452ab5b7028ac47e7b3cf644bcfdc8cacfecf7e71759f7f51a59e5c92"}, + {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-manylinux_2_24_aarch64.whl", hash = "sha256:1dc67314e7e1086c9fdf2680b7b6c2be1c0d8e3a8279f2e993ca2a7545fecf62"}, {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:3213ece08ea033eb159ac52ae052a4899b56ecc124bb80020d9bbceeb50258e9"}, {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:aab7fd643f71d7946f2ee58cc88c9b7bfc97debd71dcc93e03e2d174628e7e2d"}, {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-win32.whl", hash = "sha256:5c365d91c88390c8d0a8545df0b5857172824b1c604e867161e6b3d59a827eaa"}, @@ -3186,7 +3187,7 @@ files = [ {file = "ruamel.yaml.clib-0.2.8-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:a5aa27bad2bb83670b71683aae140a1f52b0857a2deff56ad3f6c13a017a26ed"}, {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c58ecd827313af6864893e7af0a3bb85fd529f862b6adbefe14643947cfe2942"}, {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-macosx_12_0_arm64.whl", hash = "sha256:f481f16baec5290e45aebdc2a5168ebc6d35189ae6fea7a58787613a25f6e875"}, - {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:3fcc54cb0c8b811ff66082de1680b4b14cf8a81dce0d4fbf665c2265a81e07a1"}, + {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-manylinux_2_24_aarch64.whl", hash = "sha256:77159f5d5b5c14f7c34073862a6b7d34944075d9f93e681638f6d753606c6ce6"}, {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:7f67a1ee819dc4562d444bbafb135832b0b909f81cc90f7aa00260968c9ca1b3"}, {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:4ecbf9c3e19f9562c7fdd462e8d18dd902a47ca046a2e64dba80699f0b6c09b7"}, {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:87ea5ff66d8064301a154b3933ae406b0863402a799b16e4a1d24d9fbbcbe0d3"}, @@ -3194,7 +3195,7 @@ files = [ {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-win_amd64.whl", hash = "sha256:3f215c5daf6a9d7bbed4a0a4f760f3113b10e82ff4c5c44bec20a68c8014f675"}, {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1b617618914cb00bf5c34d4357c37aa15183fa229b24767259657746c9077615"}, {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-macosx_12_0_arm64.whl", hash = "sha256:a6a9ffd280b71ad062eae53ac1659ad86a17f59a0fdc7699fd9be40525153337"}, - {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:665f58bfd29b167039f714c6998178d27ccd83984084c286110ef26b230f259f"}, + {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-manylinux_2_24_aarch64.whl", hash = "sha256:305889baa4043a09e5b76f8e2a51d4ffba44259f6b4c72dec8ca56207d9c6fe1"}, {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:700e4ebb569e59e16a976857c8798aee258dceac7c7d6b50cab63e080058df91"}, {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:e2b4c44b60eadec492926a7270abb100ef9f72798e18743939bdbf037aab8c28"}, {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e79e5db08739731b0ce4850bed599235d601701d5694c36570a99a0c5ca41a9d"}, @@ -3202,7 +3203,7 @@ files = [ {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-win_amd64.whl", hash = "sha256:56f4252222c067b4ce51ae12cbac231bce32aee1d33fbfc9d17e5b8d6966c312"}, {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:03d1162b6d1df1caa3a4bd27aa51ce17c9afc2046c31b0ad60a0a96ec22f8001"}, {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:bba64af9fa9cebe325a62fa398760f5c7206b215201b0ec825005f1b18b9bccf"}, - {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:9eb5dee2772b0f704ca2e45b1713e4e5198c18f515b52743576d196348f374d3"}, + {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-manylinux_2_24_aarch64.whl", hash = "sha256:a1a45e0bb052edf6a1d3a93baef85319733a888363938e1fc9924cb00c8df24c"}, {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:da09ad1c359a728e112d60116f626cc9f29730ff3e0e7db72b9a2dbc2e4beed5"}, {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:184565012b60405d93838167f425713180b949e9d8dd0bbc7b49f074407c5a8b"}, {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a75879bacf2c987c003368cf14bed0ffe99e8e85acfa6c0bfffc21a090f16880"}, @@ -4187,4 +4188,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.12" -content-hash = "bb86ab92303cc233051c4696443a289f03aa5072b32670ecee051c8521fc27c4" +content-hash = "8aa03eb523b291de8f69694f9ed9468cdb4ba1948d19eb06c1da6c712402650c" diff --git a/pyproject.toml b/pyproject.toml index c87418cf..59784dd8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ pyarrow = ">=13,<15" semver = "^3.0.0" ruamel-yaml = "^0.17.21" pydantic = "^1.10.7" -polars = "^0.19" +polars = "^0.20" importlib-resources = "^5.12.0" fsspec = "^2023.9.0" fastparquet = "^2023.8.0" diff --git a/src/pixelator/analysis/colocalization/__init__.py b/src/pixelator/analysis/colocalization/__init__.py index 3a1118d6..c032c2c5 100644 --- a/src/pixelator/analysis/colocalization/__init__.py +++ b/src/pixelator/analysis/colocalization/__init__.py @@ -66,7 +66,9 @@ def colocalization_from_component_edgelist( graph = Graph.from_edgelist( edgelist=edgelist, add_marker_counts=True, - simplify=False, + # If we do A-node projection, we will simplify anyway. + # This just removes the warning. + simplify=False if use_full_bipartite else True, use_full_bipartite=use_full_bipartite, ) return colocalization_from_component_graph( @@ -244,7 +246,9 @@ def data(): graph = Graph.from_edgelist( edgelist=component_df, add_marker_counts=True, - simplify=False, + # If we do A-node projection, we will simplify anyway. + # This just removes the warning. + simplify=False if use_full_bipartite else True, use_full_bipartite=use_full_bipartite, ) if len(graph.vs) < 2: diff --git a/src/pixelator/analysis/colocalization/prepare.py b/src/pixelator/analysis/colocalization/prepare.py index f15ecc42..dd3c76f4 100644 --- a/src/pixelator/analysis/colocalization/prepare.py +++ b/src/pixelator/analysis/colocalization/prepare.py @@ -41,7 +41,9 @@ def prepare_from_edgelist( .groupby(by=group_by)["marker"] .value_counts() .reset_index() - ).pivot_table(index=group_by, columns="marker", values="count", fill_value=0) + ).pivot_table( + index=group_by, columns="marker", values="count", fill_value=0, observed=False + ) markers_per_pixel.columns.name = "markers" markers_per_pixel.index.name = "node" markers_per_pixel.index = markers_per_pixel.index.astype("string[pyarrow]") diff --git a/src/pixelator/analysis/colocalization/statistics.py b/src/pixelator/analysis/colocalization/statistics.py index c1dcabc5..8a0402b8 100644 --- a/src/pixelator/analysis/colocalization/statistics.py +++ b/src/pixelator/analysis/colocalization/statistics.py @@ -24,7 +24,7 @@ def _wide_correlation_matrix_to_long_correlation_results( df_lower_tri = df.mask(~lower_triangle) df_lower_tri.index.set_names(["marker_cols"], inplace=True) df_lower_tri.columns.set_names(["marker_rows"], inplace=True) - correlation_values = df_lower_tri.stack(dropna=True).reset_index() + correlation_values = df_lower_tri.stack(future_stack=True).dropna().reset_index() correlation_values.columns = ["marker_1", "marker_2", stat_name] correlation_values.set_index(["marker_1", "marker_2"], inplace=True) correlation_values.index.rename(["marker_1", "marker_2"]) diff --git a/src/pixelator/config/panel.py b/src/pixelator/config/panel.py index 4d7f35c0..3ac0f471 100644 --- a/src/pixelator/config/panel.py +++ b/src/pixelator/config/panel.py @@ -183,23 +183,25 @@ def _transform_legacy_panels(cls, df: pd.DataFrame) -> pd.DataFrame: :param df: DataFrame with data of the panel to validate :returns pd.DataFrame: The in-place modified input dataframe """ - new_df = df.copy() - # update control and nuclear column to boolean - TR_TABLE = {"(?i)no": "False", "(?i)yes": "True"} - - new_df.replace( - { - "control": TR_TABLE, - "nuclear": TR_TABLE, - }, - regex=True, - inplace=True, + TR_TABLE = {"(?i)yes": "True", "(?i)no": "False"} + + df["control"] = ( + df["control"] + .astype("string[pyarrow]") + .fillna("") + .replace(TR_TABLE, regex=True) + .astype(bool) + ) + df["nuclear"] = ( + df["nuclear"] + .astype("string[pyarrow]") + .fillna("") + .replace(TR_TABLE, regex=True) + .astype(bool) ) - new_df.fillna({"control": "False", "nuclear": "False"}, inplace=True) - new_df["control"] = new_df["control"].map({"True": True, "False": False}) - new_df["nuclear"] = new_df["nuclear"].map({"True": True, "False": False}) - return new_df + + return df @classmethod def _parse_header(cls, file: Path) -> AntibodyPanelMetadata: diff --git a/src/pixelator/report/qcreport/collect.py b/src/pixelator/report/qcreport/collect.py index 96df79e8..e1e3673a 100644 --- a/src/pixelator/report/qcreport/collect.py +++ b/src/pixelator/report/qcreport/collect.py @@ -116,9 +116,9 @@ def collect_reads_per_umi_frequency(dataset: PixelDataset) -> str: freq = freq.with_columns( pl.col("reads_per_umi"), - frequency=pl.col("counts") / pl.col("counts").sum(), + frequency=pl.col("count") / pl.col("count").sum(), ) - pd_freq = freq.rename({"counts": "count"}).sort(by="reads_per_umi").to_pandas() + pd_freq = freq.sort(by="reads_per_umi").to_pandas() return pd_freq.to_csv(index=False) diff --git a/tests/data/param_files/test_data_pe_T1.amplicon.meta.json b/tests/data/param_files/test_data_pe_T1.amplicon.meta.json index aeff3a9c..46748f71 100644 --- a/tests/data/param_files/test_data_pe_T1.amplicon.meta.json +++ b/tests/data/param_files/test_data_pe_T1.amplicon.meta.json @@ -1,10 +1,8 @@ { - "cli": { - "command": "pixelator single-cell amplicon", - "options": { - "--input1-pattern": "_R1", - "--input2-pattern": "_R2", - "--output": "." - } + "cli": { + "command": "pixelator single-cell amplicon", + "options": { + "--output": "." } + } } diff --git a/tests/data/report/info_and_metrics.json b/tests/data/report/info_and_metrics.json index 4b9a88e6..7524bfe9 100644 --- a/tests/data/report/info_and_metrics.json +++ b/tests/data/report/info_and_metrics.json @@ -364,18 +364,6 @@ { "command": "pixelator single-cell amplicon", "options": [ - { - "name": "--input1-pattern", - "value": "_R1", - "default_value": "_R1", - "description": "The string pattern to use to identify forward (R1) files" - }, - { - "name": "--input2-pattern", - "value": "_R2", - "default_value": "_R2", - "description": "The string pattern to use to identify reverse (R2) files" - }, { "name": "--output", "value": ".", diff --git a/tests/graph/test_graph.py b/tests/graph/test_graph.py index 2d233163..c9a99d1d 100644 --- a/tests/graph/test_graph.py +++ b/tests/graph/test_graph.py @@ -25,8 +25,8 @@ def create_simple_edge_list_from_graph( df = graph.get_edge_dataframe() df_vert = graph.get_vertex_dataframe() - df["source"].replace(df_vert["name"], inplace=True) - df["target"].replace(df_vert["name"], inplace=True) + df["source"] = df["source"].replace(df_vert["name"]) + df["target"] = df["target"].replace(df_vert["name"]) # rename source/target columns df = df.rename(columns={"source": "upib", "target": "upia"}) diff --git a/tests/plot/test_plot.py b/tests/plot/test_plot.py index acc485e3..efe26c1f 100644 --- a/tests/plot/test_plot.py +++ b/tests/plot/test_plot.py @@ -3,8 +3,8 @@ Copyright (c) 2023 Pixelgen Technologies AB. """ - import numpy as np +import pytest from numpy.testing import assert_almost_equal from pixelator.graph import Graph from pixelator.plot import ( @@ -460,10 +460,17 @@ def test_plot_3d_heatmap(edgelist): simplify=True, use_full_bipartite=False, ) - # For now, just making sure that this doesn't crash when running. - _ = plot_3d_heatmap( - graph, - layout_algorithm="fruchterman_reingold_3d", - marker="CD3", - distance_cutoff=0.4, - ) + with pytest.warns( + UserWarning, + match=( + "The function `plot_3d_heatmap` is experimental, " + "it might be removed or the API might change without notice." + ), + ): + # For now, just making sure that this doesn't crash when running. + _ = plot_3d_heatmap( + graph, + layout_algorithm="fruchterman_reingold_3d", + marker="CD3", + distance_cutoff=0.4, + )