Public
Edited
Feb 9
Insert cell
Insert cell
obsSets = {
const { AnnDataSource, ObsSetsAnndataLoader } = ZarrFileType;

const url = "https://assets.hubmapconsortium.org/ad693f99fb9006e68a53e97598da1509/hubmap_ui/anndata-zarr/secondary_analysis.zarr";

const source = new AnnDataSource({ url });
const config = {
url,
fileType: 'obsSets.anndata.zarr',
options: {
obsSets: [
{
name: 'Cell Ontology Annotation',
path: 'obs/predicted_label'
}
]
},
};
const loader = new ObsSetsAnndataLoader(source, config);

const { data: { obsSets } } = await loader.load();
// obsIndex is cell IDs. varIndex is gene IDs.

// We can load the data for a subset of genes by selecting an array of gene IDs.
return obsSets;
}
Insert cell
Insert cell
ZarrFileType = import('https://unpkg.com/@vitessce/zarr@3.5.6/dist/index.js')
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more