Description Usage Arguments Value
View source: R/mgpEstimation.R
Primary function for cell type profile estimations.
1 2 3 4 5 6 | mgpEstimate(exprData, genes, geneColName = "Gene.Symbol",
outlierSampleRemove = FALSE, geneTransform = function(x) {
homologene::mouse2human(x)$humanGene }, groups = NULL,
tableOut = NULL, indivGenePlot = NULL, seekConsensus = FALSE,
removeMinority = TRUE, plotType = c("groupBased", "cummulative"),
permuations = 0, PC = 1)
|
exprData |
data.frame. Expression data. First collumns of the expression data should include gene names in the same format as the ones specified in the marker gene lists. Any other non-expression related fields must not be of type 'double' |
genes |
a named list containing marker gene lists of each cell type |
geneColName |
character. name of the column containing the gene names in the expression file |
outlierSampleRemove |
logical. Deprecated. If TRUE, outlier samples will be removed from the output. Outliers are calculated in the context of a group |
geneTransform |
a function that will be applied to the gene list. the default behavior is to change mouse genes to human genes. set to NULL to keep the genes as they are |
groups |
a vector stating which groups each sample belongs to |
tableOut |
character, directory name. If provided outputs loadings of individual genes and variance explained by principal components |
indivGenePlot |
character, directory name. If provided, plots expression of marker genes in individual groups per marker gene list. Is not guaranteed to look pretty. |
seekConsensus |
logical. If TRUE any gene with negative loadings in any of the groups individually will be removed. Use if there is a high likelihood of gene regulation between the groups. |
removeMinority |
logical. should the genes with negative loadings be removed from the estimation. Setting seekConsensus to TRUE makes this irrelevant. As all negatives will be removed at that step |
plotType |
if indivGenePlot is provided, type of plot to be saved. groupBased separates expression between groups cummulative plots a single value |
PC |
which principal component to use. For debugging purposes. Recommended value is always 1 |
A list.
estimates. A named vector of marker gene profiles estimated bythe function.
groups. if provided this lists the groups that the samples belong to. Unless outlierSampleRemove
is set to TRUE
, this will be the same as the groups for all cell types. So in most cases ignore this.
rotations. Loadings from the PCA. These values are modified to ensure the chosen PC (1st by default) has a positive direction.
trimmedPCAs. Raw PCA object used to calculate the estimates. Rotation direction is not changed
fullPCAs. Raw PCA object with all marker genes before their removal by removeMinority
and seekConsensus
options.
removedMarkerRatios. Ratio of markers removed by removeMinority
and seekConsensus
options.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.