loki.annotate.annotate_with_bulk
- loki.annotate.annotate_with_bulk(img_features, bulk_features, normalize=True, T=1, tensor=False)
Annotates tissue image with similarity scores between image features and bulk RNA-seq features.
- Parameters:
img_features – Feature matrix representing histopathology image features.
bulk_features – Feature vector representing bulk RNA-seq features.
normalize – Whether to normalize similarity scores, default=True.
T – Temperature parameter to control the sharpness of the softmax distribution. Higher values result in a smoother distribution.
tensor – Feature format in torch tensor or not, default=False.
- Returns:
An array or tensor containing the normalized similarity scores.