Process and filter a Giotto object

\(~\)

1. create Giotto object
path_to_matrix = system.file("extdata", "seqfish_field_expr.txt", package = 'Giotto')
path_to_locations = system.file("extdata", "seqfish_field_locs.txt", package = 'Giotto')

my_giotto_object = createGiottoObject(raw_exprs = path_to_matrix,
                                      spatial_locs = path_to_locations)

\(~\)

2. filter Giotto object based on gene and cell coverage
my_giotto_object <- filterGiotto(gobject = my_giotto_object, 
                                 expression_threshold = 1, 
                                 gene_det_in_min_cells = 10, 
                                 min_det_genes_per_cell = 5)

\(~\)

3. normalize Giotto object
my_giotto_object <- normalizeGiotto(gobject = my_giotto_object, scalefactor = 6000, verbose = T)

\(~\)

4. (optional) add gene and cell statistics and adjust matrix for technical covariates or batch effects
my_giotto_object <- addStatistics(gobject = my_giotto_object)
my_giotto_object <- adjustGiottoMatrix(gobject = my_giotto_object, 
                                       expression_values = c('normalized'),
                                       covariate_columns = c('nr_genes', 'total_expr'))