Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@
* Fix `methods/scgpt_zeroshot` and `methods/scgpt_finetuned` failing to build: stop installing `flash-attn`. Both
scripts pass `use_fast_transformer=False`, so it was never used. Behind it sat three more pins with no python 3.12
wheels, now `numpy<2`, `torchtext==0.17.2` and `transformers==4.36.2`.

* Split Scanorama into two methods/scores
- Split Scanorama into embedding (integrate) and count-correction (correct) modes, instead of running both together.
This makes clear what the reported score(s) are describing, and also corrects the misleadingly low score that
the combined method receives. The scores for each component are in line with their scores from v1, where the modes
were separated.
were separated.
* Remove jitter from the `embed_cell_types` control method, distinguishing its behavior from `embed_cell_types_jittered`.

# task_batch_integration 2.0.0

Expand Down
3 changes: 2 additions & 1 deletion src/control_methods/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _randomize_graph(adata, partition=None, neighbors_key="neighbors"):
return adata


def _perfect_embedding(partition, jitter=0.01):
def _perfect_embedding(partition, jitter=None):
"""
Taken and adapted from opsca-v1:
https://github.com/openproblems-bio/openproblems/blob/acf5c95a7306b819c4a13972783433d0a48f769b/openproblems/tasks/_batch_integration/_common/methods/baseline.py#L37
Expand All @@ -51,6 +51,7 @@ def _perfect_embedding(partition, jitter=0.01):
embedding = OneHotEncoder().fit_transform(
LabelEncoder().fit_transform(partition)[:, None]
)
embedding = embedding.toarray()
if jitter is not None:
embedding = embedding + np.random.uniform(-1 * jitter, jitter, embedding.shape)
return np.asarray(embedding)
Loading