Action | Examples |
---|---|
Pull Entries with a single request | import kegg_pull.pull as p single_pull = p.SinglePull(output = 'kegg-entries/') single_pull.pull(entry_ids = ['cpd:C00001', 'cpd:C00002']) |
Pull Entries with multiple requests | import kegg_pull.pull as p import kegg_pull.entry_ids as ei single_pull = p.SinglePull( output = 'kegg-entries.zip', entry_field = 'mol' ) multi_pull = p.MultiProcessMultiplePull( single_pull = single_pull, n_workers = 4 ) entry_ids: list = ei.from_file(file_path = 'entry-ids.txt') multi_pull.pull(entry_ids = entry_ids) |
Pull entry IDs | import kegg_pull.entry_ids as ei ei.from_database(database_name = 'hsa') |
REST operation | import kegg_pull.rest as r kegg_rest = r.KEGGrest() kegg_response: r.KEGGresponse = kegg_rest.molecular_find( database_name = 'drug', exact_mass = (200, 220) ) |
URL creation | import kegg_pull.kegg_url as ku conv_url = ku.DatabaseConvKEGGurl( kegg_database_name = 'hsa', outside_database_name = 'ncbi-geneid' ) |