Formats an INFORM, HALO, Visum, CODEX, cellprofiler outputs into a singlecellexperiment class. Users can also input a generic format. The count assay stores the intensity level of every marker (rows) for every cell (columns). Cell phenotype, x and y coordinates and other properties are stored under colData. If INFORM format, the cell properties are Cell.Area, Nucleus.Area, Nucleus.Compactness, Nucleus.Axis.Ratio, and Cell.Axis.Ratio. If HALO format, the cell properties are Cell.Area, Nucleus.Area and Cytoplasm.Area.
format_image_to_sce( format = "INFORM", path = NULL, markers = NULL, locations = NULL, dye_columns_interest = NULL, intensity_columns_interest = NULL, path_to_visium_coordinates = NULL, path_to_codex_cell_phenotypes = NULL, intensity_matrix = NULL, phenotypes = NULL, coord_x = NULL, coord_y = NULL )
format | String defining the software used for cell segmentation. Options: "INFORM", "HALO", "Visium", "CODEX" "cellprolifer, or "general" |
---|---|
path | String of the path location of either HALO csv file, INFORM text file or CODEX csv file. If 10X Visium transcriptomics data, path to the "filtered_feature_bc_matrix" folder generated by CellRanger |
markers | For INFORM and HALO formats. Vector containing the markers used for staining. Must match the order of the 'markers' parameter |
locations | Vector containing the locations of markers used for staining. Location can be either "Nucleus", "Cytoplasm" or "Membrane". This is used to select the Intensity column and can be used instead of intensity_columns_interest. |
dye_columns_interest | For HALO formats. Use if locations is not specified. Vector of names of the columns with the marker status (i.e. those indicating 1 or 0 for whether the cell is positive or negative for the marker). Column names must match the order of the 'markers' parameter. |
intensity_columns_interest | For HALO formats. Use if locations is not specified. Vector with the names of the columns with the level of each marker. Column names must match the order of the 'markers' parameter |
path_to_visium_coordinates | For 10X Visium data. String of the path to the "tissue_positions_list.csv" generated by CellRanger |
path_to_codex_cell_phenotypes | For CODEX data. String of the path to the Cluster ID/Cell type file. |
intensity_matrix | For the "general" format. A matrix of marker intensities or gene expression where the column names are the Cell IDs, and the rownames the marker or genes. |
phenotypes | A vector of cell phenotypes in the same order in which they appear in intensity_matrix. If no phenotypes available, then a vector of NA can be used as input. Note that the combination of markers (e.g. CD3,CD4) needs to be used instead of the cell type name (e.g. helper T cells) |
coord_x | A vector with the X coordinates of the cells. The cells must be in the same order as in the intensity_matrix. |
coord_y | A vector with the Y coordinates of the cells. The cells must be in the same order as in the intensity_matrix. |
A SingleCellExperiment object is returned