Skip to content

phraya filter CLI #85

@crashfrog

Description

@crashfrog

Parent

#58 (Phase 1 MVP: Evidence-Informed Alignment with Deferred Filtering)

What to build

Implement `phraya filter` CLI command in phraya-cli. Reads .phraya file, applies threshold filters, outputs VCF/TSV/filtered-phraya format. Supports chaining: filtered .phraya can be input to another filter invocation. Enables exploring different filter parameters without re-alignment.

Acceptance criteria

  • `phraya filter <input.phraya> [--min-coverage N] [--max-coverage N] [--min-mapq N] [--format vcf|tsv|phraya]`
  • Read .phraya file
  • Apply configured filters using FilterBuilder
  • Output to stdout in specified format (default: VCF)
  • Format=phraya: write filtered .phraya file (subset of observations)
  • Support chaining: `phraya filter --min-coverage 10 | phraya filter --min-mapq 30` (when format=phraya)
  • Log filter statistics to stderr (e.g., "Filtered 1000 → 850 observations")
  • Return non-zero exit code on error
  • Integration test: align → filter --min-coverage 10 → verify VCF output
  • Integration test: align → filter → filter (chain) → verify TSV output
  • Integration test: filter --format phraya → verify output is valid .phraya file

Blocked by

#81 (filter library), #83 (VCF formatter), #84 (TSV formatter)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    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