Quickstart¶
!lamin init --storage ./test-clinicore --schema bionty,clinicore
import clinicore as cl
cl.Project
→ connected lamindb: testuser1/test-clinicore
Project
Simple fields
.uid: CharField
.name: CharField
.description: TextField
.created_at: DateTimeField
.updated_at: DateTimeField
Relational fields
.created_by: User
.run: Run
.artifacts: Artifact
.collections: Collection
Clinicore fields
.biosamples: clinicore.Biosample
project = cl.Project(name="Project 001", description="This is a test project").save()
project
Project(uid='eDiEX4fe', name='Project 001', description='This is a test project', created_by_id=1, updated_at='2024-09-02 15:00:14 UTC')
import bionty as bt
medication_source = bt.Source.get(name="chebi")
cl.Medication.add_source(medication_source)
→ due to lack of write access, LaminDB won't manage storage location: s3://bionty-assets/
→ source added!
Source(uid='2Wsn', entity='clinicore.Medication', organism='all', name='chebi', version='2024-07-27', in_db=False, currently_used=True, description='Chemical Entities of Biological Interest', url='s3://bionty-assets/df_all__chebi__2024-07-27__Drug.parquet', source_website='https://www.ebi.ac.uk/chebi/', created_by_id=1, dataframe_artifact_id=1, updated_at='2024-09-02 15:00:17 UTC')
medication = cl.Medication.from_source(name="Vismione D").save()
medication
Medication(uid='13okFM0p', name='Vismione D', ontology_id='CHEBI:10000', chembl_id='CHEMBL487795', synonyms='Vismione D', created_by_id=1, source_id=97, updated_at='2024-09-02 15:00:19 UTC')