# NOT RUN {
data(crossLab)
#Design matrix containing information about which runs are technical replicates of each other.
#In this case, random pairings of mass-spec runs analysing the same sample, at different sites.
#Note that we specify no intercept term!
M <- model.matrix(~ grouping - 1, data = peptideData)
#Get out the list of peptides, both HEK (control) and peptides of interest.
peptides <- setdiff(colnames(peptideData), c("filename", "site", "mixture", "Date", "grouping"))
#Reduce the data matrix to only the peptide data
onlyPeptideData <- data.matrix(peptideData[, peptides])
#All the human peptides are potential controls. That is, everything that's not an SIS peptides.
potentialControls <- setdiff(peptides, sisPeptides)
#But we want to use controls that are *often* found
potentialControlsOftenFound <- names(which(apply(onlyPeptideData[, potentialControls], 2,
function(x) sum(is.na(x))) <= 10))
#Set number of threads for CRAN
try(RUVIIIC::omp_set_num_threads(2L), silent=TRUE)
#Actually run correction
# }
# NOT RUN {
results <- RUVIII_C_Varying(k = 11, Y = log10(onlyPeptideData), M = M, toCorrect =
colnames(onlyPeptideData), potentialControls = potentialControlsOftenFound)
# }
Run the code above in your browser using DataLab