Skip to content

Commit

Permalink
hack some more
Browse files Browse the repository at this point in the history
  • Loading branch information
tibvdm committed Apr 15, 2024
1 parent 88a3db0 commit b991df7
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion fa-compression/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,27 @@ pub fn main() {
let line = line.unwrap();
let splitted_line = line.split("\t").collect::<Vec<&str>>();

let ec = splitted_line[7];
let go = splitted_line[8];
let interpro = splitted_line[9];

let mut string = String::new();
if !ec.is_empty() {
string.push_str(ec);
string.push(';');
}
if !go.is_empty() {
string.push_str(go);
string.push(';');
}
if !interpro.is_empty() {
string.push_str(interpro);
string.push(';');
}
string.pop();

writer.write_all(format!("{}\t{}\t{}\t", splitted_line[1], splitted_line[3], splitted_line[6]).as_bytes()).unwrap();
writer.write_all(encode(splitted_line[7]).as_slice()).unwrap();
writer.write_all(encode(&string).as_slice()).unwrap();
writer.write_all(b"\n").unwrap();
}
}

0 comments on commit b991df7

Please sign in to comment.