Skip to content
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

Cellxgene export #315

Merged
merged 22 commits into from
Jun 15, 2021
Merged
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
18 changes: 13 additions & 5 deletions sfaira/consts/adata_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ class AdataIds:
cellontology_id: str
development_stage: str
disease: str
doi: str
doi_journal: str
doi_preprint: str
download_url_data: str
download_url_meta: str
dataset: str
Expand Down Expand Up @@ -87,7 +88,8 @@ def __init__(self):
self.cellontology_id = "cell_ontology_id"
self.default_embedding = "default_embedding"
self.disease = "disease"
self.doi = "doi"
self.doi_journal = "doi_journal"
self.doi_preprint = "doi_preprint"
self.dataset = "dataset"
self.dataset_group = "dataset_group"
self.download_url_data = "download_url_data"
Expand Down Expand Up @@ -123,6 +125,7 @@ def __init__(self):
self.unknown_celltype_identifier = "UNKNOWN"
self.not_a_cell_celltype_identifier = "NOT_A_CELL"
self.unknown_metadata_identifier = "unknown"
self.unknown_metadata_ontology_id_identifier = "unknown"

self.obs_keys = [
"assay_sc",
Expand Down Expand Up @@ -152,7 +155,8 @@ def __init__(self):
"annotated",
"author",
"default_embedding",
"doi",
"doi_journal",
"doi_preprint",
"download_url_data",
"download_url_meta",
"id",
Expand Down Expand Up @@ -182,9 +186,11 @@ def __init__(self):
self.cellontology_class = "cell_type"
self.cellontology_id = "cell_type_ontology_term_id"
self.default_embedding = "default_embedding"
self.doi = "preprint_doi"
self.doi_journal = "publication_doi"
self.doi_preprint = "preprint_doi"
self.disease = "disease"
self.gene_id_symbols = "gene_symbol"
self.gene_id_ensembl = "ensembl"
self.gene_id_index = self.gene_id_symbols
self.id = "id"
self.ncells = "ncells"
Expand Down Expand Up @@ -228,11 +234,13 @@ def __init__(self):
"tech_sample",
]
self.var_keys = [
"gene_id_ensembl",
"gene_id_symbols",
]
self.uns_keys = [
"doi_journal",
"doi_preprint",
"default_embedding",
"id",
"title",
]
# These attributes related to obs and uns keys above are also in the data set attributes that can be
Expand Down
3 changes: 2 additions & 1 deletion sfaira/consts/ontologies.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def __init__(self):
"mouse": OntologyMmusdv(),
}
self.disease = OntologyMondo()
self.doi = None
self.doi_journal = None
self.doi_preprint = None
self.ethnicity = {
"human": None, # TODO OntologyHancestro
"mouse": None,
Expand Down
282 changes: 178 additions & 104 deletions sfaira/data/base/dataset.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions sfaira/data/base/dataset_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,11 +561,11 @@ def doi(self) -> List[str]:
"""
dois = []
for _, v in self.datasets.items():
vdoi = v.doi
vdoi = v.doi_journal
if isinstance(vdoi, str):
vdoi = [vdoi]
dois.extend(vdoi)
return np.sort(np.unique(vdoi)).tolist()
return np.sort(np.unique(dois)).tolist()

@property
def supplier(self) -> List[str]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def __init__(self, **kwargs):

self.author = "Enge"
self.disease = "healthy"
self.doi = "10.1016/j.cell.2017.09.004"
self.doi_journal = "10.1016/j.cell.2017.09.004"
self.doi_preprint = "10.1101/108043"
self.normalization = "raw"
self.assay_sc = "Smart-seq2"
self.organ = "islet of Langerhans"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def __init__(self, **kwargs):
self.author = "Han"
self.dev_stage = sample_dev_stage_dict[self.sample_fn]
self.disease = "healthy"
self.doi = "10.1016/j.cell.2018.02.001"
self.doi_journal = "10.1016/j.cell.2018.02.001"
self.normalization = "raw"
self.organism = "mouse"
self.assay_sc = "microwell-seq"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ dataset_wise:
author:
- "Kinchen"
default_embedding:
doi:
- "10.1016/j.cell.2018.08.067"
download_url_data:
doi_journal: "10.1016/j.cell.2018.08.067"
doi_preprint:
download_url_data:
HC: "https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE114374&format=file&file=GSE114374%5FHuman%5FHC%5Fexpression%5Fmatrix%2Etxt%2Egz"
UC: "https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE114374&format=file&file=GSE114374%5FHuman%5FUC%5Fexpression%5Fmatrix%2Etxt%2Egz"
download_url_meta:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, **kwargs):
self.assay_sc = "10x technology"
self.author = "Smilie"
self.disease = "healthy"
self.doi = "10.1016/j.cell.2019.06.029"
self.doi_journal = "10.1016/j.cell.2019.06.029"
self.normalization = "raw"
self.organ = "colonic epithelium"
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, **kwargs):
self.assay_sc = "10x technology"
self.author = "Martin"
self.disease = "healthy"
self.doi = "10.1016/j.cell.2019.08.008"
self.doi_journal = "10.1016/j.cell.2019.08.008"
self.normalization = "raw"
self.organ = "ileum"
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, **kwargs):
self.assay_sc = "10x technology"
self.author = "Henry"
self.disease = "healthy"
self.doi = "10.1016/j.celrep.2018.11.086"
self.doi_journal = "10.1016/j.celrep.2018.11.086"
self.normalization = "raw"
self.sample_source = "primary_tissue"
self.state_exact = "healthy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, **kwargs):
self.assay_sc = "inDrop"
self.author = "Baron"
self.disease = "healthy"
self.doi = "10.1016/j.cels.2016.08.011"
self.doi_journal = "10.1016/j.cels.2016.08.011"
self.normalization = "raw"
self.organ = "pancreas"
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self, **kwargs):
self.download_url_meta = "https://www.ebi.ac.uk/arrayexpress/files/E-MTAB-5061/E-MTAB-5061.sdrf.txt"

self.author = "Segerstolpe"
self.doi = "10.1016/j.cmet.2016.08.020"
self.doi_journal = "10.1016/j.cmet.2016.08.020"
self.normalization = "raw"
self.organ = "pancreas"
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self, **kwargs):
self.download_url_meta = f"private,{self.sample_fn}_annotation.csv"

self.author = "Thompson"
self.doi = "10.1016/j.cmet.2019.01.021"
self.doi_journal = "10.1016/j.cmet.2019.01.021"
self.normalization = "raw"
self.organ = "pancreas"
self.organism = "mouse"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, **kwargs):
self.assay_sc = "10x technology"
self.author = "Miller"
self.disease = "healthy"
self.doi = "10.1016/j.devcel.2020.01.033"
self.doi_journal = "10.1016/j.devcel.2020.01.033"
self.normalization = "raw"
self.organ = "lung"
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ dataset_structure:
dataset_wise:
author:
- "Polioudakis"
doi:
- "10.1016/j.neuron.2019.06.011"
download_url_data:
doi_journal: "10.1016/j.neuron.2019.06.011"
doi_preprint:
download_url_data:
- "manual,sc_dev_cortex_geschwind.zip,http://solo.bmap.ucla.edu/shiny/webapp"
download_url_meta:
normalization: "raw"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, **kwargs):
self.assay_sc = "DroNc-seq"
self.author = "Habib"
self.disease = "healthy"
self.doi = "10.1038/nmeth.4407"
self.doi_journal = "10.1038/nmeth.4407"
self.normalization = "raw"
self.organ = "brain"
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, **kwargs):
self.assay_sc = "10x technology"
self.author = "Guo"
self.disease = "healthy"
self.doi = "10.1038/s41422-018-0099-2"
self.doi_journal = "10.1038/s41422-018-0099-2"
self.normalization = "raw"
self.organ = "testis"
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self, **kwargs):
self.assay_sc = "10x technology"
self.author = "MacParland"
self.disease = "healthy"
self.doi = "10.1038/s41467-018-06318-7"
self.doi_journal = "10.1038/s41467-018-06318-7"
self.normalization = "raw"
self.organ = "caudate lobe of liver"
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self, **kwargs):
self.assay_sc = "DroNc-seq"
self.author = "Lake"
self.disease = "healthy"
self.doi = "10.1038/s41467-019-10861-2"
self.doi_journal = "10.1038/s41467-019-10861-2"
self.normalization = "raw"
self.organ = "kidney"
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(self, **kwargs):

self.assay_sc = "10x technology"
self.author = "Szabo"
self.doi = "10.1038/s41467-019-12464-3"
self.doi_journal = "10.1038/s41467-019-12464-3"
self.individual = SAMPLE_DICT[self.sample_fn][1]
self.normalization = "raw"
self.organ = SAMPLE_DICT[self.sample_fn][0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self, **kwargs):
self.assay_sc = "10x technology"
self.author = "Menon"
self.disease = "healthy"
self.doi = "10.1038/s41467-019-12780-8"
self.doi_journal = "10.1038/s41467-019-12780-8"
self.normalization = "raw"
self.organ = "retina"
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(self, **kwargs):
self.assay_sc = "10x technology" if self.sample_fn == "E-MTAB-6678.processed" else "Smart-seq2"
self.author = "Ventotormo"
self.disease = "healthy"
self.doi = "10.1038/s41586-018-0698-6"
self.doi_journal = "10.1038/s41586-018-0698-6"
self.normalization = "raw"
self.organ = "placenta"
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self, **kwargs):
self.assay_sc = "CEL-seq2"
self.author = "Aizarani"
self.disease = "healthy"
self.doi = "10.1038/s41586-019-1373-2"
self.doi_journal = "10.1038/s41586-019-1373-2"
self.normalization = "raw"
self.sample_source = "primary_tissue"
self.organ = "liver"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, **kwargs):

self.assay_sc = "10x technology"
self.author = "Ramachandran"
self.doi = "10.1038/s41586-019-1631-3"
self.doi_journal = "10.1038/s41586-019-1631-3"
self.normalization = "raw"
self.organ = "liver"
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self, **kwargs):
self.assay_sc = "10x technology"
self.author = "Popescu"
self.disease = "healthy"
self.doi = "10.1038/s41586-019-1652-y"
self.doi_journal = "10.1038/s41586-019-1652-y"
self.normalization = "raw"
self.organ = "liver"
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ dataset_structure:
dataset_wise:
author:
- "Kanton"
doi:
- "10.1038/s41586-019-1654-9"
download_url_data:
doi_journal: "10.1038/s41586-019-1654-9"
doi_preprint:
download_url_data:
- "https://www.ebi.ac.uk/arrayexpress/files/E-MTAB-7552/E-MTAB-7552.processed.3.zip"
download_url_meta:
- "https://www.ebi.ac.uk/arrayexpress/files/E-MTAB-7552/E-MTAB-7552.processed.1.zip"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, **kwargs):
]

self.author = "Han"
self.doi = "10.1038/s41586-020-2157-4"
self.doi_journal = "10.1038/s41586-020-2157-4"
self.healthy = True
self.normalization = "raw"
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ dataset_wise:
author:
- "Travaglini"
default_embedding: "X_tSNE"
doi:
- "10.1038/s41586-020-2922-4"
download_url_data:
doi_journal: "10.1038/s41586-020-2922-4"
doi_preprint:
download_url_data:
droplet_normal_lung_blood_scanpy.20200205.RC4.h5ad: "syn21625095,droplet_normal_lung_blood_scanpy.20200205.RC4.h5ad"
facs_normal_lung_blood_scanpy.20200205.RC4.h5ad: "syn21625142,facs_normal_lung_blood_scanpy.20200205.RC4.h5ad"
download_url_meta:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, **kwargs):
self.assay_sc = "10x technology"
self.author = "James"
self.disease = "healthy"
self.doi = "10.1038/s41590-020-0602-z"
self.doi_journal = "10.1038/s41590-020-0602-z"
self.normalization = "raw"
self.organ = "colon"
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self, **kwargs):
self.assay_sc = "Drop-seq"
self.author = "Braga"
self.disease = "healthy"
self.doi = "10.1038/s41591-019-0468-5"
self.doi_journal = "10.1038/s41591-019-0468-5"
self.normalization = "raw"
self.organ = "lung"
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(self, **kwargs):
self.assay_sc = "10x technology"
self.author = "Braga"
self.disease = "healthy"
self.doi = "10.1038/s41591-019-0468-5"
self.doi_journal = "10.1038/s41591-019-0468-5"
self.normalization = "scaled"
self.organ = "bronchus" if self.sample_fn == "vieira19_Bronchi_anonymised.processed.h5ad" else "lung parenchyma"
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, **kwargs):
self.assay_sc = "10x technology"
self.author = "Hove"
self.disease = "healthy"
self.doi = "10.1038/s41593-019-0393-4"
self.doi_journal = "10.1038/s41593-019-0393-4"
self.normalization = "raw"
self.organism = "mouse"
self.sample_source = "primary_tissue"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(self, **kwargs):
self.organism = "human"
self.sample_source = "primary_tissue"
self.year = 2020
self.doi = "10.1038/s41597-019-0351-8"
self.doi_journal = "10.1038/s41597-019-0351-8"

self.gene_id_symbols_var_key = "names"
self.gene_id_ensembl_var_key = "ensembl"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self, **kwargs):
self.assay_sc = "10x technology"
self.author = "Voigt"
self.disease = "healthy"
self.doi = "10.1073/pnas.1914143116"
self.doi_journal = "10.1073/pnas.1914143116"
self.normalization = "norm"
self.organ = "retina"
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(self, **kwargs):
self.assay_sc = "10x technology"
self.author = "Wang"
self.disease = "healthy"
self.doi = "10.1084/jem.20191130"
self.doi_journal = "10.1084/jem.20191130"
self.normalization = "raw"
self.organ = organ
self.organism = "human"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def __init__(self, **kwargs):
self.assay_sc = "10x technology"
self.author = "Lukassen"
self.disease = "healthy"
self.doi = "10.1101/2020.03.13.991455"
self.doi_journal = "10.15252/embj.20105114"
self.doi_preprint = "10.1101/2020.03.13.991455"
self.normalization = "raw"
self.organ = "lung"
self.organism = "human"
Expand Down
Loading