Esempio n. 1
0
 def get_veracis_id(self):
     """Return the veracis_id of the sample this aliquot originated from.
     """
     parent = self.aq_parent
     while not ISample.providedBy(parent):
         parent = self.aq_parent
     return parent.veracis_id
Esempio n. 2
0
def _get_parent_sample(context):
    """Get the sample associated with the current context.
    """
    parent = context
    while not ISample.providedBy(parent):
        parent = parent.aq_parent
    return parent
Esempio n. 3
0
 def veracis_id(self):
     """Return the veracis_id of the sample this aliquot originated from.
     """
     parent = self.aq_parent
     while not ISample.providedBy(parent):
         parent = self.aq_parent
     return parent.veracis_id
 def get_UnivarFigure(self, aliquot, fignr):
     sample = aliquot.aq_parent
     while not ISample.providedBy(sample):
         sample = sample.aq_parent
     fn = join(self.path, 'Out', 'Figures', '%s_UnivarFigure_%s.png' %
               (sample.id, fignr))
     if exists(fn):
         return fn
 def get_ReportFigure(self, aliquot):
     sample = aliquot.aq_parent
     while not ISample.providedBy(sample):
         sample = sample.aq_parent
     fn = join(self.path, 'Out', 'Figures',
               '%s_ReportFigure.png' % sample.id)
     if exists(fn):
         return fn
 def get_sample_from_aliquot(self, aliquot):
     parent = aliquot.aq_parent
     while not (ISample.providedBy(parent)):
         parent = parent.aq_parent
         if ILIMSRoot.providedBy(parent):
             msg = "Cannot find ISample parent of Aliquot: %s" % aliquot
             raise RuntimeError(msg)
     return parent
Esempio n. 7
0
 def get_parent_sample_from_aliquot(self, aliquot):
     parent = aliquot.aq_parent
     while not ISample.providedBy(parent):
         parent = parent.aq_parent
     return parent
Esempio n. 8
0
 def get_parent_sample_from_aliquot(self, aliquot):
     parent = aliquot.aq_parent
     while not ISample.providedBy(parent):
         parent = parent.aq_parent
     return parent