<jupyter_start><jupyter_text>Step1: Input a list of variants<jupyter_code>variant_list = ['chr6:g.26093141G>A', 'chr12:g.111351981C>T']<jupyter_output><empty_output><jupyter_text>Step2: Get a list of entrez_gene_ids related to the variants<jupyter_code># import biothings package
from biothings import IdListHandler
ih = IdListHandler()
gene_variant_list = ih.list_handler(input_id_list=variant_list, 
                                    input_type='hgvs_id', 
                                    output_type='entrez_gene_id')
print(gene_variant_list)<jupyter_output>['4633', '3077']<jupyter_text>Step3: Get a list of wikipathways_ids related to the entrez_gene_ids<jupyter_code>pathway_gene_list = ih.list_handler(input_id_list=gene_variant_list, 
                                    input_type='entrez_gene_id', 
                                    output_type='wikipathway_id')
print(pathway_gene_list)<jupyter_output>['WP2406', 'WP3924', 'WP383', 'WP3888', 'WP289']<jupyter_text>Step4: Get a list of entrez_gene_ids related to the wikipathways_ids<jupyter_code>gene_pathway_list = ih.list_handler(input_id_list=pathway_gene_list, 
                                    input_type='wikipathway_id', 
                                    output_type='entrez_gene_id')
print(gene_pathway_list)
len(gene_pathway_list)<jupyter_output>['pathway.wikipathways.id']
pathway.wikipathways.id:WP2406
Fetching 53 genes(s) . . .
Number of IDs from mygene.info related to this query pathway.wikipathways.id:WP2406 is : 53
['pathway.wikipathways.id']
pathway.wikipathways.id:WP3924
Fetching 7 genes(s) . . .
Number of IDs from mygene.info related to this query pathway.wikipathways.id:WP3924 is : 7
['pathway.wikipathways.id']
pathway.wikipathways.id:WP383
Fetching 38 genes(s) . . .
Number of IDs from mygene.info related to this query pathway.wikipathways.id:WP383 is : 38
['pathway.wikipathways.id']
pathway.wikipathways.id:WP3888
Fetching 236 genes(s) . . .
Number of IDs from mygene.info related to this query pathway.wikipathways.id:WP3888 is : 236
['pathway.wikipathways.id']
pathway.wikipathways.id:WP289
Fetching 155 genes(s) . . .
Number of IDs from mygene.info related to this query pathway.wikipathways.id:WP289 is : 155
['2309', '5530', '91807', '22809', '6013', '7220', '5566', '83881', '10971', '4313', '5867', '1386', '5868', '48[...]<jupyter_text>Step5: Get a list of disease ontology ids related to the entrez_gene_ids<jupyter_code>symbol_gene_list = ih.list_handler(input_id_list=gene_pathway_list, 
                                   input_type='entrez_gene_id', 
                                   output_type='hgnc_gene_symbol')
print(symbol_gene_list)
len(symbol_gene_list)
disease_symbol_list = ih.list_handler(input_id_list=symbol_gene_list, 
                                      input_type='hgnc_gene_symbol', 
                                      output_type='diseaseontology_id')
print(disease_symbol_list)
symbol_gene_list = symbol_gene_list[0:30]<jupyter_output><empty_output><jupyter_text>Step6: Get a list of drug namess that inhibit the entrez_gene_ids<jupyter_code>drug_inhibit_list = ih.list_handler(input_id_list=symbol_gene_list, 
                                    input_type='hgnc_gene_symbol', 
                                    output_type='drug_symbol', 
                                    relation='oban:is_inhibited_by')
print(drug_inhibit_list)

new_dict = {}
for _gene, _drug in drug_inhibit_symbol_dict.items():
    if _drug!=None and _drug!=[]:
        new_dict[_gene] = _drug
print(new_dict)<jupyter_output>{'FYN': ['VX-680', 'DASATINIB'], 'PRKCD': ['SOPHORETIN', 'KAI-9803'], 'PRKCI': ['SOPHORETIN'], 'HDAC4': ['PANOBINOSTAT', 'BELINOSTAT', 'VORINOSTAT', 'DACINOSTAT', 'PIVANEX', 'PCI-24781', 'VALPROIC ACID'], 'PLA2G4A': ['QUINACRINE'], 'PIK3R1': ['SOPHORETIN', 'PI-103', 'GSK2126458', 'SF1126', 'GSK2636771', 'PKI-587', 'XL147', 'GDC-0941', 'GDC-0980'], 'RICTOR': ['AZD8055', 'OSI-027']}
{'fraction_non_alphanumeric': 0.1193384223918575, 'fraction_numerical': 0.058524173027989825, 'mean_word_length': 3.6741973840665874, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 13, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '572237', 'license': 'ECL-2.0', 'n_tokens_mistral': 1627, 'n_tokens_neox': 1398, 'n_words': 243, 'path': 'src/Linking_APIs_and_Biological_Entities.ipynb', 'repo_name': 'kevinxin90/biothings_web', 'size': '3930'}