@@ -97,13 +97,13 @@ impl Default for GraphBuildConfig {
9797 // Filtering options
9898 no_filter : false ,
9999 num_mappings : "1:1" . to_string ( ) ,
100- scaffold_jump : 50_000 , // 50kb default scaffold gap
101- scaffold_mass : 10_000 , // 10kb minimum scaffold length
102- scaffold_filter : "1:1" . to_string ( ) , // 1:1 scaffold filtering (now fixed in sweepga 608547a)
100+ scaffold_jump : 50_000 , // 50kb default scaffold gap
101+ scaffold_mass : 10_000 , // 10kb minimum scaffold length
102+ scaffold_filter : "1:1" . to_string ( ) , // 1:1 scaffold filtering (now fixed in sweepga 608547a)
103103 overlap : 0.95 ,
104104 min_identity : 0.0 ,
105- scaffold_dist : 0 , // No deviation limit by default
106- min_mapping_length : 0 , // No minimum mapping length by default
105+ scaffold_dist : 0 , // No deviation limit by default
106+ min_mapping_length : 0 , // No minimum mapping length by default
107107 }
108108 }
109109}
@@ -119,8 +119,9 @@ fn count_sequences_and_genomes_in_fasta(fasta_paths: &[String]) -> io::Result<(u
119119 for path in fasta_paths {
120120 let file = File :: open ( path) ?;
121121 // Use niffler to auto-detect compression
122- let ( reader, _format) = niffler:: get_reader ( Box :: new ( file) )
123- . map_err ( |e| io:: Error :: other ( format ! ( "Failed to open reader for '{}': {}" , path, e) ) ) ?;
122+ let ( reader, _format) = niffler:: get_reader ( Box :: new ( file) ) . map_err ( |e| {
123+ io:: Error :: other ( format ! ( "Failed to open reader for '{}': {}" , path, e) )
124+ } ) ?;
124125 let reader = BufReader :: new ( reader) ;
125126
126127 for line in reader. lines ( ) {
@@ -231,10 +232,7 @@ pub fn build_graph<W: Write>(
231232 // Also configure seqwish's internal temp file handling
232233 seqwish:: tempfile:: set_dir ( temp_dir) ;
233234 if config. show_progress {
234- info ! (
235- "[graph::temp] Using temp directory: {}" ,
236- temp_dir
237- ) ;
235+ info ! ( "[graph::temp] Using temp directory: {}" , temp_dir) ;
238236 }
239237 }
240238
@@ -266,16 +264,15 @@ pub fn build_graph<W: Write>(
266264 // 2) Create combined FASTA for alignment
267265 // sweepga's FastGA needs a single combined FASTA file for all-vs-all alignment
268266 // FastGA requires .fa extension to recognize the file format
269- let combined_fasta = tempfile:: Builder :: new ( )
270- . suffix ( ".fa" )
271- . tempfile ( ) ?;
267+ let combined_fasta = tempfile:: Builder :: new ( ) . suffix ( ".fa" ) . tempfile ( ) ?;
272268 {
273269 let mut writer = BufWriter :: new ( & combined_fasta) ;
274270 for path in fasta_files {
275271 let file = File :: open ( path) ?;
276272 // Use niffler to auto-detect compression
277- let ( reader, _format) = niffler:: get_reader ( Box :: new ( file) )
278- . map_err ( |e| io:: Error :: other ( format ! ( "Failed to open reader for '{}': {}" , path, e) ) ) ?;
273+ let ( reader, _format) = niffler:: get_reader ( Box :: new ( file) ) . map_err ( |e| {
274+ io:: Error :: other ( format ! ( "Failed to open reader for '{}': {}" , path, e) )
275+ } ) ?;
279276 let reader = BufReader :: new ( reader) ;
280277 for line in reader. lines ( ) {
281278 let line: String = line?;
@@ -302,9 +299,7 @@ pub fn build_graph<W: Write>(
302299 input_paf
303300 ) ;
304301 }
305- let paf_temp = tempfile:: Builder :: new ( )
306- . suffix ( ".paf" )
307- . tempfile ( ) ?;
302+ let paf_temp = tempfile:: Builder :: new ( ) . suffix ( ".paf" ) . tempfile ( ) ?;
308303 std:: fs:: copy ( input_paf, paf_temp. path ( ) ) ?;
309304 paf_temp
310305 } else {
@@ -606,8 +601,12 @@ pub fn build_graph<W: Write>(
606601 ) ?;
607602 }
608603
609- let gfa_string = String :: from_utf8 ( gfa_buffer)
610- . map_err ( |e| io:: Error :: new ( io:: ErrorKind :: InvalidData , format ! ( "Invalid UTF-8 in GFA: {}" , e) ) ) ?;
604+ let gfa_string = String :: from_utf8 ( gfa_buffer) . map_err ( |e| {
605+ io:: Error :: new (
606+ io:: ErrorKind :: InvalidData ,
607+ format ! ( "Invalid UTF-8 in GFA: {}" , e) ,
608+ )
609+ } ) ?;
611610
612611 // 10) Sort GFA using gfasort's Ygs pipeline (path-guided SGD + grooming + topological sort)
613612 if config. show_progress {
0 commit comments