Skip to content

Python bindings: 3 UX bugs (path expansion, duplicate FASTA, partial VCF variant) #132

Description

@bobvh

Bug 1: Path expansion — ~ not expanded

Repository("~/my_repo") fails silently on macOS. Repository("/Users/bvh/my_repo") works.

~ should be expanded to the user's home directory. Likely affects any binding method that accepts a path argument.

Expected: ~/my_repo resolves the same as the absolute path.
Actual: Silent failure.


Bug 2: Importing the same FASTA file twice raises RuntimeError

RuntimeError: '<filename>': contents already exist

Notebook cells are routinely re-run. Importing the same sequence to the same sample a second time should be idempotent (no-op or a warning), not a hard error.

Expected: Second import of identical FASTA is a no-op or emits a warning.
Actual: RuntimeError is raised, breaking notebook re-runs.


Bug 3: update_with_vcf — partial out-of-bounds variant raises RuntimeError with unclear state

When a variant in the VCF partially falls outside the reference region, a RuntimeError is raised. It is not clear which variants made it into the database before the error and which did not.

Expected: Out-of-bounds variants are skipped with a warning message. A strict=True option (default False) should be available to raise an error instead and ensure no partial writes occur.
Actual: RuntimeError with no indication of DB state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions