Skip to content

real_multi_modality #459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 497 commits into
base: main
Choose a base branch
from
Open

real_multi_modality #459

wants to merge 497 commits into from

Conversation

xingzhongyu
Copy link
Collaborator

No description provided.

@@ -270,6 +274,72 @@ def _load_raw_data(self, ct_col: str = "Cell_type") -> Tuple[ad.AnnData, List[Se

return adata, labels, idx_to_label, train_size, 0

def _load_raw_data_single_h5ad(self,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get train, valid and test data through a single h5ad

@@ -793,6 +794,14 @@ def _params_search_space(self) -> Dict[str, Dict[str, Optional[Union[str, float]
def wandb_sweep_config(self) -> Dict[str, Any]:
if self.wandb_config is None:
raise ValueError("wandb config not specified in the raw config.")
if "run_kwargs" in self.config:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get specific run_kwargs to search

@@ -33,7 +33,7 @@ repos:
args: [--line-width, "120", --profile, black]

- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
rev: eb1df34
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,520 @@
# anndata_similarity.py
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calculate the similarity of data sets and return the most similar data set in the atlas for the query data set

@@ -268,6 +271,31 @@ def __init__(
inplace=inplace, **kwargs)


@register_preprocessor("filter", "cell")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FilterCellsCommonMod: Filters single-cell data to retain only common cells between two modalities.

This transformation filters two single-cell modalities (mod1 and mod2) to retain only the cells
that are shared between them. Optionally, a solution dataset (sol) containing cell labels or annotations
can be filtered to match the common cells.

@@ -169,6 +172,37 @@ def __call__(self, data: Data) -> Data:


@register_preprocessor("normalize")
@add_mod_and_transform
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transform the data set using the tfidf method

@@ -0,0 +1,112 @@
{
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Record the correspondence between atlas datasets and algorithms for statistical algorithm results


import functools


Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A decorator that modifies a class to add functionality for working with specific modalities (mod) in a mudata object.

xingzhongyu and others added 30 commits February 16, 2025 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant