Transfer & sync across databases
¶
This guide shows how to sync objects from a source database to your default database.
If you don’t have a database, create one with the modules you need on the target.
Here we pass bionty because we’ll transfer biological entities:
lamin init --modules bionty
Show code cell output
→ initialized lamindb anonymous/docs in /home/runner/work/lamindb/lamindb/docs
Via the CLI¶
You can sync an object from any database to your current database:
lamin io sync https://lamin.ai/laminlabs/lamindata/record/gL3TbX2qZQmCwTAU
Show code cell output
→ connected lamindb: anonymous/docs
• tip: to work with the additional module (pertdb) of database laminlabs/lamindata, confi
gure your environment for it: lamin settings modules set bionty,pertdb
transfer Record gL3TbX2qZQmCwTAU .created_by → User kmvZDIX9 sunnyosun
transfer Record gL3TbX2qZQmCwTAU .type → Record fNBzuANAusnkFv2p Experiments
transfer stub Record(uid='fNBzuANAusnkFv2p') Experiments
transfer Record fNBzuANAusnkFv2p .created_by → User kmvZDIX9 sunnyosun
transfer Record gL3TbX2qZQmCwTAU .schema → Schema r84GHFJndspCMSZf RNA-seq experiment
transfer Schema r84GHFJndspCMSZf .created_by → User kmvZDIX9 sunnyosun
→ transferred: Record(uid='gL3TbX2qZQmCwTAU'), User(uid='kmvZDIX9'), Record(uid='fNBzuANA
usnkFv2p'), Schema(uid='r84GHFJndspCMSZf')
You can pass the --transfer argument, which dictates which related objects are transferred:
"sqlrecord": the object and its foreign keys"notes": its associated notes"annotations": its annotations
You can also pass a --depth argument for HasType objects, which indicates how deeply you want to recurse through the type hierarchy.
Via the API¶
Import lamindb and optionally run ln.track():
import lamindb as ln
ln.track()
Show code cell output
→ connected lamindb: anonymous/docs
→ created Transform('lKoKnCCulRRK0000', key='transfer.ipynb'), started new Run('wH5RKcX4nvL7cboJ') at 2026-09-30 06:09:21 UTC
→ notebook imports: lamindb
• tip: to identify the notebook across renames, pass the uid: ln.track("lKoKnCCulRRK")
Query the object on the source, then call .save():
db = ln.DB("laminlabs/lamindata")
# query the artifact on the source database
artifact = db.Artifact.get(key="example_datasets/mini_immuno/dataset1.h5ad")
# sync the artifact to the current database
artifact.save()
Show code cell output
• tip: to work with the additional module (pertdb) of database laminlabs/lamindata, configure your environment for it: lamin settings modules set bionty,pertdb
transfer Storage D9BilDV2 .created_by → User kmvZDIX9 sunnyosun
transfer Artifact 9K1dteZ6Qx0EXK8g0000 .schema → Schema 0000000000000002 anndata_ensembl_gene_ids_and_valid_features_in_obs
transfer Schema 0000000000000002 .created_by → User FBa7SHjn falexwolf
transfer Artifact 9K1dteZ6Qx0EXK8g0000 .created_by → User FBa7SHjn falexwolf
→ transferred: Artifact(uid='9K1dteZ6Qx0EXK8g0000'), Storage(uid='D9BilDV2'), Schema(uid='0000000000000002'), User(uid='FBa7SHjn')
Artifact(uid='9K1dteZ6Qx0EXK8g0000', key='example_datasets/mini_immuno/dataset1.h5ad', description='Flow cytometry readouts on invitro cell culture', suffix='.h5ad', kind='dataset', otype='AnnData', size=31672.0, hash='FB3CeMjmg1ivN6HDy6wsSg', n_files=None, n_observations=3.0, extra_data=None, branch_id=1, created_on_id=1, space_id=1, storage_id=2, run_id=3, schema_id=2, created_by_id=3, created_at=2025-07-29 12:27:25 UTC, is_locked=False, version_tag=None, is_latest=True)
To transfer annotations, pass transfer="annotations":
# query again so that `artifact` points to the object on the source database
artifact = db.Artifact.get(key="example_datasets/mini_immuno/dataset1.h5ad")
# sync with annotations
artifact.save(transfer="annotations")
Show code cell output
transfer Feature LIrjN9FbaLR1 .created_by → User FBa7SHjn falexwolf
transfer Feature xFdXre6ZPLlK .created_by → User FBa7SHjn falexwolf
transfer Feature fJnNc4pzxe9c .created_by → User kmvZDIX9 sunnyosun
transfer Feature 7xDpJZiVLRl3 .created_by → User FBa7SHjn falexwolf
transfer Feature BaPfsAPgDFrT .created_by → User FBa7SHjn falexwolf
transfer Feature DLeKfqUbrUsg .created_by → User FBa7SHjn falexwolf
transfer Feature zvyDVbZln36o .created_by → User I5DPZdiE zethson
transfer Feature Q8edF7CSgjG2 .created_by → User kmvZDIX9 sunnyosun
transfer Organism 1dpCL6TduFJ3AP .created_by → User I5DPZdiE zethson
transfer Source 4BENqfHn .created_by → User FBa7SHjn falexwolf
transfer Source 404rkf5M .created_by → User FBa7SHjn falexwolf
transfer Gene 1j4At3x7akJU8n .created_by → User b9ZS4jXD bpenteado
transfer Gene 6Aqvc8ckDYeNrD .created_by → User b9ZS4jXD bpenteado
transfer Gene 3bhNYquOnA4sdo .created_by → User b9ZS4jXD bpenteado
transfer ULabel vmjLLqYy .created_by → User kmvZDIX9 sunnyosun
transfer ULabel vmjLLqYy .type → ULabel YAhFIvh5 Perturbation
transfer stub ULabel(uid='YAhFIvh5') Perturbation
transfer ULabel YAhFIvh5 .created_by → User kmvZDIX9 sunnyosun
transfer ULabel Yis4YLIB .created_by → User kmvZDIX9 sunnyosun
transfer ULabel Yis4YLIB .type → ULabel YAhFIvh5 Perturbation
transfer Project BZF49Wr2yZAC .created_by → User FBa7SHjn falexwolf
→ mapped: Artifact(uid='9K1dteZ6Qx0EXK8g0000'), CellType(uid='ryEtgi1yGtAcX2'), CellType(uid='22LvKd01YyNA1a'), CellType(uid='6IC9NGJEv2Y4TD'), CellType(uid='ryEtgi1yGtAcX2'), ExperimentalFactor(uid='4WYv9kl0W2SroY')
→ transferred: Feature(uid='LIrjN9FbaLR1'), Feature(uid='xFdXre6ZPLlK'), Feature(uid='fJnNc4pzxe9c'), Feature(uid='7xDpJZiVLRl3'), Feature(uid='BaPfsAPgDFrT'), Feature(uid='DLeKfqUbrUsg'), Feature(uid='zvyDVbZln36o'), User(uid='I5DPZdiE'), Feature(uid='Q8edF7CSgjG2'), Organism(uid='1dpCL6TduFJ3AP'), Source(uid='4BENqfHn'), Source(uid='404rkf5M'), Gene(uid='1j4At3x7akJU8n'), User(uid='b9ZS4jXD'), Gene(uid='6Aqvc8ckDYeNrD'), Gene(uid='3bhNYquOnA4sdo'), ULabel(uid='vmjLLqYy'), ULabel(uid='YAhFIvh5'), ULabel(uid='Yis4YLIB'), Project(uid='BZF49Wr2yZAC')
Artifact(uid='9K1dteZ6Qx0EXK8g0000', key='example_datasets/mini_immuno/dataset1.h5ad', description='Flow cytometry readouts on invitro cell culture', suffix='.h5ad', kind='dataset', otype='AnnData', size=31672, hash='FB3CeMjmg1ivN6HDy6wsSg', n_files=None, n_observations=3, extra_data=None, branch_id=1, created_on_id=1, space_id=1, storage_id=2, run_id=3, schema_id=2, created_by_id=3, created_at=2025-07-29 12:27:25 UTC, is_locked=False, version_tag=None, is_latest=True)
The artifact now has all feature & label annotations:
artifact.describe()
Show code cell output
/home/runner/work/lamindb/lamindb/lamindb/models/query_manager.py:294: RuntimeWarning: coroutine '_wait_for_close' was never awaited
def get_queryset(self):
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Artifact: example_datasets/mini_immuno/dataset1.h5ad (0000) | description: Flow cytometry readouts on invitro cell culture ├── uid: 9K1dteZ6Qx0EXK8g0000 run: x8C0fQP (__lamindb_transfer__/4XIuR0tvaiXM) │ kind: dataset otype: AnnData │ hash: FB3CeMjmg1ivN6HDy6wsSg size: 30.9 KB │ branch: main space: all │ created_at: 2025-07-29 12:27:25 UTC created_by: falexwolf │ n_observations: 3 schema: anndata_ensembl_gene_ids_and_valid_features_in_obs ├── storage/path: s3://lamindata/.lamindb/9K1dteZ6Qx0EXK8g0000.h5ad ├── Dataset features │ ├── obs (8) │ │ assay_oid bionty.ExperimentalFactor.ontology… EFO:0008913 │ │ cell_type_by_expert bionty.CellType CD8-positive, alpha-beta T cell │ │ cell_type_by_model bionty.CellType B cell, T cell │ │ concentration str │ │ donor str │ │ perturbation ULabel DMSO, IFNG │ │ sample_note str │ │ treatment_time_h num │ └── var.T (3 bionty.Gene) │ CD14 num │ CD4 num │ CD8A num └── Labels └── .ulabels ULabel DMSO, IFNG .projects Project Tutorials .cell_types bionty.CellType B cell, T cell, CD8-positive, alpha-be… .experimental_factors bionty.ExperimentalFactor single-cell RNA sequencing
The sync is zero-copy: the data itself remains in the original storage location.
artifact.path
Show code cell output
S3QueryPath('lamindata/.lamindb/9K1dteZ6Qx0EXK8g0000.h5ad', protocol='s3')
Data lineage indicates the source database of the sync:
artifact.view_lineage()
Show code cell output
The run that initiated the transfer is linked via initiated_by_run:
artifact.run.initiated_by_run.transform
Show code cell output
Transform(uid='lKoKnCCulRRK0000', key='transfer.ipynb', description='Transfer & sync across databases [](https://github.com/laminlabs/lamindb/blob/main/docs/transfer.md)', kind='notebook', hash=None, reference=None, reference_type=None, environment=None, plan=None, branch_id=1, created_on_id=1, space_id=1, run_id=None, created_by_id=1, created_at=2026-09-30 06:09:21 UTC, is_locked=False, version_tag=None, is_latest=True)
Upon calling .save() again, lamindb identifies that the object already exists in the target database and simply maps it:
artifact = db.Artifact.get(key="example_datasets/mini_immuno/dataset1.h5ad")
artifact.save()
Show code cell output
→ mapped: Artifact(uid='9K1dteZ6Qx0EXK8g0000')
Artifact(uid='9K1dteZ6Qx0EXK8g0000', key='example_datasets/mini_immuno/dataset1.h5ad', description='Flow cytometry readouts on invitro cell culture', suffix='.h5ad', kind='dataset', otype='AnnData', size=31672, hash='FB3CeMjmg1ivN6HDy6wsSg', n_files=None, n_observations=3, extra_data=None, branch_id=1, created_on_id=1, space_id=1, storage_id=2, run_id=3, schema_id=2, created_by_id=3, created_at=2025-07-29 12:27:25 UTC, is_locked=False, version_tag=None, is_latest=True)
A data record can be synced only after its type is already in the target database. EXP-RNA-032 belongs to the RNA-seq record frame, so transfer that frame first:
rna_seq_frame = db.Record.get("gL3TbX2qZQmCwTAU")
rna_seq_frame.save(transfer="annotations")
Show code cell output
transfer fill stub Record(uid='gL3TbX2qZQmCwTAU')
transfer Record gL3TbX2qZQmCwTAU .created_by → User kmvZDIX9 sunnyosun
transfer Record gL3TbX2qZQmCwTAU .type → Record fNBzuANAusnkFv2p Experiments
transfer Record gL3TbX2qZQmCwTAU .schema → Schema r84GHFJndspCMSZf RNA-seq experiment
transfer Feature CX6TFm8HRZu6 .created_by → User kmvZDIX9 sunnyosun
transfer schema r84GHFJndspCMSZf ('RNA-seq experiment') members: 18
transfer Feature m5DPR2L5fgk8 .created_by → User kmvZDIX9 sunnyosun
transfer Feature CaEaU5vlsvpQ .created_by → User FBa7SHjn falexwolf
transfer Feature 6jkM7TkidSun .created_by → User kmvZDIX9 sunnyosun
transfer Feature iavnA1RWg8yq .created_by → User kmvZDIX9 sunnyosun
transfer Feature aci5k3PxFx7f .created_by → User b9ZS4jXD bpenteado
transfer Feature 6EhdalbSsRIj .created_by → User b9ZS4jXD bpenteado
transfer Feature kbOqYubLJLlf .created_by → User kmvZDIX9 sunnyosun
transfer Feature Ch393XEjbV0c .created_by → User FBa7SHjn falexwolf
transfer dtype 'biosamples' (cat[Record[H1jrr6bRnfckiB7Q, is_type='True', schema__uid='rlW6NEz3pNq7geCp']]) → Record type H1jrr6bRnfckiB7Q only
transfer stub Record(uid='H1jrr6bRnfckiB7Q') RNASamples
transfer Record H1jrr6bRnfckiB7Q .created_by → User kmvZDIX9 sunnyosun
transfer Record H1jrr6bRnfckiB7Q .type → Record wW4PSdtu2qpTTdyR BioSamples
transfer stub Record(uid='wW4PSdtu2qpTTdyR') BioSamples
transfer Record wW4PSdtu2qpTTdyR .created_by → User kmvZDIX9 sunnyosun
transfer dtype 'biosamples' schema rlW6NEz3pNq7geCp ('RNA sample schema')
transfer Schema rlW6NEz3pNq7geCp .created_by → User kmvZDIX9 sunnyosun
transfer schema rlW6NEz3pNq7geCp ('RNA sample schema') members: 19
transfer Feature FHIniFzhzj8z .created_by → User FBa7SHjn falexwolf
transfer dtype 'cell_line_stock' (cat[Record[ogoeF338PWuRAx05]]) → Record type ogoeF338PWuRAx05 only
transfer stub Record(uid='ogoeF338PWuRAx05') CellLineStocks
transfer Record ogoeF338PWuRAx05 .created_by → User kmvZDIX9 sunnyosun
transfer Feature eLIxLC0yR0H3 .created_by → User kmvZDIX9 sunnyosun
transfer Feature PCUQKf93Kq99 .created_by → User b9ZS4jXD bpenteado
transfer Feature OrUqch37OUTm .created_by → User b9ZS4jXD bpenteado
transfer dtype 'human_donor' (cat[Record[su7VMESa4q9wkmnX]]) → Record type su7VMESa4q9wkmnX only
transfer stub Record(uid='su7VMESa4q9wkmnX') HumanDonors
transfer Record su7VMESa4q9wkmnX .created_by → User kmvZDIX9 sunnyosun
transfer Record su7VMESa4q9wkmnX .type → Record YxUxVLZjVi0HwwL9 Donors
transfer stub Record(uid='YxUxVLZjVi0HwwL9') Donors
transfer Record YxUxVLZjVi0HwwL9 .created_by → User kmvZDIX9 sunnyosun
transfer Feature SxnmZCQseZW8 .created_by → User kmvZDIX9 sunnyosun
transfer dtype 'mouse_donor' (cat[Record[vmmgqecuZcpljUF6]]) → Record type vmmgqecuZcpljUF6 only
transfer stub Record(uid='vmmgqecuZcpljUF6') MouseDonors
transfer Record vmmgqecuZcpljUF6 .created_by → User kmvZDIX9 sunnyosun
transfer Record vmmgqecuZcpljUF6 .type → Record YxUxVLZjVi0HwwL9 Donors
transfer Feature 5uc7TyXEcmVb .created_by → User kmvZDIX9 sunnyosun
transfer dtype 'treatment' (cat[Record[M6PnhOOJS9zLVZjc]]) → Record type M6PnhOOJS9zLVZjc only
transfer stub Record(uid='M6PnhOOJS9zLVZjc') Perturbations
transfer Record M6PnhOOJS9zLVZjc .created_by → User FBa7SHjn falexwolf
transfer Feature ZmrbqWHoTYwx .created_by → User dGAISVKi namsaraeva
transfer Feature IlC6VEpRIukv .created_by → User kmvZDIX9 sunnyosun
transfer Feature n7Rrnpx4cGfu .created_by → User kmvZDIX9 sunnyosun
transfer Feature gFK4ltdgPfEM .created_by → User kmvZDIX9 sunnyosun
transfer dtype 'time_unit' (cat[ULabel[1P3JUWYr]]) → ULabel type 1P3JUWYr only
transfer stub ULabel(uid='1P3JUWYr') TimeUnit
transfer ULabel 1P3JUWYr .created_by → User FBa7SHjn falexwolf
transfer Feature hMtBkgJL9N9y .created_by → User kmvZDIX9 sunnyosun
transfer Feature KihIouc3OReF .created_by → User kmvZDIX9 sunnyosun
transfer dtype 'qc_status' (cat[ULabel[aa9cxnjb]]) → ULabel type aa9cxnjb only
transfer stub ULabel(uid='aa9cxnjb') QCStatus
transfer ULabel aa9cxnjb .created_by → User kmvZDIX9 sunnyosun
transfer Feature AsvVlIgNAKN0 .created_by → User kmvZDIX9 sunnyosun
transfer Feature LytrW5R7j1j3 .created_by → User kmvZDIX9 sunnyosun
transfer Feature jwynkl8IBvox .created_by → User kmvZDIX9 sunnyosun
transfer Feature MTlwG9HNyvdx .created_by → User FBa7SHjn falexwolf
transfer Feature 2nUwfKXqRSQ2 .created_by → User kmvZDIX9 sunnyosun
transfer dtype 'techsamples' (cat[Record[bf6ITReCW0wLEloj, is_type='True', schema__uid='UtdbTJAhcbD1Lf4v']]) → Record type bf6ITReCW0wLEloj only
transfer stub Record(uid='bf6ITReCW0wLEloj') NfCoreRNASeq
transfer Record bf6ITReCW0wLEloj .created_by → User kmvZDIX9 sunnyosun
transfer Record bf6ITReCW0wLEloj .type → Record DdO27wIefKs1mALO TechSamples
transfer stub Record(uid='DdO27wIefKs1mALO') TechSamples
transfer Record DdO27wIefKs1mALO .created_by → User kmvZDIX9 sunnyosun
transfer dtype 'techsamples' schema UtdbTJAhcbD1Lf4v ('nf-core/rnaseq input with sample link')
transfer Schema UtdbTJAhcbD1Lf4v .created_by → User kmvZDIX9 sunnyosun
transfer schema UtdbTJAhcbD1Lf4v ('nf-core/rnaseq input with sample link') members: 5
transfer dtype 'sample' (cat[Record[wW4PSdtu2qpTTdyR, is_type='False']]) → Record type wW4PSdtu2qpTTdyR only
transfer Feature 3RFc0dvVNnCa .created_by → User kmvZDIX9 sunnyosun
transfer Feature 3RFc0dvVNnCa .type → Feature Kk5FzQyYiZfx ExperimentView
transfer stub Feature(uid='Kk5FzQyYiZfx') ExperimentView
transfer Feature Kk5FzQyYiZfx .created_by → User kmvZDIX9 sunnyosun
transfer Feature MZS03k8921DU .created_by → User kmvZDIX9 sunnyosun
transfer Feature tT0R1CiYwOnQ .created_by → User kmvZDIX9 sunnyosun
transfer Feature E1R0KCif9Tbq .created_by → User kmvZDIX9 sunnyosun
transfer dtype 'seq_platform' (cat[ULabel[YZ3aglov]]) → ULabel type YZ3aglov only
transfer stub ULabel(uid='YZ3aglov') SeqPlatform
transfer ULabel YZ3aglov .created_by → User kmvZDIX9 sunnyosun
transfer Feature tRbqyaB8wBFs .created_by → User kmvZDIX9 sunnyosun
transfer Feature zBbulHiRLR2l .created_by → User kmvZDIX9 sunnyosun
transfer dtype 'treatment' (cat[Record[M6PnhOOJS9zLVZjc]]) → Record type M6PnhOOJS9zLVZjc only
transfer Feature vvwQA6gZhezL .created_by → User dGAISVKi namsaraeva
transfer Feature CrQkWXlYQn3E .created_by → User kmvZDIX9 sunnyosun
→ mapped: Schema(uid='r84GHFJndspCMSZf'), Feature(uid='CX6TFm8HRZu6'), Feature(uid='CX6TFm8HRZu6'), Feature(uid='CX6TFm8HRZu6'), Feature(uid='aci5k3PxFx7f'), Feature(uid='6jkM7TkidSun'), Record(uid='wW4PSdtu2qpTTdyR'), Feature(uid='FHIniFzhzj8z'), Feature(uid='PCUQKf93Kq99'), Feature(uid='OrUqch37OUTm'), Record(uid='M6PnhOOJS9zLVZjc'), Feature(uid='AsvVlIgNAKN0'), Feature(uid='jwynkl8IBvox')
→ transferred: Feature(uid='CX6TFm8HRZu6'), Feature(uid='m5DPR2L5fgk8'), Feature(uid='CaEaU5vlsvpQ'), Feature(uid='6jkM7TkidSun'), Feature(uid='iavnA1RWg8yq'), Feature(uid='aci5k3PxFx7f'), Feature(uid='6EhdalbSsRIj'), Feature(uid='kbOqYubLJLlf'), Feature(uid='Ch393XEjbV0c'), Record(uid='H1jrr6bRnfckiB7Q'), Record(uid='wW4PSdtu2qpTTdyR'), Schema(uid='rlW6NEz3pNq7geCp'), Feature(uid='FHIniFzhzj8z'), Record(uid='ogoeF338PWuRAx05'), Feature(uid='eLIxLC0yR0H3'), Feature(uid='PCUQKf93Kq99'), Feature(uid='OrUqch37OUTm'), Record(uid='su7VMESa4q9wkmnX'), Record(uid='YxUxVLZjVi0HwwL9'), Feature(uid='SxnmZCQseZW8'), Record(uid='vmmgqecuZcpljUF6'), Feature(uid='5uc7TyXEcmVb'), Record(uid='M6PnhOOJS9zLVZjc'), Feature(uid='ZmrbqWHoTYwx'), User(uid='dGAISVKi'), Feature(uid='IlC6VEpRIukv'), Feature(uid='n7Rrnpx4cGfu'), Feature(uid='gFK4ltdgPfEM'), ULabel(uid='1P3JUWYr'), Feature(uid='hMtBkgJL9N9y'), Feature(uid='KihIouc3OReF'), ULabel(uid='aa9cxnjb'), Feature(uid='AsvVlIgNAKN0'), Feature(uid='LytrW5R7j1j3'), Feature(uid='jwynkl8IBvox'), Feature(uid='MTlwG9HNyvdx'), Feature(uid='2nUwfKXqRSQ2'), Record(uid='bf6ITReCW0wLEloj'), Record(uid='DdO27wIefKs1mALO'), Schema(uid='UtdbTJAhcbD1Lf4v'), Feature(uid='3RFc0dvVNnCa'), Feature(uid='Kk5FzQyYiZfx'), Feature(uid='MZS03k8921DU'), Feature(uid='tT0R1CiYwOnQ'), Feature(uid='E1R0KCif9Tbq'), ULabel(uid='YZ3aglov'), Feature(uid='tRbqyaB8wBFs'), Feature(uid='zBbulHiRLR2l'), Feature(uid='vvwQA6gZhezL'), Feature(uid='CrQkWXlYQn3E')
Record(uid='gL3TbX2qZQmCwTAU', is_type=True, name='RNA-seq', description='Bulk RNA-seq experiments.', reference=None, reference_type=None, extra_data=None, branch_id=1, created_on_id=1, space_id=1, created_by_id=2, type_id=1, schema_id=1, run_id=3, created_at=2026-05-04 13:44:23 UTC, is_locked=False)
Now transfer the experiment record:
record = db.Record.get("mNDJgWFrkWQVW3ox")
record.save(transfer="annotations")
record.describe()
Show code cell output
transfer Record mNDJgWFrkWQVW3ox .created_by → User kmvZDIX9 sunnyosun
transfer Record mNDJgWFrkWQVW3ox .type → Record gL3TbX2qZQmCwTAU RNA-seq
transfer dtype 'biosamples' (cat[Record[H1jrr6bRnfckiB7Q, is_type='True', schema__uid='rlW6NEz3pNq7geCp']]) → Record type H1jrr6bRnfckiB7Q only
transfer dtype 'biosamples' schema rlW6NEz3pNq7geCp ('RNA sample schema')
transfer schema rlW6NEz3pNq7geCp ('RNA sample schema') members: 19
transfer dtype 'cell_line_stock' (cat[Record[ogoeF338PWuRAx05]]) → Record type ogoeF338PWuRAx05 only
transfer dtype 'human_donor' (cat[Record[su7VMESa4q9wkmnX]]) → Record type su7VMESa4q9wkmnX only
transfer dtype 'mouse_donor' (cat[Record[vmmgqecuZcpljUF6]]) → Record type vmmgqecuZcpljUF6 only
transfer dtype 'treatment' (cat[Record[M6PnhOOJS9zLVZjc]]) → Record type M6PnhOOJS9zLVZjc only
transfer dtype 'time_unit' (cat[ULabel[1P3JUWYr]]) → ULabel type 1P3JUWYr only
transfer dtype 'qc_status' (cat[ULabel[aa9cxnjb]]) → ULabel type aa9cxnjb only
transfer stub Record(uid='E01Sv3l6KZyLWeAy') EXP-RNA-032 HepG2 Compound A RNA-seq
transfer Record E01Sv3l6KZyLWeAy .created_by → User kmvZDIX9 sunnyosun
transfer Record E01Sv3l6KZyLWeAy .type → Record H1jrr6bRnfckiB7Q RNASamples
transfer dtype 'treatment' (cat[Record[M6PnhOOJS9zLVZjc]]) → Record type M6PnhOOJS9zLVZjc only
transfer stub Record(uid='ZrOSMLb2DqPs2CYE') Compound A
transfer Record ZrOSMLb2DqPs2CYE .created_by → User kmvZDIX9 sunnyosun
transfer Record ZrOSMLb2DqPs2CYE .type → Record M6PnhOOJS9zLVZjc Perturbations
transfer dtype 'techsamples' (cat[Record[bf6ITReCW0wLEloj, is_type='True', schema__uid='UtdbTJAhcbD1Lf4v']]) → Record type bf6ITReCW0wLEloj only
transfer dtype 'techsamples' schema UtdbTJAhcbD1Lf4v ('nf-core/rnaseq input with sample link')
transfer schema UtdbTJAhcbD1Lf4v ('nf-core/rnaseq input with sample link') members: 5
transfer dtype 'sample' (cat[Record[wW4PSdtu2qpTTdyR, is_type='False']]) → Record type wW4PSdtu2qpTTdyR only
transfer dtype 'seq_platform' (cat[ULabel[YZ3aglov]]) → ULabel type YZ3aglov only
transfer stub Record(uid='R9t92WEHx0SlN4CA') EXP-RNA-032 HepG2 Compound A FASTQs
transfer Record R9t92WEHx0SlN4CA .created_by → User kmvZDIX9 sunnyosun
transfer Record R9t92WEHx0SlN4CA .type → Record bf6ITReCW0wLEloj NfCoreRNASeq
transfer stub ULabel(uid='uZXz55lv') unknown
transfer ULabel uZXz55lv .created_by → User kmvZDIX9 sunnyosun
transfer ULabel uZXz55lv .type → ULabel aa9cxnjb QCStatus
transfer Project q2P4a9hleXF9 .created_by → User kmvZDIX9 sunnyosun
→ transferred: Project(uid='q2P4a9hleXF9')
→ mapped: Organism(uid='1dpCL6TduFJ3AP')
transfer Tissue 3XuJERvMuj3EQT .created_by → User kmvZDIX9 sunnyosun
transfer Source 1tLk8t6p .created_by → User FBa7SHjn falexwolf
→ transferred: Tissue(uid='3XuJERvMuj3EQT'), Source(uid='1tLk8t6p')
transfer Disease 4JiPHWKzLT0fcp .created_by → User kmvZDIX9 sunnyosun
transfer Source 2toyQknk .created_by → User I5DPZdiE zethson
→ transferred: Disease(uid='4JiPHWKzLT0fcp'), Source(uid='2toyQknk')
transfer CellLine 4ea731nbUdC3bk .created_by → User kmvZDIX9 sunnyosun
→ transferred: CellLine(uid='4ea731nbUdC3bk')
→ mapped: ExperimentalFactor(uid='3C8KLOGpZkHsC5')
transfer ExperimentalFactor 6TcWS1MsXrj0LP .created_by → User kmvZDIX9 sunnyosun
transfer Source 69Xcs1sj .created_by → User I5DPZdiE zethson
→ transferred: ExperimentalFactor(uid='6TcWS1MsXrj0LP'), Source(uid='69Xcs1sj')
transfer ExperimentalFactor 2CIIhUdxb6DU9a .created_by → User kmvZDIX9 sunnyosun
→ transferred: ExperimentalFactor(uid='2CIIhUdxb6DU9a')
→ mapped: Feature(uid='m5DPR2L5fgk8'), Feature(uid='CaEaU5vlsvpQ'), Feature(uid='CrQkWXlYQn3E'), Feature(uid='jwynkl8IBvox'), Record(uid='H1jrr6bRnfckiB7Q'), Schema(uid='rlW6NEz3pNq7geCp'), Feature(uid='CX6TFm8HRZu6'), Feature(uid='CX6TFm8HRZu6'), Feature(uid='aci5k3PxFx7f'), Feature(uid='FHIniFzhzj8z'), Record(uid='ogoeF338PWuRAx05'), Feature(uid='eLIxLC0yR0H3'), Feature(uid='PCUQKf93Kq99'), Feature(uid='OrUqch37OUTm'), Record(uid='su7VMESa4q9wkmnX'), Feature(uid='SxnmZCQseZW8'), Record(uid='vmmgqecuZcpljUF6'), Feature(uid='5uc7TyXEcmVb'), Record(uid='M6PnhOOJS9zLVZjc'), Feature(uid='ZmrbqWHoTYwx'), Feature(uid='IlC6VEpRIukv'), Feature(uid='n7Rrnpx4cGfu'), Feature(uid='gFK4ltdgPfEM'), ULabel(uid='1P3JUWYr'), Feature(uid='hMtBkgJL9N9y'), Feature(uid='KihIouc3OReF'), Feature(uid='6jkM7TkidSun'), ULabel(uid='aa9cxnjb'), Feature(uid='AsvVlIgNAKN0'), Feature(uid='LytrW5R7j1j3'), Feature(uid='jwynkl8IBvox'), Feature(uid='MTlwG9HNyvdx'), Feature(uid='2nUwfKXqRSQ2'), Record(uid='M6PnhOOJS9zLVZjc'), Feature(uid='vvwQA6gZhezL'), Record(uid='bf6ITReCW0wLEloj'), Schema(uid='UtdbTJAhcbD1Lf4v'), Record(uid='wW4PSdtu2qpTTdyR'), Feature(uid='3RFc0dvVNnCa'), Feature(uid='MZS03k8921DU'), Feature(uid='tT0R1CiYwOnQ'), Feature(uid='E1R0KCif9Tbq'), ULabel(uid='YZ3aglov'), Feature(uid='tRbqyaB8wBFs'), Feature(uid='zBbulHiRLR2l'), Feature(uid='AsvVlIgNAKN0'), Feature(uid='6jkM7TkidSun'), Feature(uid='iavnA1RWg8yq'), Feature(uid='aci5k3PxFx7f'), Feature(uid='PCUQKf93Kq99'), Feature(uid='OrUqch37OUTm'), Feature(uid='FHIniFzhzj8z'), Feature(uid='6EhdalbSsRIj'), Feature(uid='kbOqYubLJLlf'), Feature(uid='Ch393XEjbV0c')
→ transferred: Record(uid='mNDJgWFrkWQVW3ox'), Record(uid='E01Sv3l6KZyLWeAy'), Record(uid='ZrOSMLb2DqPs2CYE'), Record(uid='R9t92WEHx0SlN4CA'), ULabel(uid='uZXz55lv'), User(uid='qTQ5q0ar')
Record: EXP-RNA-032 ├── uid: mNDJgWFrkWQVW3ox run: x8C0fQP (__lamindb_transfer__/4XIuR0tvaiXM) │ type: RNA-seq is_type: False │ schema: reference: │ branch: main space: all │ created_at: 2026-08-20 13:38:38 UTC created_by: sunnyosun ├── Features │ └── assay bionty.ExperimentalFactor RNA-Seq │ biosamples Record[H1jrr6bRnfckiB7Q, is_type='… EXP-RNA-032 HepG2 Compound A RNA-seq │ cell_line bionty.CellLine Hep G2 cell │ disease bionty.Disease hepatocellular carcinoma │ instrument bionty.ExperimentalFactor Illumina NovaSeq 6000 │ library_preparation bionty.ExperimentalFactor NEBNext Ultra II RNA Library Prep │ organism bionty.Organism human │ owner User Koncopd │ project Project Record demo │ qc_status ULabel[QCStatus] unknown │ techsamples Record[bf6ITReCW0wLEloj, is_type='… EXP-RNA-032 HepG2 Compound A FASTQs │ tissue bionty.Tissue liver │ treatment Record[Perturbations] Compound A │ date_of_experiment date 2026-08-18 │ description str Hep G2 Compound A dose series (0 / 1 /… │ n_samples int 3 │ notes str Liver metabolic response; FASTQ QC sti… └── Notes: │ ### Experiment Overview & Objective │ │ Investigate the acute transcriptional response and potential liver metabolic pat … │ │ ### Experimental Design │ │ * **Model System:** HepG2 cells (Human Hepatocellular Carcinoma / Liver Tissue) │ * **Treatment Parameters:** │ * **Compound:** Compound A │ * **Dose Points:** 3 conditions (0 µM vehicle control, 1 µM low dose, 10 µM high … │ * **Timepoint:** 12-hour incubation │ * **Sample Count:** $n = 3$ total samples │ │ ### Protocol & Sequencing Specifications │ │ * **Library Preparation:** NEBNext Ultra II RNA Library Prep │ * **Sequencing Platform:** Illumina NovaSeq 6000 │ * **Assay Type:** Bulk RNA-Seq │ * **Bioinformatics Pipeline Target:** `nf-core/rnaseq` workflow │ │ ### Data Status & Immediate Next Steps │ │ 1. **FASTQ Quality Control:** Pending initial raw read QC assessment (FastQC / M … │ 2. **Alignment & Quantification:** Align reads to human reference genome (GRCh38 … │ 3. **Downstream Target Analysis:** │ * Differential gene expression (DGE) analysis between treated vs. control sample … │ * Pathway enrichment analysis targeting hepatic drug metabolism, cytochrome P450 …
How do I know if an object is in the default database or elsewhere?
Every SQLRecord object has an attribute ._state.db which can take the following values:
None: the object has not yet been saved to any database"default": the object is saved on the default database instance"account/name": the object is saved on a non-default database instance referenced byaccount/name(e.g.,laminlabs/lamindata)
Show code cell content
assert artifact.transform.description == "Transfer from `laminlabs/lamindata`"
assert artifact.transform.key == "__lamindb_transfer__/4XIuR0tvaiXM"
assert artifact.transform.uid == "4XIuR0tvaiXM0000"
assert artifact.run.initiated_by_run.transform.description.startswith("Transfer & sync")
assert artifact.features.slots
for schema in artifact.features.slots.values():
_ = schema.index
rna_seq = ln.Record.get("gL3TbX2qZQmCwTAU")
assert rna_seq.is_type
assert rna_seq._state.db == "default"
source = db.Record.get("mNDJgWFrkWQVW3ox")
expected = source.features.get_values()
got = record.features.get_values()
assert record._state.db == "default"
assert set(got) == set(expected)
for key in (
"date_of_experiment",
"organism",
"assay",
"project",
"n_samples",
"notes",
"name",
"description",
"owner",
):
assert got[key] == expected[key]
again = db.Record.get("mNDJgWFrkWQVW3ox").save(transfer="annotations")
assert again.id == record.id
transfer fill stub Record(uid='mNDJgWFrkWQVW3ox')
transfer Record mNDJgWFrkWQVW3ox .created_by → User kmvZDIX9 sunnyosun
transfer Record mNDJgWFrkWQVW3ox .type → Record gL3TbX2qZQmCwTAU RNA-seq
transfer dtype 'biosamples' (cat[Record[H1jrr6bRnfckiB7Q, is_type='True', schema__uid='rlW6NEz3pNq7geCp']]) → Record type H1jrr6bRnfckiB7Q only
transfer dtype 'biosamples' schema rlW6NEz3pNq7geCp ('RNA sample schema')
transfer schema rlW6NEz3pNq7geCp ('RNA sample schema') members: 19
transfer dtype 'cell_line_stock' (cat[Record[ogoeF338PWuRAx05]]) → Record type ogoeF338PWuRAx05 only
transfer dtype 'human_donor' (cat[Record[su7VMESa4q9wkmnX]]) → Record type su7VMESa4q9wkmnX only
transfer dtype 'mouse_donor' (cat[Record[vmmgqecuZcpljUF6]]) → Record type vmmgqecuZcpljUF6 only
transfer dtype 'treatment' (cat[Record[M6PnhOOJS9zLVZjc]]) → Record type M6PnhOOJS9zLVZjc only
transfer dtype 'time_unit' (cat[ULabel[1P3JUWYr]]) → ULabel type 1P3JUWYr only
transfer dtype 'qc_status' (cat[ULabel[aa9cxnjb]]) → ULabel type aa9cxnjb only
transfer dtype 'treatment' (cat[Record[M6PnhOOJS9zLVZjc]]) → Record type M6PnhOOJS9zLVZjc only
transfer dtype 'techsamples' (cat[Record[bf6ITReCW0wLEloj, is_type='True', schema__uid='UtdbTJAhcbD1Lf4v']]) → Record type bf6ITReCW0wLEloj only
transfer dtype 'techsamples' schema UtdbTJAhcbD1Lf4v ('nf-core/rnaseq input with sample link')
transfer schema UtdbTJAhcbD1Lf4v ('nf-core/rnaseq input with sample link') members: 5
transfer dtype 'sample' (cat[Record[wW4PSdtu2qpTTdyR, is_type='False']]) → Record type wW4PSdtu2qpTTdyR only
transfer dtype 'seq_platform' (cat[ULabel[YZ3aglov]]) → ULabel type YZ3aglov only
→ mapped: Project(uid='q2P4a9hleXF9')
→ mapped: Organism(uid='1dpCL6TduFJ3AP')
→ mapped: Tissue(uid='3XuJERvMuj3EQT')
→ mapped: Disease(uid='4JiPHWKzLT0fcp')
→ mapped: CellLine(uid='4ea731nbUdC3bk')
→ mapped: ExperimentalFactor(uid='3C8KLOGpZkHsC5')
→ mapped: ExperimentalFactor(uid='6TcWS1MsXrj0LP')
→ mapped: ExperimentalFactor(uid='2CIIhUdxb6DU9a')
→ mapped: Feature(uid='m5DPR2L5fgk8'), Feature(uid='CaEaU5vlsvpQ'), Feature(uid='CrQkWXlYQn3E'), Feature(uid='jwynkl8IBvox'), Record(uid='H1jrr6bRnfckiB7Q'), Schema(uid='rlW6NEz3pNq7geCp'), Feature(uid='CX6TFm8HRZu6'), Feature(uid='CX6TFm8HRZu6'), Feature(uid='aci5k3PxFx7f'), Feature(uid='FHIniFzhzj8z'), Record(uid='ogoeF338PWuRAx05'), Feature(uid='eLIxLC0yR0H3'), Feature(uid='PCUQKf93Kq99'), Feature(uid='OrUqch37OUTm'), Record(uid='su7VMESa4q9wkmnX'), Feature(uid='SxnmZCQseZW8'), Record(uid='vmmgqecuZcpljUF6'), Feature(uid='5uc7TyXEcmVb'), Record(uid='M6PnhOOJS9zLVZjc'), Feature(uid='ZmrbqWHoTYwx'), Feature(uid='IlC6VEpRIukv'), Feature(uid='n7Rrnpx4cGfu'), Feature(uid='gFK4ltdgPfEM'), ULabel(uid='1P3JUWYr'), Feature(uid='hMtBkgJL9N9y'), Feature(uid='KihIouc3OReF'), Feature(uid='6jkM7TkidSun'), ULabel(uid='aa9cxnjb'), Feature(uid='AsvVlIgNAKN0'), Feature(uid='LytrW5R7j1j3'), Feature(uid='jwynkl8IBvox'), Feature(uid='MTlwG9HNyvdx'), Feature(uid='2nUwfKXqRSQ2'), Record(uid='E01Sv3l6KZyLWeAy'), Record(uid='M6PnhOOJS9zLVZjc'), Feature(uid='vvwQA6gZhezL'), Record(uid='ZrOSMLb2DqPs2CYE'), Record(uid='bf6ITReCW0wLEloj'), Schema(uid='UtdbTJAhcbD1Lf4v'), Record(uid='wW4PSdtu2qpTTdyR'), Feature(uid='3RFc0dvVNnCa'), Feature(uid='MZS03k8921DU'), Feature(uid='tT0R1CiYwOnQ'), Feature(uid='E1R0KCif9Tbq'), ULabel(uid='YZ3aglov'), Feature(uid='tRbqyaB8wBFs'), Feature(uid='zBbulHiRLR2l'), Record(uid='R9t92WEHx0SlN4CA'), Feature(uid='AsvVlIgNAKN0'), ULabel(uid='uZXz55lv'), Feature(uid='6jkM7TkidSun'), User(uid='qTQ5q0ar'), Feature(uid='iavnA1RWg8yq'), Feature(uid='aci5k3PxFx7f'), Feature(uid='PCUQKf93Kq99'), Feature(uid='OrUqch37OUTm'), Feature(uid='FHIniFzhzj8z'), Feature(uid='6EhdalbSsRIj'), Feature(uid='kbOqYubLJLlf'), Feature(uid='Ch393XEjbV0c')