Skip to contents

This function merges multiple motifs (chosen manually) into a new motif in a trajectory model.

Usage

merge_trajectory_motifs(
  traj_model,
  motifs,
  new_motif_name,
  min_diff = 0.1,
  seed = 60427
)

Arguments

traj_model

The trajectory model object.

motifs

A character vector specifying the names of the motifs to be merged.

new_motif_name

A character string specifying the name of the new merged motif.

min_diff

A numeric value specifying the minimum absolute difference in ATAC scores for a motif to be considered in the merging process. Default is 0.1.

seed

An integer specifying the seed for random number generation. Default is 60427.

Value

A modified trajectory model object with the merged motif and updated attributes.

Details

This function validates the trajectory model, checks if the specified motifs exist in the model, and performs the merging process. It computes the merged motif using distillation on the motifs partial response, updates the model features, and returns the modified trajectory model object.