Skip to content

Commit

Permalink
Merge pull request #433 from chuan-wang/master
Browse files Browse the repository at this point in the history
For re-demux: keep PDC archive date if exists
  • Loading branch information
chuan-wang authored Sep 30, 2024
2 parents c08d3f3 + e90db05 commit ffc3bca
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions VERSIONLOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# TACA Version Log

## 20240927.1

For re-demux: keep PDC archive date if exists

## 20240816.1

Update command used to run Anglerfish.
Expand Down
13 changes: 13 additions & 0 deletions taca/analysis/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,19 @@ def _upload_to_statusdb(run):
parser.obj["DemultiplexConfig"] = {
"Setup": {"Software": run.CONFIG.get("bcl2fastq", {})}
}
# Keep PDC archive date if there is one already
run_vals = parser.obj["name"].split("_")
if len(run_vals[0]) == 8:
run_date = run_vals[0][2:]
else:
run_date = run_vals[0]
run_fc = f"{run_date}_{run_vals[-1]}"
db_rows = db.view("names/name", reduce=False, include_docs=True)[run_fc].rows
if db_rows:
doc = db_rows[0].doc
if doc.get("pdc_archived") and not parser.obj.get("pdc_archived"):
parser.obj["pdc_archived"] = doc.get("pdc_archived")

statusdb.update_doc(db, parser.obj, over_write_db_entry=True)


Expand Down

0 comments on commit ffc3bca

Please sign in to comment.