Skip to content

Commit

Permalink
escape ancestor iris in ols ingest
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesamcl committed Aug 12, 2024
1 parent bf96829 commit 680cadd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 01_ingest/grebi_ingest_ols/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,9 @@ fn read_entities(json: &mut JsonStreamReader<BufReader<StdinLock<'_>>>, output_n
if obj.contains_key("ols:directAncestor") {
for ancestor in get_string_values(obj.get("ols:directAncestor").unwrap()) {
if type_superclasses.contains(ancestor) {
output_nodes.write_all(r#","#.as_bytes()).unwrap();
output_nodes.write_all(ancestor.to_string().as_bytes()).unwrap();
output_nodes.write_all(r#",""#.as_bytes()).unwrap();
write_escaped_string(&ancestor.as_bytes(), output_nodes);
output_nodes.write_all(r#"""#.as_bytes()).unwrap();
}
}
}
Expand Down

0 comments on commit 680cadd

Please sign in to comment.