Perturbation registries¶
The wetlab schema is designed to model complex wetlab.Experiment of any wetlab.ExperimentType that include perturbations in the experimental design.
Perturbations are intentional disruptions in biological systems, such as wetlab.GeneticPerturbation, wetlab.CompoundPerturbation, or wetlab.EnvironmentalPerturbation, to study their effects on molecular and cellular processes.
Such perturbations sometimes also have known wetlab.PerturbationTarget which can be one or serveral Gene
, Pathway
, or Protein
.
While single perturbations are common, it is also possible to combine several perturbations into a wetlab.CombinationPerturbation.
#! pip install 'lamindb[bionty]' wetlab
!lamin init --storage ./test-pert-registries --schema bionty,wetlab
→ connected lamindb: anonymous/test-pert-registries
import bionty as bt
import wetlab as wl
Gefitinib is primarily a pharmaceutical drug, specifically a targeted therapy used in cancer treatment, particularly for non-small cell lung cancer (NSCLC). Let’s assume that we want to better understand the effectiveness of gefitinib and EGFR/KRAS knockdown combination perturbation for people that have a smoking history. In our early experimental setup, we therefore subject mice to smoke.
bt.settings.organism = "mouse"
→ connected lamindb: anonymous/test-pert-registries
Genetic perturbations¶
We create two wetlab.GeneticPerturbation records associated with the corresponding wetlab.PerturbationTarget.
EGFR_kd = wl.GeneticPerturbation(
system="CRISPR-Cas9",
name="EGFR knockdown",
sequence="AGCTGACCGTGA",
on_target_score=85,
off_target_score=15,
).save()
EGFR_gene = bt.Gene.from_source(symbol="EGFR").save()
EGFR_kd_target = wl.PerturbationTarget(name="EGFR").save()
EGFR_kd_target.genes.add(EGFR_gene)
EGFR_kd.targets.add(EGFR_kd_target)
EGFR_kd_target
PerturbationTarget(uid='i1xQ5IyP', name='EGFR', created_by_id=1, created_at=2024-12-20 11:36:54 UTC)
KRAS_kd = wl.GeneticPerturbation(
system="CRISPR-Cas9",
name="KRAS",
sequence="TTGGTGGTGAACT",
on_target_score=100,
off_target_score=20,
).save()
KRAS_gene = bt.Gene.from_source(symbol="KRAS").save()
KRAS_kd_target = wl.PerturbationTarget(name="KRAS").save()
KRAS_kd_target.genes.add(KRAS_gene)
KRAS_kd.targets.add(KRAS_kd_target)
KRAS_kd_target
PerturbationTarget(uid='LgDFd8cF', name='KRAS', created_by_id=1, created_at=2024-12-20 11:36:56 UTC)
Compound perturbations¶
Next, we create a wetlab.CompoundPerturbation records including associated wetlab.PerturbationTarget.
gefitinib = compound_perturbation = wl.CompoundPerturbation(
name="gefitinib",
).save()
Gefitinib is a tyrosine kinase inhibitor (TKI) that specifically targets the epidermal growth factor receptor (EGFR) pathway and the EGFR protein.
Therefore, we can also define the and associate it with a :class:bionty.Pathway
and :class:bionty.Protein
.
egfr_pathway = bt.Pathway.from_source(
name="epidermal growth factor receptor activity"
).save()
egfr_protein = bt.Protein.from_source(uniprotkb_id="Q5SVE7").save()
egfr_targets = wl.PerturbationTarget(name="EGFR").save()
egfr_targets.pathways.add(egfr_pathway)
egfr_targets.proteins.add(egfr_protein)
egfr_targets
→ returning existing PerturbationTarget record with same name: 'EGFR'
PerturbationTarget(uid='i1xQ5IyP', name='EGFR', created_by_id=1, created_at=2024-12-20 11:36:54 UTC)
gefitinib.targets.add(egfr_targets)
gefitinib
CompoundPerturbation(uid='HLpI5u7QXik6', name='gefitinib', created_by_id=1, created_at=2024-12-20 11:36:56 UTC)
Environmental perturbations¶
smoking = wl.EnvironmentalPerturbation(
name="smoking status measurement", ontology_id="EFO:0006527"
).save()
Combination Perturbation¶
Now we can combine all individual perturbations into a single wetlab.CombinationPerturbation.
combination_perturbation = wl.CombinationPerturbation(
name="gefitinib and EGFR/KRAS knockdown combination perturbation subject to smoking"
).save()
combination_perturbation.genetic_perturbations.set([EGFR_kd, KRAS_kd])
combination_perturbation.compound_perturbations.add(gefitinib)
combination_perturbation.environmental_perturbations.add(smoking)
combination_perturbation
CombinationPerturbation(uid='t0zokNbLBH0t', name='gefitinib and EGFR/KRAS knockdown combination perturbation subject to smoking', created_by_id=1, created_at=2024-12-20 11:36:59 UTC)