| projectR | R Documentation |
A function for the projection of new data into a previously defined feature space.
projectR(data, loadings, dataNames = NULL, loadingsNames = NULL, ...)
## S4 method for signature 'matrix,matrix'
projectR(
data,
loadings,
dataNames = NULL,
loadingsNames = NULL,
NP = NA,
full = FALSE,
bootstrapPval = FALSE,
bootIter = 1000
)
## S4 method for signature 'dgCMatrix,matrix'
projectR(
data,
loadings,
dataNames = NULL,
loadingsNames = NULL,
NP = NULL,
full = FALSE,
chopBy = 1000
)
## S4 method for signature 'matrix,LinearEmbeddingMatrix'
projectR(
data,
loadings,
dataNames = NULL,
loadingsNames = NULL,
NP = NA,
full = FALSE,
model = NA,
bootstrapPval = FALSE,
bootIter = 1000
)
## S4 method for signature 'matrix,prcomp'
projectR(
data,
loadings,
dataNames = NULL,
loadingsNames = NULL,
NP = NA,
full = FALSE
)
## S4 method for signature 'matrix,rotatoR'
projectR(
data,
loadings,
dataNames = NULL,
loadingsNames = NULL,
NP = NA,
full = FALSE
)
## S4 method for signature 'matrix,correlateR'
projectR(
data,
loadings,
dataNames = NULL,
loadingsNames = NULL,
NP = NA,
full = FALSE,
bootstrapPval = FALSE,
bootIter = 1000
)
## S4 method for signature 'matrix,hclust'
projectR(
data,
loadings,
dataNames = NULL,
loadingsNames = NULL,
full = FALSE,
targetNumPatterns,
sourceData,
bootstrapPval = FALSE,
bootIter = 1000
)
## S4 method for signature 'matrix,kmeans'
projectR(
data,
loadings,
dataNames = NULL,
loadingsNames = NULL,
full = FALSE,
sourceData,
bootstrapPval = FALSE,
bootIter = 1000
)
## S4 method for signature 'matrix,cluster2pattern'
projectR(
data,
loadings,
dataNames = NULL,
loadingsNames = NULL,
full = FALSE,
sourceData,
bootstrapPval = FALSE,
bootIter = 1000
)
data |
Target dataset into which you will project. It must of type matrix. |
loadings |
loadings learned from source dataset. |
dataNames |
a vector containing unique name, i.e. gene names, for the rows of the target dataset to be used to match features with the loadings, if not provided by |
loadingsNames |
a vector containing unique names, i.e. gene names, for the rows ofloadings to be used to match features with the data, if not provided by |
... |
Additional arguments to projectR |
NP |
vector of integers indicating which columns of loadings object to use. The default of NP=NA will use entire matrix. |
full |
logical indicating whether to return the full model solution. By default only the new pattern object is returned. |
bootstrapPval |
logical to indicate whether to generate p-values using bootstrap, not available for prcomp and rotatoR objects |
bootIter |
number of bootstrap iterations, default = 1000 |
chopBy |
number of columns to chop the data into (chopping helps runnning large datasets) |
model |
Optional arguements to choose method for projection |
targetNumPatterns |
desired number of patterns with hclust |
sourceData |
data used to create cluster object |
loadings can belong to one of several classes depending on upstream
analysis. Currently permitted classes are matrix, CogapsResult,
CoGAPS, pclust, prcomp, rotatoR,
and correlateR. Please note that loadings should not contain NA.
A matrix of sample weights for each input basis in the loadings matrix (if full=TRUE, full model solution is returned).
projectR(data=p.ESepiGen4c1l$mRNA.Seq,loadings=AP.RNAseq6l3c3t$Amean,
dataNames = map.ESepiGen4c1l[["GeneSymbols"]])
library("CoGAPS")
# CR.RNAseq6l3c3t <- CoGAPS(p.RNAseq6l3c3t, params = new("CogapsParams", nPatterns=5))
projectR(data=p.ESepiGen4c1l$mRNA.Seq,loadings=CR.RNAseq6l3c3t,
dataNames = map.ESepiGen4c1l[["GeneSymbols"]])
pca.RNAseq6l3c3t<-prcomp(t(p.RNAseq6l3c3t))
pca.ESepiGen4c1l<-projectR(data=p.ESepiGen4c1l$mRNA.Seq,
loadings=pca.RNAseq6l3c3t, dataNames = map.ESepiGen4c1l[["GeneSymbols"]])
pca.RNAseq6l3c3t<-prcomp(t(p.RNAseq6l3c3t))
r.RNAseq6l3c3t<-rotatoR(1,1,-1,-1,pca.RNAseq6l3c3t$rotation[,1:2])
pca.ESepiGen4c1l<-projectR(data=p.ESepiGen4c1l$mRNA.Seq,
loadings=r.RNAseq6l3c3t, dataNames = map.ESepiGen4c1l[["GeneSymbols"]])
c.RNAseq6l3c3t<-correlateR(genes="T", dat=p.RNAseq6l3c3t, threshtype="N",
threshold=10, absR=TRUE)
cor.ESepiGen4c1l<-projectR(data=p.ESepiGen4c1l$mRNA.Seq, loadings=c.RNAseq6l3c3t,
NP="PositiveCOR", dataNames = map.ESepiGen4c1l[["GeneSymbols"]])
library("projectR")
data(p.RNAseq6l3c3t)
nP<-3
kClust<-kmeans(t(p.RNAseq6l3c3t),centers=nP)
kpattern<-cluster2pattern(clusters = kClust, NP = nP, data = p.RNAseq6l3c3t)
p<-as.matrix(p.RNAseq6l3c3t)
projectR(p,kpattern)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.