Updated parsers and chart constructors.
This commit is contained in:
@@ -105,6 +105,9 @@ class Control(Base):
|
||||
for key in data[genus]:
|
||||
_dict[key] = data[genus][key]
|
||||
output.append(_dict)
|
||||
# Have to triage kraken data to keep program from getting overwhelmed
|
||||
if "kraken" in mode:
|
||||
output = sorted(output, key=lambda d: d[f"{mode}_count"], reverse=True)[:49]
|
||||
return output
|
||||
|
||||
def create_dummy_data(self, mode:str) -> dict:
|
||||
|
||||
@@ -25,8 +25,8 @@ class KitType(Base):
|
||||
submissions = relationship("BasicSubmission", back_populates="extraction_kit") #: submissions this kit was used for
|
||||
used_for = Column(JSON) #: list of names of sample types this kit can process
|
||||
cost_per_run = Column(FLOAT(2)) #: dollar amount for each full run of this kit NOTE: depreciated, use the constant and mutable costs instead
|
||||
mutable_cost = Column(FLOAT(2)) #: dollar amount that can change with number of columns (reagents, tips, etc)
|
||||
constant_cost = Column(FLOAT(2)) #: dollar amount that will remain constant (plates, man hours, etc)
|
||||
mutable_cost = Column(FLOAT(2)) #: dollar amount per plate that can change with number of columns (reagents, tips, etc)
|
||||
constant_cost = Column(FLOAT(2)) #: dollar amount per plate that will remain constant (plates, man hours, etc)
|
||||
reagent_types = relationship("ReagentType", back_populates="kits", uselist=True, secondary=reagenttypes_kittypes) #: reagent types this kit contains
|
||||
reagent_types_id = Column(INTEGER, ForeignKey("_reagent_types.id", ondelete='SET NULL', use_alter=True, name="fk_KT_reagentstype_id")) #: joined reagent type id
|
||||
|
||||
@@ -110,4 +110,16 @@ class Reagent(Base):
|
||||
"type": type,
|
||||
"lot": self.lot,
|
||||
"expiry": place_holder.strftime("%Y-%m-%d")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# class Discounts(Base):
|
||||
# """
|
||||
# Relationship table for client labs for certain kits.
|
||||
# """
|
||||
# __tablename__ = "_discounts"
|
||||
|
||||
# id = Column(INTEGER, primary_key=True) #: primary key
|
||||
# kit = relationship("KitType") #: joined parent reagent type
|
||||
# kit_id = Column(INTEGER, ForeignKey("_kits.id", ondelete='SET NULL', name="fk_kit_type_id"))
|
||||
# client = relationship("Organization")
|
||||
Reference in New Issue
Block a user