Skip to content

Commit

Permalink
Fix lookup of proteins (should lookup without curie prefix)
Browse files Browse the repository at this point in the history
  • Loading branch information
justaddcoffee committed May 28, 2020
1 parent d20afe9 commit 26900fa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions kg_covid_19/transform_utils/string_ppi/string_ppi.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ def run(self, data_file: Optional[str] = None) -> None:
for protein_name in ('protein1', 'protein2'):
protein = get_item_by_priority(items_dict, [protein_name])
protein = '.'.join(protein.split('.')[1:])
protein = f"ENSEMBL:{protein}"
proteins.append(protein)
if protein in self.protein_gene_map:
gene = self.protein_gene_map[protein]
Expand All @@ -182,7 +181,7 @@ def run(self, data_file: Optional[str] = None) -> None:
data=[
ensemble_gene,
"biolink:has_gene_product",
protein,
f"ENSEMBL:{protein}",
"RO:0002205",
"NCBI",
] + extra_header
Expand All @@ -202,7 +201,7 @@ def run(self, data_file: Optional[str] = None) -> None:
write_node_edge_item(
fh=edge,
header=self.edge_header,
data=[proteins[0], edge_label, proteins[1],
data=[f"ENSEMBL:{proteins[0]}", edge_label, f"ENSEMBL:{proteins[1]}",
relation, "STRING", items_dict['combined_score']] + [
items_dict.get(header, "")
for header in edge_additional_headers
Expand Down

0 comments on commit 26900fa

Please sign in to comment.