Skip to content

Commit

Permalink
ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
chuan-wang committed Sep 12, 2024
1 parent ae38b73 commit f067cfb
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions scripts/aviti_run_parameter_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,18 +162,24 @@ def set_run_stats(process, run_dir):
for art in process.all_outputs():
if "Lane" in art.name:
lane_nbr = int(art.name.split(" ")[1])
lane_stats = next(d for d in run_stats["LaneStats"] if d["Lane"] == lane_nbr)
lane_stats = next(
d for d in run_stats["LaneStats"] if d["Lane"] == lane_nbr
)
for read in lane_stats["Reads"]:
read_key = read["Read"]
art.udf[f"Reads PF (M) {read_key}"] = lane_stats["PFCount"] / 1000000
art.udf[f"%PF {read_key}"] = lane_stats["PercentPF"]
art.udf[f"Yield PF (Gb) {read_key}"] = (
lane_stats["TotalYield"] / 1000000000
)
art.udf[f"Yield PF (Gb) {read_key}"] = lane_stats["TotalYield"] / 1000000000
art.udf[f"% Aligned {read_key}"] = read["PhiXAlignmentRate"]
art.udf[f"% Bases >=Q30 {read_key}"] = calculate_mean(read["Cycles"], "PercentQ30")
art.udf[f"% Bases >=Q40 {read_key}"] = calculate_mean(read["Cycles"], "PercentQ40")
art.udf[f"Avg Q Score {read_key}"] = calculate_mean(read["Cycles"], "AverageQScore")
art.udf[f"% Bases >=Q30 {read_key}"] = calculate_mean(
read["Cycles"], "PercentQ30"
)
art.udf[f"% Bases >=Q40 {read_key}"] = calculate_mean(
read["Cycles"], "PercentQ40"
)
art.udf[f"Avg Q Score {read_key}"] = calculate_mean(
read["Cycles"], "AverageQScore"
)
art.udf[f"% Error Rate {read_key}"] = calculate_mean(
read["Cycles"], "PercentPhixErrorRate"
)
Expand Down

0 comments on commit f067cfb

Please sign in to comment.