laminlabs / wetlab

A wetlab schema with a focus on perturbation modeling.
https://docs.lamin.ai/wetlab
1 stars 1 forks source link

Define scope of wetlab schema #82

Open Zethson opened 14 hours ago

Zethson commented 14 hours ago

The wetlab schema is not clearly defined and has different types of models. We should agree on what wetlab is and what it isn't. I personally think that the current (bloated?) scope is okay because I'm not a fan of creating even more schema modules that we have to maintain and users have to find and use. Despite migrations.

Anyways, Claude thinks (https://claude.ai/share/007f775c-fb22-4bfb-82ba-a6d7480c2993), we could additionally have:

class Equipment(models.Model):
    name = models.CharField(max_length=100)
    model_number = models.CharField(max_length=50)
    location = models.CharField(max_length=100)
    maintenance_due = models.DateField()
    is_available = models.BooleanField(default=True)
    notes = models.TextField(blank=True)

class Reagent(models.Model):
    name = models.CharField(max_length=100)
    catalog_number = models.CharField(max_length=50)
    manufacturer = models.CharField(max_length=100)
    lot_number = models.CharField(max_length=50)
    expiration_date = models.DateField()
    storage_location = models.CharField(max_length=100)
    current_quantity = models.FloatField()
    unit = models.CharField(max_length=20)
    minimum_quantity = models.FloatField()

class Protocol(models.Model):
    name = models.CharField(max_length=200)
    version = models.CharField(max_length=20)
    created_by = models.ForeignKey(User, on_delete=models.CASCADE)
    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)
    steps = models.TextField()
    reagents = models.ManyToManyField(Reagent)
    equipment = models.ManyToManyField(Equipment)

class Experiment(models.Model):
    STATUS_CHOICES = [
        ('planned', 'Planned'),
        ('in_progress', 'In Progress'),
        ('completed', 'Completed'),
        ('failed', 'Failed')
    ]

    title = models.CharField(max_length=200)
    protocol = models.ForeignKey(Protocol, on_delete=models.PROTECT)
    researcher = models.ForeignKey(User, on_delete=models.CASCADE)
    start_date = models.DateTimeField()
    end_date = models.DateTimeField(null=True, blank=True)
    status = models.CharField(max_length=20, choices=STATUS_CHOICES)
    results = models.TextField(blank=True)
    notes = models.TextField(blank=True)

class Measurement(models.Model):
    sample = models.ForeignKey(Sample, on_delete=models.CASCADE)
    equipment = models.ForeignKey(Equipment, on_delete=models.CASCADE)
    measured_by = models.ForeignKey(User, on_delete=models.CASCADE)
    measurement_date = models.DateTimeField()
    value = models.FloatField()
    unit = models.CharField(max_length=20)
    notes = models.TextField(blank=True)

where BioSample is similar toSample`.

Claude thinks that:

Compound (chemical/drug database) TreatmentTarget (molecular targets) GeneticTreatment (genetic modifications) CombinationTreatment (treatment protocols)

go beyond the scope of what the name wetlab implies.

The schema appears to be a broader "biological research management system" rather than just wetlab management. It encompasses:

Lab operations Molecular biology Treatment protocols Sample tracking Biological annotations

I asked Claude for names that would encompass everything:

sunnyosun commented 14 hours ago

I think a lot of the suggested tables are already in EFO.

I agree Compound shouldn't be here, which we discussed many times before that it should belong to a chemistry schema. It's here just for simplicity right now.

I'm not sure biolab is better than wetlab, and why GeneticTreatment goes beyond wetlab. biolab can certainly include dry lab. 🤔