Swiss-army toolkit for selecting niche fronts and invasive margins in spatial transcriptomics data


[Up] [Top]

Documentation for package ‘Battlefield’ version 0.99.2

Help Pages

add_borders_to_spe Add border or core spot selections to SpatialExperiment colData
add_layers_to_spe Add layer classifications to SpatialExperiment colData
add_trajectories_to_spe Add trajectory information to SpatialExperiment colData
adjacent_endpoint Pick a point adjacent to a selected endpoint, on a given side of a segment
bresenham_line Rasterize a line between two points using Bresenham's algorithm
build_all_borders Build border spots for all oriented cluster pairs
build_all_cores Build core spots for all oriented cluster pairs
build_one_line Build a single line of spots along a segment
build_one_trajectory Select spots near a segment and order them along the segment
build_similar_trajectories Build parallel spot lines around a central segment
closest_spot Find the closest spot to a target point
compute_centroids Compute cluster centroids (mean x/y per cluster)
count_all_inlaids Count inlaid composition for all clusters
count_all_neighborhoods Count neighborhood composition for all clusters
count_inlaid Count inlaid composition within a source cluster
count_neighborhood Count annotated spot types in the neighborhood of a cluster or point
create_all_layers Create and visualize layers for multiple clusters
create_cluster_layers Create layer classification for spots in a cluster
detect_grid_type Detect the grid type (square vs hexagonal) from spatial coordinates
directed_cluster_interface_pairs Build all oriented cluster pairs (A -> B) and their directed_pair labels
estimate_spot_spacing Estimate spot spacing from nearest-neighbor distances
filter_out_by_endpoint_clusters Filter lines by endpoint cluster membership
get_inlaid_spots Get inlaid spots within a source cluster
get_neighborhood_params Suggest neighborhood parameters based on detected grid type
get_neighborhood_spots Get neighborhood spots around a target cluster or point
point_segment_distance_vec Point-to-segment distance (vectorized)
remove_used_points Remove rows whose rounded (x, y) coordinates have already been used
select_border_spots Select border spots from cluster A that touch cluster B (and flag junctions)
select_core_spots Select core (non-interface) spots for a directed pair
shift_point Shift a point along a given direction vector
unit_normal_left Compute the left unit normal of the directed segment A->B
visiumHD_16um_simulated_spe Simulated VisiumHD 16 µm binned SpatialExperiment dataset
visiumHD_8um_simulated_spe Simulated VisiumHD 8 µm binned SpatialExperiment dataset
visium_simulated_spe Simulated Visium SpatialExperiment dataset