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 that falls in to the rectangle defined by the trajectory and the width parameter on the trajectory and saves the projection length in a vector.

Usage

project_on_trajectory(coords_df, segment_df, width)

Arguments

segment_df

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

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-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/SPATA2 documentation built on March 16, 2024, 10:25 a.m.