-
Notifications
You must be signed in to change notification settings - Fork 60
Feature/hucira #901
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
base: main
Are you sure you want to change the base?
Feature/hucira #901
Changes from all commits
20ae692
768d0f9
afafba3
3193fdd
ea2fbfd
df4371c
bbdae6a
e423ccf
38a3899
3d4ea68
14e07c4
f253cc8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| from pathlib import Path | ||
|
|
||
| import pandas as pd | ||
| import scanpy as sc | ||
| from anndata import AnnData | ||
| from mudata import MuData | ||
|
|
@@ -1598,3 +1599,43 @@ def hagai_2018() -> AnnData: # pragma: no cover | |
| adata = sc.read_h5ad(output_file_path) | ||
|
|
||
| return adata | ||
|
|
||
|
|
||
| def human_cytokine_dict(exclude_well_biased_genes: bool = True) -> pd.DataFrame: | ||
| """Human Cytokine Dictionary curated from PBMC allows you to infer differential cytokine activity. | ||
|
|
||
| The Human Cytokine Dictionary was created from single-cell RNA-seq of 9,697,974 human peripheral blood mononuclear cells (PBMC) | ||
| from 12 donors stimulated in vitro with 87 different cytokines. | ||
| Genes with a mean-to-stddev-ratio above 1 across all 6 wells for >10 cytokines in a given cell type and for >5 cell types are "well-biased". | ||
|
|
||
| Args: | ||
| exclude_well_biased_genes: Whether to exclude well-biased genes from the returned dataframe. | ||
|
|
||
| References: | ||
| Oesinghaus, L., Becker, S., Vornholz, L., Papalexi, E. et al. | ||
| A single-cell cytokine dictionary of human peripheral blood. | ||
| bioRxiv (2025). https://doi.org/10.64898/2025.12.12.693897 | ||
|
|
||
| Returns: | ||
| :class:`~ pandas.DataFrame` object of differentially expressed genes after cytokine perturbation. | ||
|
|
||
|
Jenniliu12 marked this conversation as resolved.
|
||
| """ | ||
| output_file_name = "human_cytokine_dict.csv" | ||
| output_file_path = settings.datasetdir / output_file_name | ||
| if not Path(output_file_path).exists(): | ||
| _download( | ||
| url="https://cdn.parsebiosciences.com/gigalab/10m/DEGs.csv", | ||
| output_file_name=output_file_name, | ||
| output_path=settings.datasetdir, | ||
| is_zip=False, | ||
| ) | ||
|
|
||
| cytokine_dict = pd.read_csv(output_file_path, index_col=0) | ||
| revision_cytokines = ["TGF-beta1", "IL-18", "C3a"] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is a revision cytokine? This is a function for EVERYONE not just your paper. Why do we have this filter?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are cytokines that were annotated wrongly. The object in Parse hasn't been updated, so as a bandaid the cytokines get filtered manually.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, thanks! Please add a comment then to explain this clearly. Maybe also make this variable an upper case constant with improved naming. |
||
| cytokine_dict = cytokine_dict[~cytokine_dict["cytokine"].isin(revision_cytokines)] | ||
| cytokine_dict = cytokine_dict.reset_index(drop=True) | ||
|
|
||
| if exclude_well_biased_genes: | ||
| cytokine_dict = cytokine_dict.loc[~cytokine_dict.well_biased] | ||
|
|
||
| return cytokine_dict | ||
Uh oh!
There was an error while loading. Please reload this page.