99//! - Applies sweepga filtering logic
1010//! - Writes filtered .1aln using fastga-rs AlnWriter
1111
12+ // TODO: Remove this once the module is integrated into the main code path
13+ #![ allow( dead_code) ]
14+
1215use anyhow:: { Context , Result } ;
1316use onecode:: { OneFile , OneSchema } ;
1417use std:: path:: Path ;
@@ -92,7 +95,7 @@ D Z 1 6 STRING
9295 let schema = OneSchema :: from_text ( schema_text) . context ( "Failed to create .1aln schema" ) ?;
9396
9497 let mut file = OneFile :: open_read ( path_str, Some ( & schema) , Some ( "aln" ) , 1 )
95- . context ( format ! ( "Failed to open .1aln file: {}" , path_str ) ) ?;
98+ . context ( format ! ( "Failed to open .1aln file: {path_str}" ) ) ?;
9699
97100 // Read GDB skeleton to build contig→scaffold mapping
98101 let ( contigs, scaffolds) = Self :: read_gdb_skeleton ( & mut file) ?;
@@ -290,8 +293,7 @@ D Z 1 6 STRING
290293 } else {
291294 // DEBUG: This shouldn't happen!
292295 eprintln ! (
293- "[AlnReader] WARNING: No X, M, or D values for alignment at {}..{}" ,
294- query_start, query_end
296+ "[AlnReader] WARNING: No X, M, or D values for alignment at {query_start}..{query_end}"
295297 ) ;
296298 0.0
297299 } ;
@@ -319,7 +321,7 @@ D Z 1 6 STRING
319321 let name = self
320322 . file
321323 . get_sequence_name ( query_id)
322- . unwrap_or_else ( || format ! ( "{}" , query_id ) ) ;
324+ . unwrap_or_else ( || format ! ( "{query_id}" ) ) ;
323325 ( query_id, name, query_len, query_start, query_end)
324326 } ;
325327
@@ -344,7 +346,7 @@ D Z 1 6 STRING
344346 let name = self
345347 . file
346348 . get_sequence_name ( target_id)
347- . unwrap_or_else ( || format ! ( "{}" , target_id ) ) ;
349+ . unwrap_or_else ( || format ! ( "{target_id}" ) ) ;
348350 ( target_id, name, target_len, target_start, target_end)
349351 } ;
350352
@@ -443,9 +445,9 @@ pub fn filter_1aln_file_to_paf<P1: AsRef<Path>, P2: AsRef<Path>>(
443445 for ( i, aln) in alignments. iter ( ) . enumerate ( ) {
444446 let paf_line = aln. to_paf_line ( ) ;
445447 if i < 3 {
446- eprintln ! ( "[filter_1aln] Sample PAF line: {}" , paf_line ) ;
448+ eprintln ! ( "[filter_1aln] Sample PAF line: {paf_line}" ) ;
447449 }
448- writeln ! ( writer, "{}" , paf_line ) ?;
450+ writeln ! ( writer, "{paf_line}" ) ?;
449451 }
450452 writer. flush ( ) ?;
451453 }
0 commit comments