Helper function to create an isoform similarity matrix based on shared exons.
Uses Jaccard similarity: |A ∩ B| / |A ∪ B|
Usage
create_similarity_from_exons(
exon_list,
method = c("jaccard", "overlap", "count")
)
Arguments
- exon_list
named list where each element is a character vector of exon IDs
for that isoform. Names should match isoform/transcript IDs.
- method
character, similarity method: "jaccard" (default), "overlap", or "count"
Value
symmetric similarity matrix
Details
Methods:
"jaccard": Jaccard index = |shared| / |union|
"overlap": Overlap coefficient = |shared| / min(|A|, |B|)
"count": Raw count of shared exons