Skip to content

Commit 2958966

Browse files
Move fcid parsing outside of if statement for use in else block; add error printout if check_pool_errors() success is not True
1 parent caf7fe8 commit 2958966

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bin/qc_deliver.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,12 @@ def check_qc_and_deliver(path, summary_report_path):
121121
success = result.get("success")
122122
error = result.get("message")
123123

124+
summary_report_filename = os.path.basename(summary_report_path)
125+
fcid, lane_num = summary_report_filename.split("_")[:2]
126+
124127
if success:
125128
print("qc_delivery.py: Passed QC")
126-
summary_report_filename = os.path.basename(summary_report_path)
127-
fcid, lane_num = summary_report_filename.split("_")[:2]
129+
128130
run = get_run_info(fcid)
129131
lanes = get_lanes(run["id"])["lanes"]
130132

@@ -172,6 +174,8 @@ def check_qc_and_deliver(path, summary_report_path):
172174
print("run status updated in tuboweb")
173175

174176
else:
177+
print("SUCCESS: ", success)
178+
print("ERROR: ", error)
175179
message = error + "\nhttp://core-fastqc.bio.nyu.edu/" + fcid
176180
send_email(["mk5636@nyu.edu", "na2808@nyu.edu"], "ERROR For {}".format(fcid), message)
177181

0 commit comments

Comments
 (0)