From d90aa17970ed51a9d29385ba52ca12e293de263a Mon Sep 17 00:00:00 2001 From: Vladimir Shitov Date: Tue, 17 Sep 2024 14:52:07 +0200 Subject: [PATCH 01/16] Add atac_marker_peaks component --- .../atac_marker_peaks/config.vsh.yaml | 85 +++++++++++++++++++ src/interpret/atac_marker_peaks/script.py | 42 +++++++++ src/interpret/atac_marker_peaks/test.py | 65 ++++++++++++++ 3 files changed, 192 insertions(+) create mode 100644 src/interpret/atac_marker_peaks/config.vsh.yaml create mode 100644 src/interpret/atac_marker_peaks/script.py create mode 100644 src/interpret/atac_marker_peaks/test.py diff --git a/src/interpret/atac_marker_peaks/config.vsh.yaml b/src/interpret/atac_marker_peaks/config.vsh.yaml new file mode 100644 index 00000000000..86ad50d4e09 --- /dev/null +++ b/src/interpret/atac_marker_peaks/config.vsh.yaml @@ -0,0 +1,85 @@ +name: atac_marker_peaks +namespace: "interpret" +description: | + Rank differentially accessible peaks for each group of cells. + +authors: + - __merge__: /src/authors/vladimir_shitov.yaml + roles: [ author ] +argument_groups: + - name: Inputs + arguments: + - name: "--input" + type: file + description: Input h5mu file + direction: input + required: true + example: input.h5mu + - name: "--modality" + type: string + default: "atac" + required: false + - name: Outputs + arguments: + - name: "--output" + type: file + description: Output h5mu file. + direction: output + example: output.h5mu + - name: "--output_compression" + type: string + description: The compression format to be used on the output h5mu object. + choices: ["gzip", "lzf"] + required: false + example: "gzip" + - name: "--output_df" + type: file + description: Output tsv file with marker peaks. + direction: output + example: marker_peaks.tsv + - name: Arguments + arguments: + - name: "--groupby" + type: string + description: The group to use for ranking peaks. + required: true + example: "leiden" + - name: "--method" + type: string + description: The method to use for ranking peaks. + choices: ["t-test", "wilcoxon", "logreg", "t-test_overestim_var"] + required: false + default: "t-test" +resources: + - type: python_script + path: script.py + - path: /src/utils/setup_logger.py +test_resources: + - type: python_script + path: test.py + - path: /resources_test/cellranger_atac_tiny_bcl/counts/ +engines: + - type: docker + image: python:3.9-slim + setup: + - type: apt + packages: + - procps + - pkg-config # Otherwise h5py installation fails, which is required for scanpy + - libhdf5-dev + - gcc + - type: python + __merge__: [/src/base/requirements/anndata_mudata.yaml, .] + packages: + - numpy~=1.23.5 + - scanpy~=1.9.3 + - muon~=0.1.5 + - pysam~=0.22.0 + test_setup: + - type: python + __merge__: [ /src/base/requirements/viashpy.yaml, /src/base/requirements/scanpy.yaml, .] +runners: + - type: executable + - type: nextflow + directives: + label: [singlecpu, midmem] \ No newline at end of file diff --git a/src/interpret/atac_marker_peaks/script.py b/src/interpret/atac_marker_peaks/script.py new file mode 100644 index 00000000000..e4f7830c908 --- /dev/null +++ b/src/interpret/atac_marker_peaks/script.py @@ -0,0 +1,42 @@ +import mudata +import muon as mu +import pandas as pd + +### VIASH START +par = { + "input": "resources_test/pbmc_1k_protein_v3/pbmc_1k_protein_v3_mms.h5mu", + "output": "foo.h5mu", + "output_df": "marker_peaks.tsv", + "output_compression": "gzip", + "modality": "atac", + "groupby": "leiden", + "method": "t-test", +} +### VIASH END + +def main(): + mdata = mudata.read(par["input"].strip()) + mod = mdata.mod[par["modality"]] + + if not "peak_annotation" in mod.uns.keys(): + raise ValueError("Peak annotation not found. Please run `muon.atac.tl.add_peak_annotation` first.") + + mu.atac.tl.rank_peaks_groups(mod, par["groupby"], method=par["method"]) + + result = mod.uns["rank_genes_groups"] + groups = result["names"].dtype.names + + marker_peaks_df = pd.DataFrame({ + group + "_" + key: result[key][group] + for group in groups + for key in ["names", "genes", "pvals_adj"] + }) + + mdata.mod[par["modality"]].uns["rank_genes_groups"] = mod.uns["rank_genes_groups"] + + mdata.write_h5mu(par["output"].strip(), compression=par["output_compression"]) + + marker_peaks_df.to_csv(par["output_marker_peaks"].strip(), sep="\t", index=False) + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/src/interpret/atac_marker_peaks/test.py b/src/interpret/atac_marker_peaks/test.py new file mode 100644 index 00000000000..8f71a590a55 --- /dev/null +++ b/src/interpret/atac_marker_peaks/test.py @@ -0,0 +1,65 @@ +import sys +from pathlib import Path +import os +import pytest + +import mudata as md +import scanpy as sc +import muon as mu +import pandas as pd + +## VIASH START +meta = { + 'executable': './target/docker/qc/calculate_atac_qc_metrics/calculate_atac_qc_metrics', + 'resources_dir': "./resources_test/cellranger_atac_tiny_bcl/counts/", + 'config': './src/qc/calculate_atac_qc_metrics/config.vsh.yaml', + 'cpus': 2 +} +## VIASH END + +@pytest.fixture +def tiny_atac_mudata(tmp_path): + resources_dir = Path(meta["resources_dir"]) + mdata = mu.read_10x_h5(resources_dir / "counts" / "filtered_peak_bc_matrix.h5") + mu.atac.tl.locate_fragments(mdata, fragments=str(resources_dir / "counts" / "fragments.tsv.gz")) + assert "files" in mdata.mod["atac"].uns.keys() + assert "fragments" in mdata.mod["atac"].uns["files"].keys() + + # Read features annotation and save it to uns + peak_annotation = pd.read_csv(resources_dir / "counts" / "peak_annotation.tsv", sep="\t") + peak_annotation.columns = ["Chromosome", "Start", "End", "gene", "distance", "peak_type"] + peak_annotation["gene"] = peak_annotation["gene"].astype(str) # Fixes saving error + mdata.mod["atac"].uns["peak_annotation"] = peak_annotation + + # Run quick and dirty clustering to be able to calculate markers + sc.pp.neighbors(mdata.mod["atac"]) + sc.tl.leiden(mdata.mod["atac"]) + + mdata_path = tmp_path / "tiny_atac.h5mu" + mdata.write(mdata_path) + + return mdata_path + +@pytest.mark.parametrize("mudata", ["tiny_atac_mudata"]) +def test_qc_columns_in_tables(run_component, request, mudata, tmp_path): + input_path = request.getfixturevalue(mudata) + output_path = tmp_path / "foo.h5mu" + + args = [ + "--input", str(input_path), + "--output", str(output_path), + "--modality", "atac", + "--groupby", "leiden" + ] + + run_component(args) + assert output_path.is_file() + assert "marker_peaks.tsv" in os.listdir(output_path.parent) + + data_with_markers = md.read(output_path) + + assert "rank_genes_groups" in data_with_markers.mod["atac"].uns + + +if __name__ == "__main__": + sys.exit(pytest.main([__file__])) \ No newline at end of file From c9ad3bb3b8d7068010d0692e74d02fca032f539e Mon Sep 17 00:00:00 2001 From: Vladimir Shitov Date: Tue, 17 Sep 2024 15:38:22 +0200 Subject: [PATCH 02/16] Simulate clustering instead of running leiden --- src/interpret/atac_marker_peaks/test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/interpret/atac_marker_peaks/test.py b/src/interpret/atac_marker_peaks/test.py index 8f71a590a55..58a4da7e19c 100644 --- a/src/interpret/atac_marker_peaks/test.py +++ b/src/interpret/atac_marker_peaks/test.py @@ -6,6 +6,7 @@ import mudata as md import scanpy as sc import muon as mu +import numpy as np import pandas as pd ## VIASH START @@ -33,7 +34,9 @@ def tiny_atac_mudata(tmp_path): # Run quick and dirty clustering to be able to calculate markers sc.pp.neighbors(mdata.mod["atac"]) - sc.tl.leiden(mdata.mod["atac"]) + + # Simulate clustering to not install leiden dependencies + mdata.mod["atac"].obs["leiden"] = np.random.choice(np.arange(5), size=mdata.n_obs) mdata_path = tmp_path / "tiny_atac.h5mu" mdata.write(mdata_path) From f5b7444e93952a2617abb9ab8cdaef37cb75e42b Mon Sep 17 00:00:00 2001 From: Vladimir Shitov Date: Tue, 17 Sep 2024 15:38:36 +0200 Subject: [PATCH 03/16] Update dependencies --- src/interpret/atac_marker_peaks/config.vsh.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/interpret/atac_marker_peaks/config.vsh.yaml b/src/interpret/atac_marker_peaks/config.vsh.yaml index 86ad50d4e09..97cace48a50 100644 --- a/src/interpret/atac_marker_peaks/config.vsh.yaml +++ b/src/interpret/atac_marker_peaks/config.vsh.yaml @@ -60,7 +60,7 @@ test_resources: - path: /resources_test/cellranger_atac_tiny_bcl/counts/ engines: - type: docker - image: python:3.9-slim + image: python:3.11-slim setup: - type: apt packages: @@ -73,7 +73,7 @@ engines: packages: - numpy~=1.23.5 - scanpy~=1.9.3 - - muon~=0.1.5 + - muon~=0.1.6 - pysam~=0.22.0 test_setup: - type: python @@ -82,4 +82,4 @@ runners: - type: executable - type: nextflow directives: - label: [singlecpu, midmem] \ No newline at end of file + label: [singlecpu, midmem] From 880c3ba102c8760cbd46c32ae677321464de4329 Mon Sep 17 00:00:00 2001 From: Vladimir Shitov Date: Tue, 17 Sep 2024 15:39:25 +0200 Subject: [PATCH 04/16] Rename test --- src/interpret/atac_marker_peaks/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interpret/atac_marker_peaks/test.py b/src/interpret/atac_marker_peaks/test.py index 58a4da7e19c..2492a858f5c 100644 --- a/src/interpret/atac_marker_peaks/test.py +++ b/src/interpret/atac_marker_peaks/test.py @@ -44,7 +44,7 @@ def tiny_atac_mudata(tmp_path): return mdata_path @pytest.mark.parametrize("mudata", ["tiny_atac_mudata"]) -def test_qc_columns_in_tables(run_component, request, mudata, tmp_path): +def test_marker_peaks(run_component, request, mudata, tmp_path): input_path = request.getfixturevalue(mudata) output_path = tmp_path / "foo.h5mu" From 62831b8864f12c3258b9bc373a2de7f21732cc72 Mon Sep 17 00:00:00 2001 From: Vladimir Shitov Date: Tue, 17 Sep 2024 15:53:35 +0200 Subject: [PATCH 05/16] Make clusters a category --- src/interpret/atac_marker_peaks/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interpret/atac_marker_peaks/test.py b/src/interpret/atac_marker_peaks/test.py index 2492a858f5c..47ba59409c6 100644 --- a/src/interpret/atac_marker_peaks/test.py +++ b/src/interpret/atac_marker_peaks/test.py @@ -36,7 +36,7 @@ def tiny_atac_mudata(tmp_path): sc.pp.neighbors(mdata.mod["atac"]) # Simulate clustering to not install leiden dependencies - mdata.mod["atac"].obs["leiden"] = np.random.choice(np.arange(5), size=mdata.n_obs) + mdata.mod["atac"].obs["leiden"] = pd.Categorical(np.random.choice(np.arange(5), size=mdata.n_obs)) mdata_path = tmp_path / "tiny_atac.h5mu" mdata.write(mdata_path) From 6fc05b0059d99e0e33d824d3d9d21f658e298832 Mon Sep 17 00:00:00 2001 From: Vladimir Shitov Date: Wed, 18 Sep 2024 13:51:36 +0200 Subject: [PATCH 06/16] Add peak annotation with muon funciton --- src/interpret/atac_marker_peaks/test.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/interpret/atac_marker_peaks/test.py b/src/interpret/atac_marker_peaks/test.py index 47ba59409c6..0a96195b302 100644 --- a/src/interpret/atac_marker_peaks/test.py +++ b/src/interpret/atac_marker_peaks/test.py @@ -30,10 +30,7 @@ def tiny_atac_mudata(tmp_path): peak_annotation = pd.read_csv(resources_dir / "counts" / "peak_annotation.tsv", sep="\t") peak_annotation.columns = ["Chromosome", "Start", "End", "gene", "distance", "peak_type"] peak_annotation["gene"] = peak_annotation["gene"].astype(str) # Fixes saving error - mdata.mod["atac"].uns["peak_annotation"] = peak_annotation - - # Run quick and dirty clustering to be able to calculate markers - sc.pp.neighbors(mdata.mod["atac"]) + mu.atac.pp.add_peak_annotation(mdata.mod["atac"], peak_annotation) # Simulate clustering to not install leiden dependencies mdata.mod["atac"].obs["leiden"] = pd.Categorical(np.random.choice(np.arange(5), size=mdata.n_obs)) From 1b2b7d9b2cce6855a884245f0ecc52b8e697f945 Mon Sep 17 00:00:00 2001 From: Vladimir Shitov Date: Wed, 18 Sep 2024 14:05:47 +0200 Subject: [PATCH 07/16] Fix typo: pp -> tl --- src/interpret/atac_marker_peaks/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interpret/atac_marker_peaks/test.py b/src/interpret/atac_marker_peaks/test.py index 0a96195b302..b899422b7a3 100644 --- a/src/interpret/atac_marker_peaks/test.py +++ b/src/interpret/atac_marker_peaks/test.py @@ -30,7 +30,7 @@ def tiny_atac_mudata(tmp_path): peak_annotation = pd.read_csv(resources_dir / "counts" / "peak_annotation.tsv", sep="\t") peak_annotation.columns = ["Chromosome", "Start", "End", "gene", "distance", "peak_type"] peak_annotation["gene"] = peak_annotation["gene"].astype(str) # Fixes saving error - mu.atac.pp.add_peak_annotation(mdata.mod["atac"], peak_annotation) + mu.atac.tl.add_peak_annotation(mdata.mod["atac"], peak_annotation) # Simulate clustering to not install leiden dependencies mdata.mod["atac"].obs["leiden"] = pd.Categorical(np.random.choice(np.arange(5), size=mdata.n_obs)) From 6313baf447e96d12395b7a8697b0eee002fd2d06 Mon Sep 17 00:00:00 2001 From: Vladimir Shitov Date: Wed, 18 Sep 2024 14:26:23 +0200 Subject: [PATCH 08/16] Remove setting up columns names for peak annotation --- src/interpret/atac_marker_peaks/test.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/interpret/atac_marker_peaks/test.py b/src/interpret/atac_marker_peaks/test.py index b899422b7a3..d117d20f6d6 100644 --- a/src/interpret/atac_marker_peaks/test.py +++ b/src/interpret/atac_marker_peaks/test.py @@ -28,7 +28,6 @@ def tiny_atac_mudata(tmp_path): # Read features annotation and save it to uns peak_annotation = pd.read_csv(resources_dir / "counts" / "peak_annotation.tsv", sep="\t") - peak_annotation.columns = ["Chromosome", "Start", "End", "gene", "distance", "peak_type"] peak_annotation["gene"] = peak_annotation["gene"].astype(str) # Fixes saving error mu.atac.tl.add_peak_annotation(mdata.mod["atac"], peak_annotation) From 40d06cb467a43e36edbe77a34bfd58d094aba0ba Mon Sep 17 00:00:00 2001 From: Vladimir Shitov Date: Fri, 22 Nov 2024 10:05:08 +0100 Subject: [PATCH 09/16] Fix bugged checking where the peak annotation is stored --- src/interpret/atac_marker_peaks/script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interpret/atac_marker_peaks/script.py b/src/interpret/atac_marker_peaks/script.py index e4f7830c908..4400a7ff3de 100644 --- a/src/interpret/atac_marker_peaks/script.py +++ b/src/interpret/atac_marker_peaks/script.py @@ -18,7 +18,7 @@ def main(): mdata = mudata.read(par["input"].strip()) mod = mdata.mod[par["modality"]] - if not "peak_annotation" in mod.uns.keys(): + if not "peak_annotation" in mod.uns["atac"]: raise ValueError("Peak annotation not found. Please run `muon.atac.tl.add_peak_annotation` first.") mu.atac.tl.rank_peaks_groups(mod, par["groupby"], method=par["method"]) From ad8e56b714160efc7f589be9770a376586da71d6 Mon Sep 17 00:00:00 2001 From: Vladimir Shitov Date: Fri, 22 Nov 2024 10:21:46 +0100 Subject: [PATCH 10/16] Import scanp dependencies instead of manual installation --- src/interpret/atac_marker_peaks/config.vsh.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/interpret/atac_marker_peaks/config.vsh.yaml b/src/interpret/atac_marker_peaks/config.vsh.yaml index 97cace48a50..6e74f7917d4 100644 --- a/src/interpret/atac_marker_peaks/config.vsh.yaml +++ b/src/interpret/atac_marker_peaks/config.vsh.yaml @@ -70,14 +70,13 @@ engines: - gcc - type: python __merge__: [/src/base/requirements/anndata_mudata.yaml, .] + __merge__: [ /src/base/requirements/scanpy.yaml, .] packages: - - numpy~=1.23.5 - - scanpy~=1.9.3 - - muon~=0.1.6 + - muon~=0.1.5 - pysam~=0.22.0 test_setup: - type: python - __merge__: [ /src/base/requirements/viashpy.yaml, /src/base/requirements/scanpy.yaml, .] + __merge__: [ /src/base/requirements/viashpy.yaml, .] runners: - type: executable - type: nextflow From 36f7c3f074e38df24be10dc8f43136a21495591e Mon Sep 17 00:00:00 2001 From: Vladimir Shitov Date: Fri, 22 Nov 2024 10:23:00 +0100 Subject: [PATCH 11/16] Add ATAC marker peaks info --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6fc4db7f46..579c2f92ae5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -93,6 +93,8 @@ * `transform/regress_out`: Allow providing 'input' and 'output' layers for scanpy regress_out functionality (PR #863). +* `interpret/atac_marker_peaks`: Added a component to identify marker peaks in ATAC-seq data (PR #868). + ## MINOR CHANGES * `resources_test_scripts/cellranger_atac_tiny_bcl.sh` script: generate counts from fastq files using CellRanger atac count (PR #726). From afecddab40a0bc60dd5a759900b77f9c9627d356 Mon Sep 17 00:00:00 2001 From: Vladimir Shitov Date: Fri, 22 Nov 2024 10:41:10 +0100 Subject: [PATCH 12/16] Fix typo output_df -> output_marker_peaks --- src/interpret/atac_marker_peaks/config.vsh.yaml | 2 +- src/interpret/atac_marker_peaks/script.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interpret/atac_marker_peaks/config.vsh.yaml b/src/interpret/atac_marker_peaks/config.vsh.yaml index 6e74f7917d4..2c874e5563d 100644 --- a/src/interpret/atac_marker_peaks/config.vsh.yaml +++ b/src/interpret/atac_marker_peaks/config.vsh.yaml @@ -32,7 +32,7 @@ argument_groups: choices: ["gzip", "lzf"] required: false example: "gzip" - - name: "--output_df" + - name: "--output_marker_peaks" type: file description: Output tsv file with marker peaks. direction: output diff --git a/src/interpret/atac_marker_peaks/script.py b/src/interpret/atac_marker_peaks/script.py index 4400a7ff3de..0427b1ae0bb 100644 --- a/src/interpret/atac_marker_peaks/script.py +++ b/src/interpret/atac_marker_peaks/script.py @@ -6,7 +6,7 @@ par = { "input": "resources_test/pbmc_1k_protein_v3/pbmc_1k_protein_v3_mms.h5mu", "output": "foo.h5mu", - "output_df": "marker_peaks.tsv", + "output_marker_peaks": "marker_peaks.tsv", "output_compression": "gzip", "modality": "atac", "groupby": "leiden", From bc6e6d52a76e8ca7d79dfd6779a4e7707b605c2b Mon Sep 17 00:00:00 2001 From: Vladimir Shitov Date: Fri, 22 Nov 2024 10:41:39 +0100 Subject: [PATCH 13/16] Test markers data frame creation --- src/interpret/atac_marker_peaks/test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/interpret/atac_marker_peaks/test.py b/src/interpret/atac_marker_peaks/test.py index d117d20f6d6..237d5263da5 100644 --- a/src/interpret/atac_marker_peaks/test.py +++ b/src/interpret/atac_marker_peaks/test.py @@ -47,6 +47,7 @@ def test_marker_peaks(run_component, request, mudata, tmp_path): args = [ "--input", str(input_path), "--output", str(output_path), + "--output_marker_peaks", str(tmp_path / "marker_peaks.tsv"), "--modality", "atac", "--groupby", "leiden" ] @@ -59,6 +60,10 @@ def test_marker_peaks(run_component, request, mudata, tmp_path): assert "rank_genes_groups" in data_with_markers.mod["atac"].uns + marker_peaks = pd.read_csv(tmp_path / "marker_peaks.tsv", sep="\t") + assert marker_peaks.shape[0] > 0 + assert "pvals_adj" in marker_peaks.columns + if __name__ == "__main__": sys.exit(pytest.main([__file__])) \ No newline at end of file From 97d8e214edc17e58ed0ca30c50954170e03927f0 Mon Sep 17 00:00:00 2001 From: Vladimir Shitov Date: Fri, 6 Dec 2024 10:33:31 +0100 Subject: [PATCH 14/16] Fix typo in column name: pvlas_adj -> 0_pvals_adj --- src/interpret/atac_marker_peaks/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interpret/atac_marker_peaks/test.py b/src/interpret/atac_marker_peaks/test.py index 237d5263da5..6835019545c 100644 --- a/src/interpret/atac_marker_peaks/test.py +++ b/src/interpret/atac_marker_peaks/test.py @@ -62,7 +62,7 @@ def test_marker_peaks(run_component, request, mudata, tmp_path): marker_peaks = pd.read_csv(tmp_path / "marker_peaks.tsv", sep="\t") assert marker_peaks.shape[0] > 0 - assert "pvals_adj" in marker_peaks.columns + assert "0_pvals_adj" in marker_peaks.columns if __name__ == "__main__": From b93226d00351f560ce6f90e5ab8404275253958c Mon Sep 17 00:00:00 2001 From: Vladimir Shitov Date: Fri, 13 Dec 2024 10:11:05 +0100 Subject: [PATCH 15/16] Fix linter error: not X in -> X not in --- src/interpret/atac_marker_peaks/script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interpret/atac_marker_peaks/script.py b/src/interpret/atac_marker_peaks/script.py index 0427b1ae0bb..240253ca76c 100644 --- a/src/interpret/atac_marker_peaks/script.py +++ b/src/interpret/atac_marker_peaks/script.py @@ -18,7 +18,7 @@ def main(): mdata = mudata.read(par["input"].strip()) mod = mdata.mod[par["modality"]] - if not "peak_annotation" in mod.uns["atac"]: + if "peak_annotation" not in mod.uns["atac"]: raise ValueError("Peak annotation not found. Please run `muon.atac.tl.add_peak_annotation` first.") mu.atac.tl.rank_peaks_groups(mod, par["groupby"], method=par["method"]) From 1baf28c888f5068347860d0fa0d7d033b7261ca6 Mon Sep 17 00:00:00 2001 From: Vladimir Shitov Date: Fri, 13 Dec 2024 10:11:32 +0100 Subject: [PATCH 16/16] Removed unused import --- src/interpret/atac_marker_peaks/test.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/interpret/atac_marker_peaks/test.py b/src/interpret/atac_marker_peaks/test.py index 6835019545c..b1cabe9dd47 100644 --- a/src/interpret/atac_marker_peaks/test.py +++ b/src/interpret/atac_marker_peaks/test.py @@ -4,7 +4,6 @@ import pytest import mudata as md -import scanpy as sc import muon as mu import numpy as np import pandas as pd