Skip to content

Commit

Permalink
maintest for new build
Browse files Browse the repository at this point in the history
  • Loading branch information
tibvdm committed Apr 23, 2024
1 parent 114a2aa commit 3453508
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions fa-compression/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,8 @@ pub fn main() {
let line = line.unwrap();
let splitted_line = line.split("\t").collect::<Vec<&str>>();

let ec = splitted_line[7].replace("n", "");
let go = splitted_line[8];
let interpro = splitted_line[9];

let mut string = String::new();
if !ec.is_empty() {
let ec_corrected = ec.split(';').map(|s| format!("EC:{}", s)).collect::<Vec<String>>().join(";");
string.push_str(&ec_corrected);
string.push(';');
}
if !go.is_empty() {
string.push_str(go);
string.push(';');
}
if !interpro.is_empty() {
let interpro_corrected = interpro.split(';').map(|s| format!("IPR:{}", s)).collect::<Vec<String>>().join(";");
string.push_str(&interpro_corrected);
string.push(';');
}
if !string.is_empty() {
string.pop();
}

//eprintln!("{}", string);

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

0 comments on commit 3453508

Please sign in to comment.