came.utils.preprocess.get_homologies¶
- came.utils.preprocess.get_homologies(df_match: DataFrame, vals: Sequence, cols: Sequence[str] | None = None, reverse: bool = False, uniquelist: bool = True, with_null=False)¶
Get the homologous gene of input ones based on the homology-mappings
- Parameters:
df_match – homologous gene mappings
vals – the gene names.
cols – Two column names as
[col_from, col_to]
, specifying the homology mapping direction.reverse – whether to reverse the mappings
uniquelist – whether to remove the duplicates from the results.
with_null – whether to return those genes without any homologies (copy names)
- Returns:
If
uniquelist=True
andwith_null=False
, a single list will be returned;otherwise, returns a tuple of two lists (homo, null)