Initial formatting of Singular Genomics G4X data to work with Seurat and Kandinsky

prepare_g4x_seurat(
  path = NULL,
  dataset.id = NULL,
  pattern = NULL,
  h5 = T,
  segmentation = F
)

Arguments

path

character string specifying the path to the G4X input files directory

dataset.id

character string that will be used to name the output Seurat object identity

pattern

character string that will be used as a key to identify G4X input file names in case when input files from multiple G4X samples/slides are stored in the same directory

h5

boolean, whether reading count matrix and metadata from 'feature_matrix.h5' (TRUE) file or remaining files in the 'single_cell_data/' folder (FALSE)

segmentation

boolean, whether building cell polygons using G4X segmentation masks from .npz files (TRUE) or using cell centroids (FALSE). Reading .npz files requires the use of python numpy library through reticulate

Value

a Seurat object containing G4X count matrix, metadata, and additional files/file paths to be used for downstream analysis with Kandinsky functions

Details

This function will use Singular Genomics G4X raw input data to build a new Seurat object. All G4X input files must be stored in the same folder that will be specified to call the function