
Prepare the data for weight training
prepare_data_for_training.RdPrepare the data for weight training
Arguments
- path_to_gs
Path to the gene set file without weights
- exprs
The expression matrix, or a seurat object (rows: genes, columns: samples/cells)
- level
The level of the gene sets to train weights for if you have multiple levels of gene sets.
- scaled
Whether the expression matrix is scaled
- clusters
The cell types of the cells. When
exprsis a Seurat object, it can beNULL(default) to take the cell types fromSeurat::Idents(), or a column name in themeta.dataof the Seurat object that holds the cell type of each cell. Whenexprsis a matrix, it should be a named vector of cell types (names - cell names).