Skip to content

Commit

Permalink
Merge pull request #179 from emdann/data/stephenson_COVID
Browse files Browse the repository at this point in the history
Added subsampled Stephenson2021 COVID19 dataset
  • Loading branch information
Zethson authored Nov 11, 2022
2 parents 3387469 + 03c4b22 commit d9ad640
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions pertpy/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
papalexi_2021,
sc_sim_augur,
sciplex3_raw,
stephenson_2021_subsampled,
)
31 changes: 30 additions & 1 deletion pertpy/data/_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,36 @@ def kang_2018() -> AnnData: # pragma: no cover
return adata


def stephenson_2021_subsampled() -> AnnData: # pragma: no cover
"""Processed 10X 5' scRNA-seq data from PBMC of COVID-19 patients and healthy donors
The study profiled peripheral blood mononuclear cells from 90 COVID-19 patients with different disease severity and 23 healthy control donors.
Here the dataset was downsampled to approx. 500 cells per donor and cells were mapped to a reference atlas of healthy PBMCs from 12 studies
with scArches.
Reference:
Stephenson, E., Reynolds, G., Botting, R. A., et al. (2021).
Single-cell multi-omics analysis of the immune response in COVID-19.
Nature Medicine, 27(5). https://doi.org/10.1038/s41591-021-01329-2
Returns:
:class:`~anndata.AnnData` object of scRNA-seq profiles
"""
output_file_name = "stephenson_2021_subsampled.h5ad"
output_file_path = settings.datasetdir.__str__() + "/" + output_file_name
if not Path(output_file_path).exists():
_download(
url="https://figshare.com/ndownloader/files/38171703",
output_path=settings.datasetdir,
is_zip=False,
)
adata = sc.read_h5ad(filename=settings.datasetdir.__str__() + "/" + output_file_name)
else:
adata = sc.read_h5ad(output_file_path)
return adata


def haber_2017_regions() -> AnnData: # pragma: no cover
"""Raw single-cell, pooled CRISPR screening.
Expand All @@ -407,5 +437,4 @@ def haber_2017_regions() -> AnnData: # pragma: no cover
adata = sc.read_h5ad(filename=settings.datasetdir.__str__() + "/" + output_file_name)
else:
adata = sc.read_h5ad(output_file_path)

return adata

0 comments on commit d9ad640

Please sign in to comment.