This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ python -m graphrag.graphrag | |
| Successfully loaded graph @ /home/david/dev/adhoc-api/graphrag/cbioportal from disk. | |
| >>> can you run code to get gene panel data? | |
| thought: I need more information about the specific gene panel data the user is interested in | |
| to proceed effectively. | |
| tool: ask_user | |
| tool_input: {'query': 'Could you please provide more details about the gene panel data you are | |
| interested in? For example, are you looking for specific genes, a particular type of analysis, | |
| or data from a certain database or source?'} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> for the PDC api, can you ask if there are any fields necessary for various requests that look like they might be drawn from a fixed enumerated set of values? Not things like case IDs which do have a fixed set of values--but are always changing. But rather other parameters used to filter for data that are likely to have a stable set of fixed possible values | |
| thought: I need to list the available APIs to find the PDC API and then ask about the fields | |
| that might be drawn from a fixed enumerated set of values. | |
| tool: AdhocApi.list_apis | |
| tool_input: None | |
| observation: {'Proteomic Data Commons': {'description': "The Proteomics Data Commons (PDC) is a | |
| comprehensive, open-access resource that stores,\nmanages, and shares large-scale proteomic | |
| data for cancer and other biomedical research.\nIt is part of the National Cancer Institute's | |
| broader data ecosystem, enabling researchers\nto access and analyze proteomic datasets, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> From the Proteomic Data Commons, use the api tool to download a metadata file with information about proteome protein assembly data files from primary tumor samples. Exclude any disqualified cases and specimens. | |
| thought: First, I need to list the available APIs to find the Proteomic Data Commons API. | |
| tool: AdhocApi.list_apis | |
| tool_input: None | |
| observation: {'Proteomic Data Commons': {'description': "The Proteomics Data Commons (PDC) is a comprehensive, open-access resource that stores,\nmanages, and shares large-scale proteomic | |
| data for cancer and other biomedical research.\nIt is part of the National Cancer Institute's broader data ecosystem, enabling researchers\nto access and analyze proteomic datasets, including | |
| mass spectrometry data and related\nmetadata. The PDC supports integrative research by providing standardized data formats\nand analysis tools, facilitating the discovery of protein | |
| biomarkers and insights into\ncancer biology, which helps in advancing personalized medicine and treatment appr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> From the Proteomic Data Commons site, use the api tool to download the biospecimen metadata for specimens with processed mass spectra data from patients with endometrial cancer. | |
| thought: I need to list the available APIs to find the one related to the Proteomic Data Commons. | |
| tool: AdhocApi.list_apis | |
| tool_input: None | |
| observation: {'Proteomic Data Commons': {'description': "The Proteomics Data Commons (PDC) is a comprehensive, open-access resource that stores,\nmanages, and shares large-scale proteomic | |
| data for cancer and other biomedical research.\nIt is part of the National Cancer Institute's broader data ecosystem, enabling researchers\nto access and analyze proteomic datasets, including | |
| mass spectrometry data and related\nmetadata. The PDC supports integrative research by providing standardized data formats\nand analysis tools, facilitating the discovery of protein | |
| biomarkers and insights into\ncancer biology, which helps in advancing personalized medicine and treatment approaches.\n"}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> what apis are available? | |
| thought: I will list all the available APIs to provide the user with the information they need. | |
| tool: AdhocApi.list_apis | |
| tool_input: None | |
| observation: {'Proteomic Data Commons': {'description': "The Proteomics Data Commons (PDC) is a comprehensive, open-access resource that stores,\nmanages, and shares large-scale proteomic | |
| data for cancer and other biomedical research.\nIt is part of the National Cancer Institute's broader data ecosystem, enabling researchers\nto access and analyze proteomic datasets, including | |
| mass spectrometry data and related\nmetadata. The PDC supports integrative research by providing standardized data formats\nand analysis tools, facilitating the discovery of protein | |
| biomarkers and insights into\ncancer biology, which helps in advancing personalized medicine and treatment approaches.\n"}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> On the Proteomic Data Commons site, find the number of clinical cases with Hepatocellular Carcinoma | |
| thought: I need to find an API related to the Proteomic Data Commons to retrieve information about clinical cases with Hepatocellular Carcinoma. | |
| tool: AdhocApi.list_apis | |
| tool_input: None | |
| observation: {'Proteomic Data Commons': {'description': "The Proteomics Data Commons (PDC) is a comprehensive, open-access resource that stores,\nmanages, and shares large-scale proteomic | |
| data for cancer and other biomedical research.\nIt is part of the National Cancer Institute's broader data ecosystem, enabling researchers\nto access and analyze proteomic datasets, including | |
| mass spectrometry data and related\nmetadata. The PDC supports integrative research by providing standardized data formats\nand analysis tools, facilitating the discovery of protein | |
| biomarkers and insights into\ncancer biology, which helps in advancing personalized medicine and treatment approaches.\n"}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| from bs4 import BeautifulSoup | |
| from collections import defaultdict | |
| # from markdownify import markdownify as md | |
| from weasyprint import HTML | |
| from tqdm import tqdm | |
| from enum import Enum | |
| import pdb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> can you help me do a geo power analysis | |
| ⠙ thinking...[2024-08-23 11:05:30,632] {_client.py:1026} INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK" | |
| thought: I need to gather the necessary parameters for the geo power analysis. | |
| tool: geo_power_api | |
| tool_input: {'data': {}} | |
| observation: {'1_user_inputs': {'application': 'power', 'latitude': None, 'Longitude': None, 'subsurface favorability': 1.0, 'surface favorability': 1.0, 'geothermal gradient': 74.0, 'Surface | |
| Temperature': 25.0, 'Depth to Basement': 4.7, 'Production Temperature': 150.0, 'Derisking Time': 1, 'Production Well Count': 5, 'Discount Rate': 9.0, 'Mass Flow Rate / Well': 50.0, 'Linear | |
| Temperature Decline': 1.0, 'Sedimentary Drilling Cost Adjuster': 100.0, 'Basement Drilling Cost Multiplier': 1.2, 'Horizontal Well Length': 1000.0, 'Capital Expenditure Subsidy': 0.0, 'Annual | |
| Fixed OPEX as % of Total CAPEX': 2.0, 'Wells and Plant Construction Time': 2, 'Power Plant Efficiency Increase Over Baseline': 0.0, 'Powe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> what kind of analysis can you help me with? | |
| ⠸ thinking...[2024-08-13 12:20:07,022] {_client.py:1026} INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK" | |
| thought: I need to provide the user with information about the types of analysis that can be | |
| performed using the geo_power_api. | |
| tool: final_answer | |
| tool_input: I can help you with various types of geothermal energy analysis, including but not | |
| limited to: assessing geothermal potential, evaluating the feasibility of geothermal projects, | |
| analyzing geothermal resource data, and providing insights into geothermal energy production. | |
| If you have specific data or a particular question in mind, please provide the details, and I | |
| can assist you further. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import timeit | |
| import random | |
| # Class definitions | |
| class Class0: pass | |
| class Class1: pass | |
| class Class2: pass | |
| class Class3: pass | |
| class Class4: pass |