Skip to content

Commit

Permalink
new cli get-via-api
Browse files Browse the repository at this point in the history
  • Loading branch information
hrshdhgd committed Feb 6, 2024
1 parent 188b64b commit f1156cb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions kg_microbe/run.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Drive KG download, transform, merge steps."""

import os

import click
Expand All @@ -8,6 +9,7 @@
from kg_microbe.query import parse_query_yaml, result_dict_to_tsv, run_query
from kg_microbe.transform import DATA_SOURCES
from kg_microbe.transform import transform as kg_transform
from kg_microbe.utils.s3_utils import run_api


@click.group()
Expand Down Expand Up @@ -112,6 +114,18 @@ def query(
result_dict_to_tsv(result_dict, outfile)


@main.command("get-via-api")
@click.option("api", "-a", required=True, default="uniprot", multiple=False)
def get_data_via_api(api: str) -> None:
"""
Get data via rest API.
:param api: A string pointing to the API to upload data to.
:return: None
"""
run_api(api)


@main.command()
@click.option(
"nodes",
Expand Down

0 comments on commit f1156cb

Please sign in to comment.