-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For re-demux: keep PDC archive date if exists #433
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #433 +/- ##
==========================================
- Coverage 26.63% 26.57% -0.07%
==========================================
Files 28 28
Lines 3949 3959 +10
==========================================
Hits 1052 1052
- Misses 2897 2907 +10 ☔ View full report in Codecov by Sentry. |
taca/analysis/analysis.py
Outdated
@@ -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 = run.split("_") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work? run is a run object and not a string right?
taca/analysis/analysis.py
Outdated
else: | ||
run_date = run_vals[0] | ||
run_fc = f"{run_date}_{run_vals[-1]}" | ||
fc_names = {e.key: e.id for e in db.view("names/name", reduce=False)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would fetch all flowcell IDs in the database. I think you can fetch the document you want directly with the key in just one call. I would have to look up the specific syntax though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I'm re-using the code here:
Line 258 in c08d3f3
def _log_pdc_statusdb(self, run): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc = db.view("names/name", reduce=False, include_docs=True)[run_fc].rows[0].doc
should do the trick, but one would need to wrap it in try except to catch the case when the flowcell is not present in the view. Alternatively one could have multiple lines and check that the rows are not empty after fetching.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.