Description Usage Arguments Value Examples
View source: R/preprocessing.R
Removing Confounding Factor Effects using SVA
1 |
mat |
a numeric matrix with the expression values, where columns are the samples and rows are probesets, transcripts, or genes. |
age |
a numeric vector, where the names correspond to samples (the same as colnames of the given matrix). |
cov |
covariates to analyse SVs. |
a list with i) a numeric matrix with the expression values, ii) SVs for each sample, and iii) correlation between SVs and covariates
1 2 3 4 5 6 7 8 9 10 11 | sampnames = paste('sample',1:20,sep='')
myexp <- sapply( 1:20, function(i){ rnorm(n = 10000, mean = sample(1:3, 1), sd = sample(c(1, 3), 1)) })
colnames(myexp) = sampnames
agevec <- sample(20:80,20)
names(agevec) = sampnames
result_mat <- cfr_sva(myexp,agevec)
print(myexp[1:5,1:5])
print(result_mat$correctedExp[1:5,1:5])
dim(result_mat$correctedExp)
head(result_mat$SVs)
head(result_mat$SV_cov_corr)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.