Skip to content

Commit cb71eac

Browse files
committed
neighborhood field removed from string-relations endpoint
1 parent 543b352 commit cb71eac

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

README.md

-3
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,6 @@ For a given gene, this service gets from the String database a list of genes and
696696
- Content: The response you get is a list of relations containing the targeted gene. More information about each field in the response and how the different scores are calculated can be found in the [scientific publication](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9825434/) of the STRING database. Unless otherwise indicated in this documentation, values for fields are scores in the range 1-1000.
697697
- `gene_1`: Gene 1 in the bidirectional relationship.
698698
- `gene_2`: Gene 2 in the bidirectional relationship.
699-
- `neighborhood`: It will always come with a NULL value since STRING does not calculate this data for Eukaryotic organisms.
700699
- `neighborhood_transferred`: score reflecting the strength of supporting evidence from neighborhood done in other organisms.
701700
- `fusion`: score that is derived from fused proteins in other species.
702701
- `cooccurence`: is a type of score that is derived from similar absence/presence patterns of genes in different species.
@@ -734,7 +733,6 @@ For a given gene, this service gets from the String database a list of genes and
734733
"gene_1": "MX2",
735734
"gene_2": "MX1",
736735
"homology": 961,
737-
"neighborhood": null,
738736
"neighborhood_transferred": null,
739737
"textmining": 77,
740738
"textmining_transferred": 102
@@ -752,7 +750,6 @@ For a given gene, this service gets from the String database a list of genes and
752750
"gene_1": "MX2",
753751
"gene_2": "ISG15",
754752
"homology": null,
755-
"neighborhood": null,
756753
"neighborhood_transferred": null,
757754
"textmining": 862,
758755
"textmining_transferred": 162

bio-api/bioapi.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ def associated_string_genes(gene_symbol: str, min_combined_score: int = 400) ->
624624
"gene_1": gene_symbol,
625625
"combined_score": {"$gt": min_combined_score}
626626
},
627-
{"_id": 0}
627+
{"_id": 0, "neighborhood": 0}
628628
)
629629
res = list(relations)
630630
gene_list = [relation["gene_2"] for relation in relations]
@@ -633,7 +633,7 @@ def associated_string_genes(gene_symbol: str, min_combined_score: int = 400) ->
633633
"gene_2": gene_symbol,
634634
"combined_score": {"$gt": min_combined_score}
635635
},
636-
{"_id": 0}
636+
{"_id": 0, "neighborhood": 0}
637637
)
638638
res.extend(list(relations_2))
639639

databases/string/string2mongodb.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,16 @@
5454
gene_relations = []
5555
for line in tqdm(protein_relations):
5656
line = line.split(" ")
57+
line.pop(2)
5758
if not skipped_first_line:
5859
fields = line
5960
fields[0] = "gene_1"
6061
fields[1] = "gene_2"
61-
fields[15] = "combined_score"
62+
fields[14] = "combined_score"
6263
skipped_first_line = True
6364
else:
6465
rel = {}
65-
for f in range(16):
66+
for f in range(15):
6667
if f <= 1:
6768
rel[fields[f]] = alias_dict[line[f]]
6869
elif int(line[f]) > 0:

0 commit comments

Comments
 (0)