-
Notifications
You must be signed in to change notification settings - Fork 11
10_1038_s41586_018_0654_5 #189
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: dev
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import anndata | ||
| import os | ||
| import scipy.sparse | ||
| import numpy as np | ||
|
|
||
|
|
||
| def load(data_dir, sample_fn, **kwargs): | ||
| fn = os.path.join(data_dir, sample_fn) | ||
|
Contributor
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. It looks like you are not using fn, so you can just take this line out! |
||
|
|
||
| counts = pd.read_csv(data_dir + "GSE115746_cells_exon_counts.csv.gz", index_col=0) | ||
| counts_t = counts.T.copy() | ||
|
|
||
| metadata = pd.read_csv(data_dir + "GSE115746_complete_metadata_28706-cells.csv.gz") | ||
|
|
||
| metadata = metadata[metadata.sample_name.isin(counts_t.index.values)].copy() | ||
| metadata.index = metadata.sample_name | ||
| metadata = metadata.reindex(counts_t.index) | ||
|
|
||
|
|
||
| np.testing.assert_array_equal(metadata.sample_name.values, counts_t.index.values) | ||
|
|
||
| adata = AnnData(scipy.sparse.csc_matrix(counts_t.to_numpy()),obs=metadata,) | ||
| adata.var.index = counts_t.columns | ||
|
|
||
| return adata | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| dataset_structure: | ||
| dataset_index: 1 | ||
| sample_fns: | ||
|
Contributor
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. You can leave this field empty if you only have a single file name here to reduce complexity! |
||
| - "GSE115746_cells_exon_counts.csv.gz" | ||
| dataset_wise: | ||
| author: "Tasic" | ||
| doi: "10.1038/s41586-018-0654-5" | ||
| download_url_data: "https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE115746&format=file&file=GSE115746%5Fcells%5Fexon%5Fcounts%2Ecsv%2Egz" | ||
| download_url_meta: "https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE115746&format=file&file=GSE115746%5Fcomplete%5Fmetadata%5F28706%2Dcells%2Ecsv%2Egz" | ||
| normalization: "raw" | ||
| year: "2018" | ||
| dataset_or_observation_wise: | ||
| age: | ||
| age_obs_key: | ||
| assay: "smart-seq2" | ||
| assay_obs_key: | ||
| bio_sample: | ||
| bio_sample_obs_key: | ||
| development_stage: | ||
| development_stage_obs_key: | ||
| ethnicity: | ||
| ethnicity_obs_key: | ||
| healthy: | ||
| healthy_obs_key: | ||
| individual: | ||
| individual_obs_key: "donor_id" | ||
| organ: "brain" | ||
| organ_obs_key: | ||
| organism: "mouse" | ||
| organism_obs_key: "organism" | ||
| sex: | ||
| sex_obs_key: "donor_sex" | ||
| state_exact: "healthy" | ||
| state_exact_obs_key: | ||
| tech_sample: | ||
| tech_sample_obs_key: | ||
| observation_wise: | ||
| cellontology_original_obs_key: "cell_cluster" | ||
| feature_wise: | ||
| var_ensembl_col: | ||
|
Contributor
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. You will need to supply one of these to give some sort of gene name list. |
||
| var_symbol_col: | ||
| misc: | ||
| meta: | ||
| version: "1.0" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you only have a single file, it is not necessary to use sample_fn and you can use
def load(data_dir, **kwargs):instead here