hlpr_compile_trajectory: Compiles a trajectory data.frame

View source: R/helper-functions.R

hlpr_compile_trajectoryR Documentation

Compiles a trajectory data.frame

Description

Compiles a trajectory data.frame

Usage

hlpr_compile_trajectory(
  segment_trajectory_df,
  trajectory_width,
  object,
  sample
)

Arguments

segment_trajectory_df

A data.frame specifying each segment of the whole trajectory with variables x, y, xend, yend.

trajectory_width

Numeric value that determines the width of the trajectory.

object

A valid spata-object.

Value

A data.frame containing the variables barcodes, sample, x, y as well as

  • projection_length: indicating the position of every barcode-spot with respect to the direction of the trajectory-part. The higher the barcode-spots value is the farther away it is from the starting point of the trajectory-part it belongs to.

  • trajectory_part: indicating the part of the trajectory the barcode-spot belongs to.


kueckelj/SPATA documentation built on March 22, 2022, 9:59 p.m.