scverse / scverse/scanpy

interaction with loom object

Open
#933 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.6k
Forks
779
Avg merge
1d 4h
Merged PRs (30d)
27

Description

Hi guys,

I have opened a loom file on scanpy by running: sc.read_loom. Once i try to see what is in there this is what pops up:

AnnData object with n_obs × n_vars = 56902 × 17473
obs: 'Age', 'Clusterings', 'Embedding', 'Embeddings_X', 'Embeddings_Y', 'Gender', 'Genotype', 'RegulonsAUC', 'Replicate', 'nGene', 'nUMI'
var: 'ClusterMarkers_0', 'ClusterMarkers_0_sub_0', 'ClusterMarkers_0_sub_1', 'ClusterMarkers_0_sub_10', 'ClusterMarkers_0_sub_11', 'ClusterMarkers_0_sub_12', 'ClusterMarkers_0_sub_13', 'ClusterMarkers_0_sub_14', 'ClusterMarkers_0_sub_15', 'ClusterMarkers_0_sub_16', 'ClusterMarkers_0_sub_17', 'ClusterMarkers_0_sub_18', 'ClusterMarkers_0_sub_19', 'ClusterMarkers_0_sub_2', 'ClusterMarkers_0_sub_20', 'ClusterMarkers_0_sub_21', 'ClusterMarkers_0_sub_22', 'ClusterMarkers_0_sub_23', 'ClusterMarkers_0_sub_24', 'ClusterMarkers_0_sub_25', 'ClusterMarkers_0_sub_26', 'ClusterMarkers_0_sub_27', 'ClusterMarkers_0_sub_28', 'ClusterMarkers_0_sub_29', 'ClusterMarkers_0_sub_3', 'ClusterMarkers_0_sub_30', 'ClusterMarkers_0_sub_31', 'ClusterMarkers_0_sub_32', 'ClusterMarkers_0_sub_33', 'ClusterMarkers_0_sub_34', 'ClusterMarkers_0_sub_35', 'ClusterMarkers_0_sub_36', 'ClusterMarkers_0_sub_37', 'ClusterMarkers_0_sub_38', 'ClusterMarkers_0_sub_39', 'ClusterMarkers_0_sub_4', 'ClusterMarkers_0_sub_40', 'ClusterMarkers_0_sub_41', 'ClusterMarkers_0_sub_42', 'ClusterMarkers_0_sub_43', 'ClusterMarkers_0_sub_44', 'ClusterMarkers_0_sub_45', 'ClusterMarkers_0_sub_46', 'ClusterMarkers_0_sub_47', 'ClusterMarkers_0_sub_48', 'ClusterMarkers_0_sub_49', 'ClusterMarkers_0_sub_5', 'ClusterMarkers_0_sub_50', 'ClusterMarkers_0_sub_51', 'ClusterMarkers_0_sub_52', 'ClusterMarkers_0_sub_53', 'ClusterMarkers_0_sub_54', 'ClusterMarkers_0_sub_55', 'ClusterMarkers_0_sub_56', 'ClusterMarkers_0_sub_57', 'ClusterMarkers_0_sub_58', 'ClusterMarkers_0_sub_59', 'ClusterMarkers_0_sub_6', 'ClusterMarkers_0_sub_60', 'ClusterMarkers_0_sub_61', 'ClusterMarkers_0_sub_62', 'ClusterMarkers_0_sub_63', 'ClusterMarkers_0_sub_64', 'ClusterMarkers_0_sub_65', 'ClusterMarkers_0_sub_66', 'ClusterMarkers_0_sub_67', 'ClusterMarkers_0_sub_68', 'ClusterMarkers_0_sub_69', 'ClusterMarkers_0_sub_7', 'ClusterMarkers_0_sub_70', 'ClusterMarkers_0_sub_71', 'ClusterMarkers_0_sub_72', 'ClusterMarkers_0_sub_8', 'ClusterMarkers_0_sub_9', 'ClusterMarkers_1', 'ClusterMarkers_2', 'ClusterMarkers_3', 'ClusterMarkers_4', 'ClusterMarkers_5', 'ClusterMarkers_6', 'ClusterMarkers_7', 'Regulons'
obsm: 'ClusterID'

This is from publicaly available data. so what i would like to do is plot their published tsne or umap and compare a few things from it. If I simply run sc.pl.tsne(loom_file, color=['louvain']) I get error msg: ValueError: no field of name X_tsne

This makes sense as there is not X_tsne on the object. How could I get pass this without re-clustering myself? At the moment I am only interested in pulling out 2 of their annotated clusters... if there is an easy way to do this via scanpy please let me know.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with sc.read_loom and sc.pl.tsne, then inspect how the plotting entry point looks for X_tsne and how the loom object's obsm field is represented. Reproduce the ValueError with the described loom data and determine whether existing published embeddings can be selected; done means plotting those embeddings or documenting the limitation and supported path.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
bioinformatics, data-visualization
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.