Quickstart

!lamin init --storage ./test-clinicore --schema bionty,clinicore
→ connected lamindb: testuser1/test-clinicore
import clinicore as cl
cl.ClinicalTrial
→ connected lamindb: testuser1/test-clinicore
ClinicalTrial
  Simple fields
    .uid: CharField
    .name: CharField
    .title: TextField
    .objective: TextField
    .description: TextField
    .created_at: DateTimeField
    .updated_at: DateTimeField
  Relational fields
    .created_by: User
    .run: Run
    .collections: Collection
    .artifacts: Artifact
  Clinicore fields
    .biosamples: clinicore.Biosample
clinical_trail = cl.ClinicalTrial(name="NCT00000000", title="This is a test clinical trial").save()
clinical_trail
ClinicalTrial(uid='yVVSqYES', name='NCT00000000', title='This is a test clinical trial', created_by_id=1, created_at=2024-10-03 10:33:40 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 00:00:00 ', 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, created_at=2024-10-03 10:33:40 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=101, created_at=2024-10-03 10:33:44 UTC)