prep.cytonorm - Prepare reference data into a FlowSOM object
Source:R/prep.cytonorm.R
prep.cytonorm.Rd
This function allows you to prepare reference data ahead of performing batch alignment.
Arguments
- dat
NO DEFAULT. A data.table consisting of the 'refernece' data you will use to train the alignment algorithm
- cellular.cols
NO DEFAULT. A vector of column names from the data.table that contain 'cellular' markers
- cluster.cols
NO DEFAULT. A vector of column names from the data.table that contain markers you wish to use for clusteirng
- batch.col
NO DEFAULT. Name of the column that contains batch names
- sample.col
DEFAULT = NULL. Name of the column that contains sample names
- dir
DEFAULT = getwd(). Sets the working directory to operate from. Because this function involves some reading/writing of files, it's best to set this to somewhere static in case the active working directory moves to a subfolder, and then doesn't return because the function runs into an error.
- xdim
DEFAULT = 5. Size of X-axis of FlowSOM grid.
- ydim
DEFAULT = 5. Size of Y-axis of FlowSOM grid.
- meta.k
DEFAULT = 10. Number of metaclusters. If set to 1, will map all cells to a single metacluster
- seed
DEFAULT = 42. Seed for reproducibility.
- mem.ctrl
DEFAULT = TRUE. Allows the function to clear held memory on occasion.
- n.cells
DEFAULT = 10000000. Maxium cells allowed to be read for the prep.cytonorm functionality. Cells read from each file will be the lesser of n.cells / number of files or the total number of cells in the file.
Value
Returns an object which represents the alignment model. In this preparation stage, it contains the FlowSOM object containing the reference data. The 'train.align' function can then be used to calculate the conversions between batches for each metacluser.
References
Ashhurst, T. M., et al. (2019). https://www.ncbi.nlm.nih.gov/pubmed/31077106
Author
Thomas M Ashhurst, thomas.ashhurst@sydney.edu.au