Skip to content

Commit 2f190bb

Browse files
fix dependecies (#27)
1 parent 328e33d commit 2f190bb

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

setup.cfg

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ install_requires =
5656
torch
5757
pyfaidx
5858
genomepy
59-
grelu>=1.0.9
59+
grelu>=1.0.10
6060
lightning
6161
torchmetrics
6262
bioframe
@@ -69,7 +69,8 @@ install_requires =
6969
h5py
7070
pyBigWig
7171
pyarrow
72-
tangermeme
72+
tangermeme>=1.0.0
73+
safetensors
7374
modisco-lite
7475

7576
[options.packages.find]

tests/test_interpret_attribution.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ def attributions():
4444

4545

4646
def test_Attribution_peak_finding(attributions):
47-
assert len(attributions.peaks) == 2
47+
assert len(attributions.peaks) == 1
4848
row = attributions.peaks.iloc[0]
49-
assert row["peak"] == "TEST2@10"
50-
assert row["start"] == 360
51-
assert row["end"] == 364
49+
assert row["peak"] == "TEST2@8"
50+
assert row["start"] == 358
51+
assert row["end"] == 366
5252
assert row["attribution"] > 0
5353
assert row["p-value"] < 1e-2
54-
assert row["from_tss"] == 10
54+
assert row["from_tss"] == 8
5555

5656

5757
def test_Attribution_scan_motifs(attributions):
@@ -63,7 +63,7 @@ def test_Attribution_scan_motifs(attributions):
6363
assert "p-value" in df_motifs.columns
6464
assert "peak" in df_motifs.columns
6565
assert "GATA1.H12CORE.1.PSM.A" in set(df_motifs["motif"])
66-
assert "TEST2@10" in set(df_motifs["peak"])
66+
assert "TEST2@8" in set(df_motifs["peak"])
6767

6868
df_motifs = df_motifs[df_motifs["peak"] == "TEST2@10"]
6969
assert (df_motifs["start"] - 350 == df_motifs["from_tss"]).all()
@@ -72,23 +72,23 @@ def test_Attribution_scan_motifs(attributions):
7272
def test_Attribution_peaks_to_bed(attributions):
7373
df_peaks = attributions.peaks_to_bed()
7474
assert isinstance(df_peaks, pd.DataFrame)
75-
assert len(df_peaks) == 2
75+
assert len(df_peaks) == 1
7676

7777
assert df_peaks.columns.tolist() == ["chrom", "start", "end", "name", "score", "strand"]
7878

7979
row = df_peaks.iloc[0]
8080
assert row["chrom"] == "chr1"
81-
assert row["start"] == 1360
82-
assert row["end"] == 1364
83-
assert row["name"] == "TEST2@10"
81+
assert row["start"] == 1358
82+
assert row["end"] == 1366
83+
assert row["name"] == "TEST2@8"
8484
assert row["score"] > 2
8585
assert row["strand"] == "."
8686

8787
attributions._strand = "-"
8888
df_peaks = attributions.peaks_to_bed()
8989
assert df_peaks.iloc[0]["strand"] == "."
90-
assert row["start"] == 1360
91-
assert row["end"] == 1364
90+
assert row["start"] == 1358
91+
assert row["end"] == 1366
9292

9393

9494
@pytest.mark.long_running
@@ -113,9 +113,9 @@ def test_Attribution_save_bigwig(attributions, tmp_path):
113113
assert bigwig_path.exists()
114114

115115
bw = pyBigWig.open(str(bigwig_path))
116-
attrs = bw.values("chr1", 1360, 1364)
117-
assert len(attrs) == 4
118-
assert attrs[0] == pytest.approx(40)
116+
attrs = bw.values("chr1", 1358, 1366)
117+
assert len(attrs) == 8
118+
assert attrs[2:6] == [40, 40, 40, 40]
119119
bw.close()
120120

121121
@pytest.mark.long_running

0 commit comments

Comments
 (0)