ebi-gene-expression-group / atlas-anndata Goto Github PK
View Code? Open in Web Editor NEWTools for anndata generation/ consumption for Expression Atlas
License: Apache License 2.0
Tools for anndata generation/ consumption for Expression Atlas
License: Apache License 2.0
I had some problems with this anndata (the first one in this link: https://developmental.cellatlas.io/fetal-immune#DatasetModalscRNA-seq1). It couldn't get metadata about samples when extracting from annData object (step3, Initialise MAGE-TAB). For example, these columns organ, Sort_id, age, method, donor and sex were not in presdrf. I suppose there could be some inconsistencies within samples, like some cells had missing annotations maybe. It would be helpful if these annotations can be extracted from cell_metadata.tsv.
Here's how I did:
make_bundle_from_anndata --anndata-file human_fetus_immune.h5ad E-ANND-5 init --droplet
(atlas-anndata) yalan@C02WL01MHV2Q anndata_test % make_bundle_from_anndata --anndata-file human_fetus_immune.h5ad E-ANND-5 init --droplet
..Checking for gene_meta gene_name
..Checking for gene_meta index
Validating config against /Users/yalan/opt/miniconda3/envs/atlas-anndata/lib/python3.8/site-packages/atlas_anndata/config_schema.yaml
WARNING: FILL ME fields are present in the config. Please make sure this is resolved before running this script for the final time.
Config YAML file successfully validated
Now checking config against anndata file
..Checking for matrices X
..Checking for cell_meta n_counts
..Checking for cell_meta n_genes
..Checking for cell_meta file
..Checking for cell_meta mito
..Checking for cell_meta doublet_scores
..Checking for cell_meta predicted_doublets
..Checking for cell_meta old_annotation_uniform
..Checking for cell_meta organ
..Checking for cell_meta Sort_id
..Checking for cell_meta age
..Checking for cell_meta method
..Checking for cell_meta donor
..Checking for cell_meta sex
..Checking for cell_meta Sample
..Checking for cell_meta scvi_clusters
..Checking for cell_meta is_maternal_contaminant
..Checking for cell_meta anno_lvl_2_final_clean
..Checking for cell_meta celltype_annotation
..Checking for dimension_reductions X_scvi
..Checking for dimension_reductions X_umap
..Checking for matrices FILL ME with a string
..Checking for gene_meta index
..Checking for gene_meta FILL ME with a string
..Checking for cell_meta FILL ME with a string
annData file successfully validated against config /Users/yalan/Documents/curation_work/anndata_test/E-ANND-5/anndata-config.yaml
Writing var(gene) metadata
Writing obs metadata of kind: curation
Extracting metadata from annData object...
...deriving runs and barcodes by parsing cell IDs
..extracting metadata consistent within samples
..assigning other metadata as cell_specific
Writing annData file
/Users/yalan/opt/miniconda3/envs/atlas-anndata/lib/python3.8/site-packages/anndata/_core/anndata.py:1228: FutureWarning: The `inplace` parameter in pandas.Categorical.reorder_categories is deprecated and will be removed in a future version. Reordering categories will always return a new Categorical object.
c.reorder_categories(natsorted(c.categories), inplace=True)
... storing 'sample' as categorical
make_bundle_from_anndata E-ANND-5 init_magetab
: Here it created the presdrf.txt without errors. But columns organ, Sort_id, age, method, donor and sex were not included.(atlas-anndata) yalan@C02WL01MHV2Q anndata_test % make_bundle_from_anndata E-ANND-5 init_magetab
Validating config against /Users/yalan/opt/miniconda3/envs/atlas-anndata/lib/python3.8/site-packages/atlas_anndata/config_schema.yaml
WARNING: FILL ME fields are present in the config. Please make sure this is resolved before running this script for the final time.
Config YAML file successfully validated
Now checking config against anndata file
..Checking for matrices X
..Checking for cell_meta n_counts
..Checking for cell_meta n_genes
..Checking for cell_meta file
..Checking for cell_meta mito
..Checking for cell_meta doublet_scores
..Checking for cell_meta predicted_doublets
..Checking for cell_meta old_annotation_uniform
..Checking for cell_meta organ
..Checking for cell_meta Sort_id
..Checking for cell_meta age
..Checking for cell_meta method
..Checking for cell_meta donor
..Checking for cell_meta sex
..Checking for cell_meta Sample
..Checking for cell_meta scvi_clusters
..Checking for cell_meta is_maternal_contaminant
..Checking for cell_meta anno_lvl_2_final_clean
..Checking for cell_meta celltype_annotation
..Checking for dimension_reductions X_scvi
..Checking for dimension_reductions X_umap
..Checking for matrices FILL ME with a string
..Checking for gene_meta GeneID
..Checking for gene_meta GeneName
..Checking for cell_meta file
annData file successfully validated against config /Users/yalan/Documents/curation_work/anndata_test/E-ANND-5/anndata-config.yaml
Writing cell/library mapping for a droplet experiment
Writing var(gene) metadata
Writing obs metadata of kind: curation
Extracting metadata from annData object...
...deriving runs using supplied sample ID column file
..extracting metadata consistent within samples
..assigning other metadata as cell_specific
Writing obs (unsupervised clusterings)
Writing markers and statistics
No cell groupings have markers specified, skipping writing of markers and stats
Writing dimension reductions
.. Writing dimension reduction from slot: X_scvi
.. Writing dimension reduction from slot: X_umap
Writing annData file
This error occurred at step5 to embed curated metadata into the annData object:
$ make_bundle_from_anndata --scxa-metadata-branch gtex_sc E-ANND-2 inject_magetab
from conda.common.compat import ensure_text_type, init_std_stream_encoding
ImportError: cannot import name 'init_std_stream_encoding' from 'conda.common.compat' (/hps/software/users/ma/fg_atlas/miniconda3/lib/python3.9/site-packages/conda/common/compat.py)
Managed to move on after installing mamba manually with:
$ conda install -c conda-forge mamba
Probably related to this issue: mamba-org/mamba#1706
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.