Download mcp/cbio.py from mgbam/MCP_Res: direct link, hf CLI and curl.
- Browser
- Download file 481 Bytes
-
https://huggingface.co/spaces/mgbam/MCP_Res/resolve/1f7d1c0d89b17a6183262c4cefdae7ac182f97fd/mcp/cbio.py
- Command line
-
hf download hf://spaces/mgbam/MCP_Res@1f7d1c0d89b17a6183262c4cefdae7ac182f97fd/mcp/cbio.py
-
curl -L -o cbio.py https://huggingface.co/spaces/mgbam/MCP_Res/resolve/1f7d1c0d89b17a6183262c4cefdae7ac182f97fd/mcp/cbio.py
481 Bytes
| # mcp/cbio.py | |
| from functools import lru_cache | |
| from mcp.clients import BaseClient | |
| class CbioClient(BaseClient): | |
| def __init__(self): | |
| super().__init__("https://www.cbioportal.org/api", None) | |
| async def fetch_variants(self, gene: str, profile: str="brca_tcga_pan_can_atlas_2018_mutations"): | |
| path = f"molecular-profiles/{profile}/genes/{gene}/mutations?projection=SUMMARY" | |
| return await self.request("GET", path) | |
| cbio = CbioClient() | |