Skip to content

Commit 154ccb9

Browse files
Shorten method descriptions (#842)
* shorten method descriptions * Update auprc.py * pre-commit --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent b3456fd commit 154ccb9

5 files changed

Lines changed: 19 additions & 25 deletions

File tree

openproblems/tasks/_cell_cell_communication/_common/metrics/auprc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44

55
@metric(
66
metric_name="Precision-recall AUC",
7-
metric_summary="Area under the precision-recall curve.",
7+
metric_summary=(
8+
"Area under the precision-recall curve for the binary classification task"
9+
" predicting interactions."
10+
),
811
paper_reference="davis2006prauc",
912
maximize=True,
1013
)

openproblems/tasks/dimensionality_reduction/methods/pca.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ def _pca(adata, genes=None):
3838
return adata
3939

4040

41-
@_pca_method(method_name="Principle Component Analysis (PCA) (logCP10k)")
41+
@_pca_method(method_name="PCA (logCP10k)")
4242
def pca_logCP10k(adata, test: bool = False):
4343
adata = log_cp10k(adata)
4444
return _pca(adata)
4545

4646

47-
@_pca_method(method_name="Principle Component Analysis (PCA) (logCP10k, 1kHVG)")
47+
@_pca_method(method_name="PCA (logCP10k, 1kHVG)")
4848
def pca_logCP10k_1kHVG(adata, test: bool = False):
4949
adata = log_cp10k_hvg(adata)
5050
return _pca(adata, genes=adata.var["highly_variable"])

openproblems/tasks/dimensionality_reduction/methods/tsne.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,13 @@ def _tsne(adata, genes=None, test=False, n_pca=50):
4141
return adata
4242

4343

44-
@_tsne_method(
45-
method_name="t-Distributed Stochastic Neighbor Embedding (t-SNE) (logCP10k, 1kHVG)"
46-
)
44+
@_tsne_method(method_name="t-SNE (logCP10k, 1kHVG)")
4745
def tsne_logCP10k_1kHVG(adata, test: bool = False, n_pca=50):
4846
adata = log_cp10k_hvg(adata)
4947
return _tsne(adata, genes=adata.var["highly_variable"], test=test, n_pca=n_pca)
5048

5149

52-
@_tsne_method(
53-
method_name="t-Distributed Stochastic Neighbor Embedding (t-SNE) (logCP10k)"
54-
)
50+
@_tsne_method(method_name="t-SNE (logCP10k)")
5551
def tsne_logCP10k(adata, test: bool = False, n_pca=50):
5652
adata = log_cp10k(adata)
5753
return _tsne(adata, test=test, n_pca=n_pca)

openproblems/tasks/spatial_decomposition/methods/cell2location.py

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
method_summary=(
1212
"Cell2location is a decomposition method based on Negative Binomial regression"
1313
" that is able to account for batch effects in estimating the single-cell gene"
14-
" expression signature used for the spatial decomposition step."
14+
" expression signature used for the spatial decomposition step. Note that since"
15+
" batch information is unavailable in this task, here we use either a"
16+
" hard-coded reference, or a negative-binomial learned reference without batch"
17+
" labels. The parameter alpha refers to the detection efficiency prior."
1518
),
1619
paper_name="Cell2location maps fine-grained cell types in spatial transcriptomics",
1720
paper_reference="kleshchevnikov2022cell2location",
@@ -159,9 +162,7 @@ def _cell2location(
159162
return adata
160163

161164

162-
@_cell2location_method(
163-
method_name="Cell2location (detection_alpha=20, reference hard-coded)"
164-
)
165+
@_cell2location_method(method_name="Cell2location (alpha=20, reference hard-coded)")
165166
def cell2location_detection_alpha_20(
166167
adata,
167168
detection_alpha=20,
@@ -190,9 +191,7 @@ def cell2location_detection_alpha_20(
190191
)
191192

192193

193-
@_cell2location_method(
194-
method_name="Cell2location (detection_alpha=1, reference hard-coded)"
195-
)
194+
@_cell2location_method(method_name="Cell2location (alpha=1, reference hard-coded)")
196195
def cell2location_detection_alpha_1(
197196
adata,
198197
detection_alpha=1,
@@ -221,9 +220,7 @@ def cell2location_detection_alpha_1(
221220
)
222221

223222

224-
@_cell2location_method(
225-
method_name="Cell2location (detection_alpha=20, reference NB without batch info)"
226-
)
223+
@_cell2location_method(method_name="Cell2location (alpha=20, NB reference)")
227224
def cell2location_detection_alpha_20_nb(
228225
adata,
229226
detection_alpha=20,
@@ -252,9 +249,7 @@ def cell2location_detection_alpha_20_nb(
252249
)
253250

254251

255-
@_cell2location_method(
256-
method_name="Cell2location (detection_alpha=200, reference hard-coded)"
257-
)
252+
@_cell2location_method(method_name="Cell2location (alpha=200, reference hard-coded)")
258253
def cell2location_detection_alpha_200(
259254
adata,
260255
detection_alpha=200,
@@ -283,9 +278,7 @@ def cell2location_detection_alpha_200(
283278
)
284279

285280

286-
@_cell2location_method(
287-
method_name="Cell2location, amortised (detection_alpha=20, reference hard-coded)"
288-
)
281+
@_cell2location_method(method_name="Cell2location (alpha=20, amortised, hard-coded)")
289282
def cell2location_amortised_detection_alpha_20(
290283
adata,
291284
detection_alpha=20,

test/test_core_metadata.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
DATASET_SUMMARY_MINLEN = 40
1111
DATASET_SUMMARY_MAXLEN = 400
1212

13+
METHOD_NAME_MAXLEN = 50
1314
METHOD_SUMMARY_MINLEN = 40
1415
METHOD_SUMMARY_MAXLEN = 1000
1516

@@ -67,6 +68,7 @@ def test_method_metadata(method):
6768
assert isinstance(method.metadata["image"], str)
6869
assert method.metadata["image"].startswith("openproblems")
6970
assert isinstance(method.metadata["method_name"], str)
71+
assert len(method.metadata["method_name"]) < METHOD_NAME_MAXLEN
7072
assert isinstance(method.metadata["method_summary"], str)
7173
assert len(method.metadata["method_summary"]) > METHOD_SUMMARY_MINLEN
7274
assert len(method.metadata["method_summary"]) < METHOD_SUMMARY_MAXLEN

0 commit comments

Comments
 (0)