Skip to contents

group the flagged transcript within each cell based on spatial connectivity of their transcript delaunay network

Usage

groupTranscripts_Delaunay(
  chosen_transcripts = NULL,
  config_spatNW_transcript = list(name = "transcript_delaunay_network", dimensions =
    "all", method = "Delaunay", minimum_k = 0, delaunay_method = "delaunayn_geometry",
    maximum_distance_delaunay = "auto", options = "Pp", Y = TRUE, j = TRUE, S = 0),
  distance_cutoff = "auto",
  transcript_df,
  cellID_coln = "CellId",
  transID_coln = "transcript_id",
  transSpatLocs_coln = c("x", "y", "z")
)

Arguments

chosen_transcripts

the transcript_id of chosen transcript

config_spatNW_transcript

configuration list to create spatial network at transcript level, see manual for createSpatialDelaunayNW_from_spatLocs for more details

distance_cutoff

maximum distance within connected transcript group (default = "auto")

transcript_df

the data.frame with transcript_id, target/geneName, x, y and cell_id

cellID_coln

the column name of cell_ID in transcript_df

transID_coln

the column name of transcript_ID in transcript_df

transSpatLocs_coln

the column name of 1st, 2nd, optional 3rd spatial dimension of each transcript in transcript_df

Value

data frame of connected transcripts among chosen_transcripts #'

  1. cellID_coln, orignal cell_ID

  2. transID_coln, connected transcripts among chosen_transcripts

  3. transSpatLocs_coln, spatial coordinates of transcript

  4. transcript_group, group of chosen_transcripts

Details

for query cell, build network on flagged transcripts only to identify groups. In case of no more than 3 transcripts, determine the grouping based on distance cutoff directly; when distance cutoff = 'auto', no additional edge filtering based on delaunay network output but use 20% average XY cell range as cutoff when no more than 3 transcript.