-
Notifications
You must be signed in to change notification settings - Fork 5
NEN
Peng-Hsuan Li edited this page Jul 20, 2022
·
2 revisions
Keyword | Explanation |
---|---|
query | a text string entered by user |
name | a text string tagged as a named entity in the literature |
alias | a name tagged with the same entity type and ID as another name |
API | Explanation |
---|---|
kb.nen.get_names_by_query() | search for names similar to the input query |
kb.nen.get_ids_by_name() | return entity types and IDs ever tagged to the input name |
kb.nen.get_aliases_by_id() | return aliases sharing the same input entity type and ID |
query = "V600E"
name_similarity_list = kb.nen.get_names_by_query(
query,
case_sensitive=False,
max_length_diff=1,
min_similarity=0.85,
max_names=20,
)
for name, similarity in name_similarity_list:
logger.info(f"{name}: {similarity:.1%}")
2022/07/20 - INFO - __main__ - V600E: 100.0%
2022/07/20 - INFO - __main__ - V 600E: 90.9%
2022/07/20 - INFO - __main__ - V600 E: 90.9%
2022/07/20 - INFO - __main__ - V600-E: 90.9%
2022/07/20 - INFO - __main__ - V600: 88.9%
2022/07/20 - INFO - __main__ - V60E: 88.9%
2022/07/20 - INFO - __main__ - 600E: 88.9%
name = "V600E"
type_id_frequency_list = kb.nen.get_ids_by_name(name)
for _type, _id, frequency in type_id_frequency_list:
logger.info(f"{name} is tagged by (type: {_type}, ID: {_id}) {frequency:,} times in literature")
2022/07/20 - INFO - __main__ - V600E is tagged by (type: ProteinMutation, ID: tmVar:p|SUB|V|600|E) 12,046 times in literature
2022/07/20 - INFO - __main__ - V600E is tagged by (type: ProteinMutation, ID: HGVS:p.V600E) 12,046 times in literature
2022/07/20 - INFO - __main__ - V600E is tagged by (type: ProteinMutation, ID: CorrespondingGene:673) 11,801 times in literature
2022/07/20 - INFO - __main__ - V600E is tagged by (type: ProteinMutation, ID: RS#:113488022) 11,617 times in literature
2022/07/20 - INFO - __main__ - V600E is tagged by (type: ProteinMutation, ID: CA#:123643) 11,617 times in literature
2022/07/20 - INFO - __main__ - V600E is tagged by (type: ProteinMutation, ID: VariantGroup:0) 11,460 times in literature
_type, _id = "ProteinMutation", "HGVS:p.V600E"
alias_frequency_list = kb.nen.get_aliases_by_id(_type, _id, max_aliases=10)
for alias, frequency in alias_frequency_list:
logger.info(f"(type: {_type}, ID: {_id}) is tagged to {alias} {frequency:,} times in literature")
2022/07/20 - INFO - __main__ - (type: ProteinMutation, ID: HGVS:p.V600E) is tagged to V600E 12,046 times in literature
2022/07/20 - INFO - __main__ - (type: ProteinMutation, ID: HGVS:p.V600E) is tagged to BRAFV600E 4,433 times in literature
2022/07/20 - INFO - __main__ - (type: ProteinMutation, ID: HGVS:p.V600E) is tagged to p.V600E 331 times in literature
2022/07/20 - INFO - __main__ - (type: ProteinMutation, ID: HGVS:p.V600E) is tagged to BrafV600E 97 times in literature
2022/07/20 - INFO - __main__ - (type: ProteinMutation, ID: HGVS:p.V600E) is tagged to p.Val600Glu 41 times in literature
2022/07/20 - INFO - __main__ - (type: ProteinMutation, ID: HGVS:p.V600E) is tagged to Val600Glu 29 times in literature
2022/07/20 - INFO - __main__ - (type: ProteinMutation, ID: HGVS:p.V600E) is tagged to BRafV600E 20 times in literature