Skip to content

Commit 32b2233

Browse files
authored
Merge pull request #499 from ssjunnebo/teton_backup_pdc
Allow backup of aviti teton runs to PDC
2 parents bd31f2b + ccccad2 commit 32b2233

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

VERSIONLOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# TACA Version Log
22

3+
##20251127.1
4+
5+
Enable archiving of Aviti Teton runs to PDC
6+
37
##20251121.1
48

59
Exclude pod5 from delivery by default

taca/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Main TACA module"""
22

3-
__version__ = "1.6.13"
3+
__version__ = "1.6.14"

taca/backup/backup.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def collect_runs(self, ext=None, filter_by_ext=False):
7272
re.match(filesystem.RUN_RE_ILLUMINA, run.name)
7373
or re.match(filesystem.RUN_RE_ONT, run.name)
7474
or re.match(filesystem.RUN_RE_ELEMENT, run.name)
75+
or re.match(filesystem.RUN_RE_TETON, run.name)
7576
):
7677
logger.error(f"Given run {self.run} did not match a FC pattern")
7778
raise SystemExit
@@ -95,6 +96,7 @@ def collect_runs(self, ext=None, filter_by_ext=False):
9596
re.match(filesystem.RUN_RE_ILLUMINA, item)
9697
or re.match(filesystem.RUN_RE_ONT, item)
9798
or re.match(filesystem.RUN_RE_ELEMENT, item)
99+
or re.match(filesystem.RUN_RE_TETON, item)
98100
) and item not in self.runs:
99101
run_type = self._get_run_type(item)
100102
archive_path = self.archive_dirs[run_type]
@@ -124,6 +126,7 @@ def avail_disk_space(self, path, run):
124126
re.match(filesystem.RUN_RE_ILLUMINA, run_dir)
125127
or re.match(filesystem.RUN_RE_ONT, run_dir)
126128
or re.match(filesystem.RUN_RE_ELEMENT, run_dir)
129+
or re.match(filesystem.RUN_RE_TETON, run_dir)
127130
):
128131
continue
129132
if not (
@@ -196,7 +199,9 @@ def _get_run_type(self, run):
196199
"^(\d{8})_(\d{4})_([1-3][A-H])_([0-9a-zA-Z]+)_([0-9a-zA-Z]+)$", run
197200
):
198201
run_type = "promethion"
199-
elif re.match(filesystem.RUN_RE_ELEMENT, run):
202+
elif re.match(filesystem.RUN_RE_ELEMENT, run) or re.match(
203+
filesystem.RUN_RE_TETON, run
204+
):
200205
run_type = "aviti"
201206
else:
202207
run_type = ""
@@ -276,7 +281,9 @@ def _clean_tmp_files(self, files):
276281

277282
def _log_pdc_statusdb(self, run):
278283
"""Log the time stamp in statusDB if a file is succussfully sent to PDC."""
279-
if re.match(filesystem.RUN_RE_ELEMENT, run):
284+
if re.match(filesystem.RUN_RE_ELEMENT, run) or re.match(
285+
filesystem.RUN_RE_TETON, run
286+
):
280287
try:
281288
element_db_connection = statusdb.ElementRunsConnection(
282289
self.couch_info, dbname="element_runs"

taca/utils/filesystem.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
RUN_RE_ILLUMINA = r"^\d{6,8}_[a-zA-Z\d\-]+_\d{2,}_[AB0][A-Z\d\-]+$"
88
RUN_RE_ONT = r"^(\d{8})_(\d{4})_([0-9a-zA-Z]+)_([0-9a-zA-Z]+)_([0-9a-zA-Z]+)$"
99
RUN_RE_ELEMENT = r"^\d{8}_AV\d{6}_[AB]\d{10}$"
10+
RUN_RE_TETON = r"^\d{8}_AV\d{6}_[AB]P\d{5}$"
1011

1112

1213
@contextlib.contextmanager

0 commit comments

Comments
 (0)