Skip to content

Correctness bugs in benchmark/query measurement path #1

Description

@riasc

From a Python audit. Four correctness bugs, all in the benchmarking measurement path.

  • Scaffold filter never matches[chr for chr in allchroms if "SCF" in allchroms] tests membership in the list, not the name. Should be if "SCF" in chr. Scaffold names collide / miscount. segmeter/simulator.py:68
  • bedops arbitrary-pairs branch redirects into a file object, not its path> {reffiles['ref-srt']} stringifies the NamedTemporaryFile object; use .name (and reuse .name in the following bedops call). Writes to a garbage path. segmeter/calls.py:171-175
  • if rss_value: treats the not-found sentinel -1 as validget_rss_from_stderr returns -1 on miss, which is truthy, so mem becomes a small negative instead of 0. Use if rss_value > 0:. segmeter/calls.py:35
  • Untimed / unchecked post-process subprocess — the bedtk dedup subprocess.run(call, shell=True) bypasses tool_call timing and ignores the exit code. Route through tool_call or at least pass check=True. segmeter/calls.py:245, segmeter/calls.py:263

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions