navis.nbl.extract_matches¶
- navis.nbl.extract_matches(scores, N=None, threshold=None, percentage=None, axis=0, distances=False)[source]¶
Extract top matches from score matrix.
See N, threshold or percentage for the criterion.
- Parameters:
scores (pd.DataFrame) – Score matrix (e.g. from
navis.nblast()
).N (int) – Number of matches to extract.
threshold (float) – Extract all matches above a given threshold.
percentage (float [0-1]) – Extract all matches within a given range of the top match. E.g. percentage=0.05 will return all matches within 5% of the top match.
single_cols (bool) – If True will return single columns with comma-separated strings for match ID and match score, respectively.
axis (0 | 1) – For which axis to produce matches.
distances (bool) – Set to True if input is distances instead of similarities (i.e. we need to look for the lowest instead of the highest values).
- Returns:
Note that the format is slightly different depending on the criterion.
- Return type:
pd.DataFrame