Commit 0af51f7
committed
Implement unified filter for format-agnostic .1aln and PAF filtering
This implementation enables direct .1aln → .1aln filtering without PAF
conversion, while reusing the exact same filtering logic for both formats.
Key changes:
- NEW src/unified_filter.rs: Format-agnostic filtering module
- extract_1aln_metadata(): Read .1aln into RecordMeta using fastga-rs
- write_1aln_filtered(): Write filtered records preserving .1aln format
- filter_file(): Main entry point handling both .1aln and PAF inputs
- MODIFIED src/paf_filter.rs:
- Made RecordMeta struct and fields public (reused by unified filter)
- Made apply_filters() method public (shared filtering logic)
- MODIFIED src/aln_filter.rs:
- Updated to use fastga-rs native reader instead of onecode
- Simplified architecture leveraging fastga-rs sequence name extraction
- MODIFIED src/fastga_integration.rs:
- Added align_to_temp_1aln() for direct .1aln output from FastGA
- Enables FASTA → .1aln workflow without PAF conversion
- MODIFIED src/lib.rs, src/main.rs:
- Added unified_filter module exports
- Integration into main workflow pending
Benefits:
- No format conversion for .1aln → .1aln workflow
- Same filtering logic for both formats (no code duplication)
- Format-preserving output by default
- Efficient sequence name extraction using fastga-rs1 parent d59dd62 commit 0af51f7
8 files changed
Lines changed: 832 additions & 423 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
0 commit comments