liana.resource.get_metalinks#
- liana.resource.get_metalinks(db_path=None, types=None, cell_location=None, tissue_location=None, biospecimen_location=None, disease=None, pathway=None, hmdb_ids=None, uniprot_ids=None, source=None)#
Fetches edges of metabolite-proteins with specified annotations, applying filters if they are not None.
Allows filtering by lists of hmdb and uniprot IDs and avoids duplicate column names, and returns the results as a pandas DataFrame. Filters are applied using INNER JOINs and WHERE clauses - i.e. the results are the intersection of the filters.
- Parameters:
db_path (
str|None(default:None)) – Path to the SQLite database file. If None, the database will be downloaded to the current working directory.types (
list[str] |None(default:None)) – Desired edge types. Options are: [‘lr’, ‘pd’], where ‘lr’ stands for ‘ligand-receptor’ and ‘pd’ stands for ‘production-degradation’.cell_location (
list[str] |None(default:None)) – Desired metabolite cell locations.tissue_location (
list[str] |None(default:None)) – Desired metabolite tissue locations.biospecimen_location (
list[str] |None(default:None)) – Desired metabolite biospecimen locations.disease (
list[str] |None(default:None)) – Desired metabolite diseases.pathway (
list[str] |None(default:None)) – Desired metabolite pathways.hmdb_ids (
list[str] |None(default:None)) – Desired HMDB IDs.uniprot_ids (
list[str] |None(default:None)) – Desired UniProt IDs.source (
list[str] |None(default:None)) – Desired source databases.
- Return type:
DataFrame- Returns:
A pandas DataFrame containing the query results without the source column.