aboutsummaryrefslogtreecommitdiff
path: root/quality_control
diff options
context:
space:
mode:
Diffstat (limited to 'quality_control')
-rw-r--r--quality_control/average.py2
-rw-r--r--quality_control/parsing.py3
-rw-r--r--quality_control/standard_error.py2
3 files changed, 3 insertions, 4 deletions
diff --git a/quality_control/average.py b/quality_control/average.py
index 3261e1c..2907b9c 100644
--- a/quality_control/average.py
+++ b/quality_control/average.py
@@ -8,6 +8,6 @@ def valid_value(val):
if re.search(r"^[0-9]+\.[0-9]{3}$", val):
return float(val)
raise InvalidCellValue(
- f"Invalid value '{val}'.\n"
+ f"Invalid value '{val}'. "
"Expected string representing a number with exactly three decimal "
"places.")
diff --git a/quality_control/parsing.py b/quality_control/parsing.py
index a4edb0f..9fe88f1 100644
--- a/quality_control/parsing.py
+++ b/quality_control/parsing.py
@@ -62,7 +62,7 @@ def parse_file(filepath: str, filetype: FileType, strains: list):
with open(filepath, encoding="utf-8") as input_file:
for line_number, line in enumerate(input_file):
if line_number == 0:
- yield __parse_header(line, strains)
+ yield __parse_header(line, strains), seek_pos + len(line)
seek_pos = seek_pos + len(line)
continue
@@ -83,7 +83,6 @@ def parse_file(filepath: str, filetype: FileType, strains: list):
def parse_errors(filepath: str, filetype: FileType, strains: list,
seek_pos: int = 0) -> Generator:
"""Retrieve ALL the parse errors"""
- print(f"seek_pos: {seek_pos}, {type(seek_pos)}")
assert seek_pos >= 0, "The seek position must be at least zero (0)"
def __error_type(error):
diff --git a/quality_control/standard_error.py b/quality_control/standard_error.py
index 805c30e..f1e33c4 100644
--- a/quality_control/standard_error.py
+++ b/quality_control/standard_error.py
@@ -8,6 +8,6 @@ def valid_value(val):
if re.search(r"^[0-9]+\.[0-9]{6,}$", val):
return float(val)
raise InvalidCellValue(
- f"Invalid value '{val}'.\n"
+ f"Invalid value '{val}'. "
"Expected string representing a number with at least six decimal "
"places.")