Where to store external links and IDs?¶
When registering data in LaminDB, you might want to store a reference link or ID to indicate the source of the collection.
We have reference
and reference_type
fields for this purpose, they are available for Collection
, Transform
, Run
and ULabel
.
# !pip install lamindb
!lamin init --storage testreference
→ connected lamindb: testuser1/testreference
import lamindb as ln
→ connected lamindb: testuser1/testreference
Let’s say we have a few donor samples that came form Vendor X, in order to chase back the orders, I’d like to keep track the donor ids provided by the vendor:
ln.ULabel(
name="donor 001", reference="VX984545", reference_type="Donor ID from Vendor X"
)
ULabel(uid='9atcIoju', name='donor 001', reference='VX984545', reference_type='Donor ID from Vendor X', created_by_id=1)
!lamin delete --force testreference
• deleting instance testuser1/testreference