Skip to content

Commit

Permalink
Fix on specific line terminaisons
Browse files Browse the repository at this point in the history
  • Loading branch information
dubssieg committed Oct 21, 2024
1 parent ce5075d commit a55a2d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index_gfa_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub fn index_gfa(
if let Some(first_char) = line.chars().next() {
if first_char == 'S' {
// In the case of an S-line, we store the node name and the sequence length
let node_name = String::from(columns[1].trim());
let node_name = String::from(columns[1]);
let sequence_length = columns[2].trim().len();
seq_lengths.insert(node_name, sequence_length);
}
Expand All @@ -45,6 +45,7 @@ pub fn index_gfa(
// let path_length = columns[2].split(',').count();

let node_list: Vec<String> = columns[2]
.trim()
.split(',')
.map(|s| s[..s.len() - 1].to_string())
.collect();
Expand Down

0 comments on commit a55a2d5

Please sign in to comment.