compute_similarity_grammar_flat: compute_similarity_grammar_flat

View source: R/compute_similarity_grammar.R

compute_similarity_grammar_flatR Documentation

compute_similarity_grammar_flat

Description

This function computes the sequence grammar similarities between query regions and the corresponding target regions.

Usage

compute_similarity_grammar_flat(
  gr_query,
  gr_target,
  query_genome,
  target_genome,
  motif_list,
  grammar_size = 500L,
  metric = "cosine"
)

Arguments

gr_query

The query genomic regions of GRanges class.

gr_target

The target genomic regions of GRanges class. The length of gr_target should be the same as the length of gr_query

query_genome

The query genome build identifier (e.g. 'mm10', 'hg38'). Make sure the corresponding BSgenome package is installed. Or a BSgenome class.

target_genome

The target genome build identifier (e.g. 'mm10', 'hg38'). Make sure the corresponding BSgenome package is installed. Or a BSgenome class.

motif_list

PWMatrixList, or PFMatrixList.

grammar_size

The nearby region (bp) to extract regulatory grammars. Default is 500L.

metric

The metric for computing similarities between indicators. One of 'cosine' and 'jaccard'. Default is 'cosine'.

Value

A numeric vector with values between 0 and 1.

Author(s)

Chenyang Dong cdong@stat.wisc.edu

Examples


data('data_example')
data('jaspar_pfm_list')
similarity <- compute_similarity_grammar_flat(gr[2], gr_list[[2]], 'mm10', 'hg38', jaspar_pfm_list)



ThomasDCY/AdaLiftOver documentation built on June 2, 2025, 12:35 p.m.