Code Monkey home page Code Monkey logo

atlas-anndata's People

Contributors

pinin4fjords avatar pmb59 avatar yalanbi avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

atlas-anndata's Issues

Unable to get sample annotations

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:

  1. run 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
  1. edit "gene_meta" fields (id_field: GeneID & name_field: GeneName) and "sample_field: file" in .yaml
  2. run 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

issue with mamba

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.