compute_similarity_grammar: compute_similarity_grammar

View source: R/compute_similarity_grammar.R

compute_similarity_grammarR Documentation

compute_similarity_grammar

Description

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

Usage

compute_similarity_grammar(
  gr_query,
  gr_target_list,
  query_genome,
  target_genome,
  motif_list,
  grammar_size = 500L,
  metric = "cosine",
  verbose = TRUE
)

Arguments

gr_query

The query genomic regions of GRanges class.

gr_target_list

The corresponding candidate target regions of GRangesList class. The length of gr_target_list 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'.

verbose

Print messages or not. Default is TRUE.

Value

A GRangesList class the same structure as gr_target_list with an extra meta column named "grammar" measuring the similarity score of sequence grammars.

Author(s)

Chenyang Dong cdong@stat.wisc.edu

Examples



data('data_example')
data('jaspar_pfm_list')
gr_target_list <- compute_similarity_grammar(gr, gr_list, 'mm10', 'hg38', jaspar_pfm_list)



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