project_on_trajectory: Project barcode spots on a trajectory

View source: R/p.R

project_on_trajectoryR Documentation

Project barcode spots on a trajectory

Description

Projects every barcode spot onto the trajectory.

Usage

project_on_trajectory(coords_df, traj_df, width, ...)

Arguments

traj_df

A data.frame specifying the course of the trajectory. Requires x and y variables that correspond to the position of the points that build the trajectory. If nrow(traj_df) == 2, the trajectory is a straight geometrical vector and handled as such. If nrow(traj_df) >= 3, the trajectory is considered to have a curvature.

width

Numeric value that determines the width of the trajectory.

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. The higher the barcode-spots value is the farther away it is from the starting point of the trajectory it belongs to.

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


theMILOlab/SPATA2 documentation built on Feb. 8, 2025, 11:41 p.m.