Skip to contents

This function computes the spatial frequency of motifs in a trajectory model, using the top and bottom 10% of peaks based on diff_score.

Usage

compute_traj_model_spatial_freq(
  traj_model,
  size,
  pwm_threshold = 7,
  pwm_q_threshold = 0.99,
  top_q = 0.1,
  bottom_q = 0.1,
  atac_track = NULL,
  parallel = TRUE,
  bidirect_size = NULL,
  k4me3_track = NULL,
  k27me3_track = NULL,
  k27ac_track = NULL,
  orient_to_intervals = NULL,
  align_to_max = TRUE,
  motifs = names(traj_model@motif_models)
)

Arguments

traj_model

A trajectory model object

size

The size of the region to compute spatial frequency for

pwm_threshold

The threshold for the PWM score

pwm_q_threshold

The genomic quantile to use for the PWM threshold. Would be used if pwm_threshold is NULL.

top_q

The proportion of top peaks to select

bottom_q

The proportion of bottom peaks to select

atac_track

name of ATAC-seq marginal track

parallel

Whether to use parallel processing

bidirect_size

Size of the intervals to use for deciding the directionality of the sequence

k4me3_track

name of k4me3 track

k27me3_track

name of k27me3 track

k27ac_track

name of k27ac track

orient_to_intervals

A data frame containing the intervals to orient the sequences to

align_to_max

A logical indicating whether to align the sequences to the maximum in each sequence at the epigenetic tracks and atac signal

motifs

A vector of motif names to compute spatial frequency for. Default is all motifs in the trajectory model.

Value

A data frame with the spatial frequency of each motif