Improved scraping of gel info for Artic.

This commit is contained in:
lwark
2024-08-29 11:07:54 -05:00
parent 2afb57a6cc
commit 482bfa5728
7 changed files with 101 additions and 22 deletions

View File

@@ -75,7 +75,7 @@ class RSLNamer(object):
try:
submission_type = m.lastgroup
except AttributeError as e:
logger.critical("No RSL plate number found or submission type found!")
logger.critical(f"No RSL plate number found or submission type found!: {e}")
case _:
submission_type = None
try:
@@ -180,6 +180,14 @@ class RSLNamer(object):
template = environment.from_string(template)
return template.render(**kwargs)
def calculate_repeat(self):
regex = re.compile(r"-\d(?P<repeat>R\d)")
m = regex.search(self.parsed_name)
if m is not None:
return m.group("repeat")
else:
return ""
from .pydant import PydSubmission, PydKit, PydContact, PydOrganization, PydSample, PydReagent, PydReagentRole, \
PydEquipment, PydEquipmentRole, PydTips