Skip to content

Commit

Permalink
Remove test for longest reads
Browse files Browse the repository at this point in the history
  • Loading branch information
lvreynoso committed Jul 5, 2024
1 parent 29f17de commit 01e106f
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions workflows/short-read-mngs/test/test_short_read_mngs.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,4 @@ def test_bench3_viral(short_read_mngs_bench3_viral_outputs):
if filename.endswith(".fasta"):
assert is_valid_fasta(filename), f"{filename} is not a valid fasta file"

longest_reads = outp["outputs"]["czid_short_read_mngs.experimental.longest_reads"]
basenames = [os.path.basename(fn) for fn in longest_reads]
assert basenames, basenames
assert all(re.match(r"n[rt]\.[a-z]+\.-?[0-9]+\.longest_5_reads.fasta", fn) for fn in basenames), basenames
prefixes = set(fn[:2] for fn in basenames)
assert "nt" in prefixes, f"'nt' not found in {prefixes}"
assert "nr" in prefixes, f"'nr' not found in {prefixes}"

for fn in longest_reads:
with open(fn) as f:
lines = list(f)
assert 2 <= len(lines) <= 10, len(lines)
prev = None
for i, read in enumerate(lines):
if i % 2 == 0:
assert read[0] == ">", read
continue
assert prev is None or len(read) <= prev, (len(read), prev)
prev = len(read)
assert all(c in "ACTGUN" for c in read.strip()), read
# TODO: further correctness tests

0 comments on commit 01e106f

Please sign in to comment.