@@ -140,6 +140,26 @@ def __init__(self, config):
140140 def get_db_doc (self , ddoc , view , run_id ):
141141 return None
142142
143+ def get_regex_pattern (self , run_family , run_type ):
144+ if run_family == "Illumina" :
145+ if run_type == "NovaSeqXPlus" :
146+ return r"^(?P<date>\d{8})_(?P<instrument>[A-Z0-9]+)_\d{4}_(?P<position>(A|B))(?P<flowcell_id>[A-Z0-9]+)$"
147+ elif run_type == "NextSeq" :
148+ return r"^(?P<date>\d{6})_(?P<instrument>[A-Z0-9]+)_\d{3}_(?P<position>(A|B))(?P<flowcell_id>[A-Z0-9]+)$"
149+ elif run_type == "MiSeq" :
150+ return r"^(?P<date>\d{6})_(?P<instrument>[A-Z0-9]+)_\d{4}_(?P<flowcell_id>[A-Z0-9\-]+)$"
151+ elif run_type == "MiSeqi100" :
152+ return r"^(?P<date>\d{8})_(?P<instrument>[A-Z0-9]+)_\d{4}_A(?P<flowcell_id>[A-Z0-9]{9}-SC3)$"
153+ elif run_family == "ONT" :
154+ if run_type == "PromethION" :
155+ return r"^(?P<date>\d{8})_(?P<time>\d{4})_(?P<position>[A-Z0-9]{2})_(?P<flowcell_id>P[A-Z0-9]+)_(?P<run_hash>[a-f0-9]{8})$"
156+ elif run_type == "MinION" :
157+ return r"^(?P<date>\d{8})_(?P<time>\d{4})_(?P<position>MN[A-Z0-9]+)_(?P<flowcell_id>[A-Z0-9]+)_(?P<run_hash>[a-f0-9]{8})$"
158+ elif run_family == "Element" :
159+ if run_type == "AVITI" :
160+ return r"^(?P<date>\d{8})_(?P<instrument>AV\d{6})_(?P<position>(A|B))(?P<flowcell_id>\d{10})$"
161+ return None
162+
143163 def update_db_doc (self , doc ):
144164 pass
145165
0 commit comments