liana.resource.select_resource#
- liana.resource.select_resource(resource_name='consensus')#
Read resource of choice from the pre-generated resources in LIANA.
- Parameters:
resource_name (
str(default:'consensus')) – Name of the resource to be loaded and use for ligand-receptor inference.- Raises:
ValueError – If the resource name provided is not availabe in LIANA
- Return type:
DataFrame- Returns:
A dataframe with
['ligand', 'receptor']columns
Examples
The
'consensus'resource ships with LIANA+ and is the one used by default:>>> import liana as li >>> resource = li.rs.select_resource('consensus') >>> resource.head(3) ligand receptor 0 LGALS9 PTPRC 1 LGALS9 MET 2 LGALS9 CD44
Pass the frame to any method via
resource=.