lamindb.QueryDB¶
- class lamindb.QueryDB(instance)¶
Bases:
objectQuery any registry of any instance.
QueryDB exposes all available registries of LaminDB and modules like Bionty or Wetlab.
- Parameters:
instance (
str) – Instance identifier in format “account/instance”.
Examples
Query records from an instance:
cxg = ln.QueryDB("laminlabs/cellxgene") artifacts = cxg.Artifact.filter(suffix=".h5ad") records = cxg.Record.filter(name__startswith="cell") ECL = cxg.bionty.CellType.filter(name="enterochromaffin-like cell") cxg.Artifact.filter( suffix=".h5ad", description__contains="immune", size__gt=1e9, # size > 1GB cell_types__in=[ cell_types.b_cell, cell_types.t_cell, ], ).order_by("created_at").to_dataframe( include=["cell_types__name", "created_by__handle"] # join with additional info ).head()
Attributes¶
- Collection: QuerySet[Collection]¶
Query collections.
- bionty: BiontyQueryDB¶
Namespace for Bionty registries (Gene, CellType, Disease, etc.).
- wetlab: WetlabQueryDB¶
Namespace for wetlab registries (Experiment, Biosample, etc.).