ReadNanostring: Read and Load Nanostring SMI data

View source: R/preprocessing.R

ReadNanostringR Documentation

Read and Load Nanostring SMI data

Description

Read and Load Nanostring SMI data

Usage

ReadNanostring(
  data.dir,
  mtx.file = NULL,
  metadata.file = NULL,
  molecules.file = NULL,
  segmentations.file = NULL,
  type = "centroids",
  mol.type = "pixels",
  metadata = NULL,
  mols.filter = NA_character_,
  genes.filter = NA_character_,
  fov.filter = NULL,
  subset.counts.matrix = NULL,
  cell.mols.only = TRUE
)

LoadNanostring(data.dir, fov, assay = "Nanostring")

Arguments

data.dir

Path to folder containing Nanostring SMI outputs

mtx.file

Path to Nanostring cell x gene matrix CSV

metadata.file

Contains metadata including cell center, area, and stain intensities

molecules.file

Path to molecules file

segmentations.file

Path to segmentations CSV

type

Type of cell spatial coordinate matrices to read; choose one or more of:

  • “centroids”: cell centroids in pixel coordinate space

  • “segmentations”: cell segmentations in pixel coordinate space

mol.type

Type of molecule spatial coordinate matrices to read; choose one or more of:

  • “pixels”: molecule coordinates in pixel space

metadata

Type of available metadata to read; choose zero or more of:

  • “Area”: number of pixels in cell segmentation

  • “fov”: cell's fov

  • “Mean.MembraneStain”: mean membrane stain intensity

  • “Mean.DAPI”: mean DAPI stain intensity

  • “Mean.G”: mean green channel stain intensity

  • “Mean.Y”: mean yellow channel stain intensity

  • “Mean.R”: mean red channel stain intensity

  • “Max.MembraneStain”: max membrane stain intensity

  • “Max.DAPI”: max DAPI stain intensity

  • “Max.G”: max green channel stain intensity

  • “Max.Y”: max yellow stain intensity

  • “Max.R”: max red stain intensity

mols.filter

Filter molecules that match provided string

genes.filter

Filter genes from cell x gene matrix that match provided string

fov.filter

Only load in select FOVs. Nanostring SMI data contains 30 total FOVs.

subset.counts.matrix

If the counts matrix should be built from molecule coordinates for a specific segmentation; One of:

  • “Nuclear”: nuclear segmentations

  • “Cytoplasm”: cell cytoplasm segmentations

  • “Membrane”: cell membrane segmentations

cell.mols.only

If TRUE, only load molecules within a cell

fov

Name to store FOV as

assay

Name to store expression matrix as

Value

ReadNanostring: A list with some combination of the following values:

  • matrix”: a sparse matrix with expression data; cells are columns and features are rows

  • centroids”: a data frame with cell centroid coordinates in three columns: “x”, “y”, and “cell”

  • pixels”: a data frame with molecule pixel coordinates in three columns: “x”, “y”, and “gene”

LoadNanostring: A Seurat object

Progress Updates with progressr

This function uses progressr to render status updates and progress bars. To enable progress updates, wrap the function call in with_progress or run handlers(global = TRUE) before running this function. For more details about progressr, please read vignette("progressr-intro")

Parallelization with future

This function uses future to enable parallelization. Parallelization strategies can be set using plan. Common plans include “sequential” for non-parallelized processing or “multisession” for parallel evaluation using multiple R sessions; for other plans, see the “Implemented evaluation strategies” section of ?future::plan. For a more thorough introduction to future, see vignette("future-1-overview")

Note

This function requires the data.table package to be installed


Seurat documentation built on May 29, 2024, 4:20 a.m.