laminlabs / cellxgene-lamin

Access the cellxgene data using LaminDB.
https://docs.lamin.ai/cellxgene
Apache License 2.0
5 stars 0 forks source link

🍱 Re-curating cellxgene: Annotating with features values & mapping version families #83

Open falexwolf opened 1 month ago

falexwolf commented 1 month ago

I wanted to put the following on a slide in the demo deck, but I realize that it's falling short because it doesn't associate labels with features.

https://lamin.ai/laminlabs/cellxgene/artifact/Ntdynj9uX3LGLRCK2xcV

image image

Can we tweak the curation script so that features are mapped? And also annotate with feature values?

Also: Can we map version families to collapse the following search result? See this Slack thread for context.

image

Zethson commented 1 month ago

Can we split this into two issues?

falexwolf commented 1 month ago

Yes, we can split this into two issues!

I thought I'd put into one as these should both be 3 lines of code in the curation script/notebook, so maybe a single rather quick PR.

falexwolf commented 1 month ago

To clarify what I mean, I'll now use the example from our scRNA guide for the slide.

https://docs.lamin.ai/scrna

https://lamin.ai/laminlabs/lamindata/artifact/xJkeL0OxEFIpvGWKdpne

image

And we should double check that everything makes sense for this one before doing a bulk-re-curation.

On the hub, this one also looks somewhat strange. Not clear if this is something potentially going wrong in the frontend or whether there is still weirdness in feature tracking.

image
Zethson commented 3 weeks ago
if field in ["donor_id", "suspension_type", "tissue_type"]:
            records = orm.from_values(terms, field="name")
            if len(records) > 0:
                # stratify by feature so that link tables records are written
                artifact.labels.add(records, feature=getattr(features, field))

In the census registration script must be adapted by removing the if statement.