Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
kedhammar committed Dec 1, 2023
1 parent 29b34b5 commit a300835
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 22 deletions.
4 changes: 1 addition & 3 deletions scripts/comments_to_running_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,7 @@ def main(lims, args):
comments = pro.udf["Comments"].encode("utf-8")
note = "Comment from {} ({}) : \n{}".format(
pro.type.name,
"[LIMS]({}/clarity/work-details/{})".format(
BASEURI, pro.id.split("-")[1]
),
"[LIMS]({}/clarity/work-details/{})".format(BASEURI, pro.id.split("-")[1]),
comments,
)
noteobj["note"] = note
Expand Down
6 changes: 3 additions & 3 deletions scripts/copy_reference_genome.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ def check_udf_is_defined(projects, udf):
filtered_projects.append(project)
else:
logging.warning(
(
"Found project with id {} with {} " "undefined/blank, exiting"
).format(project.id, udf)
("Found project with id {} with {} " "undefined/blank, exiting").format(
project.id, udf
)
)
incorrect_projects.append(project)
return filtered_projects, incorrect_projects
Expand Down
6 changes: 2 additions & 4 deletions scripts/molar_concentration.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ def check_udf_is_defined(artifacts, udf):
else:
logging.warning(
(
"Found artifact for sample {} with {} "
"undefined/blank, skipping"
"Found artifact for sample {} with {} " "undefined/blank, skipping"
).format(artifact.samples[0].name, udf)
)
incorrect_artifacts.append(artifact)
Expand All @@ -71,8 +70,7 @@ def check_udf_has_value(artifacts, udf, value):
incorrect_artifacts.append(artifact)
logging.warning(
(
"Filtered out artifact for sample: {}"
", due to undefined/blank {}"
"Filtered out artifact for sample: {}" ", due to undefined/blank {}"
).format(artifact.samples[0].name, udf)
)

Expand Down
6 changes: 2 additions & 4 deletions scripts/qc_amount_calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ def check_udf_is_defined(artifacts, udf):
else:
logging.warning(
(
"Found artifact for sample {} with {} "
"undefined/blank, skipping"
"Found artifact for sample {} with {} " "undefined/blank, skipping"
).format(artifact.samples[0].name, udf)
)
incorrect_artifacts.append(artifact)
Expand All @@ -132,8 +131,7 @@ def check_udf_has_value(artifacts, udf, value):
incorrect_artifacts.append(artifact)
logging.warning(
(
"Filtered out artifact for sample: {}"
", due to undefined/blank {}"
"Filtered out artifact for sample: {}" ", due to undefined/blank {}"
).format(artifact.samples[0].name, udf)
)

Expand Down
6 changes: 3 additions & 3 deletions scripts/quantit_set_QC.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ def __init__(self, process):
self.result_files = process.result_files()
self.udfs = dict(list(process.udf.items()))
self.required_udfs = {
"Allowed %CV of duplicates",
"Saturation threshold of fluorescence intensity",
"Minimum required concentration (ng/ul)",
"Allowed %CV of duplicates",
"Saturation threshold of fluorescence intensity",
"Minimum required concentration (ng/ul)",
}
self.abstract = []
self.missing_udfs = []
Expand Down
11 changes: 6 additions & 5 deletions scripts/undemultiplexed_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ def _get_file_path(self, cont_name):
path_id = cont_name
try:
self.file_path = glob.glob(
"/srv/ngi-nas-ns/{}/*{}/Unaligned/" "Basecall_Stats_*/".format(
data_folder, path_id
)
"/srv/ngi-nas-ns/{}/*{}/Unaligned/" "Basecall_Stats_*/".format(
data_folder, path_id
)
)[0]
except:
sys.exit("Failed to get file path")
Expand Down Expand Up @@ -253,8 +253,9 @@ def run_QC(self):
if self.high_lane_yield:
self.high_lane_yield = ", ".join(list(set(self.high_lane_yield)))
warn = (
"{} High total yield of unexpected index on lane(s): "
"{}.".format(warn, self.high_lane_yield)
"{} High total yield of unexpected index on lane(s): " "{}.".format(
warn, self.high_lane_yield
)
)
warn = warn + "Please check the Metrics file!"
self.abstract.insert(0, warn)
Expand Down

0 comments on commit a300835

Please sign in to comment.