Description Usage Arguments Details Value Examples
Read data, based on one row of information_df, then use aclust methods to select cpgs as predictors fit glmnet elastic net, caret random forest or support vector machine model and evaluate its prediction performance.
1 2 3 4 |
rowNum |
num of row in information_df |
Beta_df |
Beta_df is a data frame that each row is a cpg probe, each col is a sample id, each cell is a Beta value, first column is the phenodata, please make sure this column is a factor with levels, or we can not ensure accuracy of the results |
beta2M |
whether transfre beta to m value before prediction |
respCol_index |
response variable col number in beta data frame |
designInfo_df |
information df generate by summaryInfo function |
chromeAnnot_ls |
list that contains 22 chrome annot probe information |
alphaValue |
vector that storage alpha values |
ncores |
number of cores to do parallel computing |
chooseCpGs |
what cpg selection method to use, use full cpgs fullCpGs within cluster or PC1 score getPC1 of cluster or maximum maxCpGs expression score, default set to fullcpgs, it is feasible to write new methods by adding a new function that take in train/test dataset and cpglist then return a list of train and test subset data. |
predictMethod |
what prediction method to use |
outcome_type |
type of outcome variable, gauusian or binomial or poisson, etc |
save |
whether to save the results |
resultPath |
path to storage results |
Elastic net from function glmnet to do prediction
Random Forest from function train to do prediction(requires package "randomForest" installed first)
Support Vector Machine from function train to do prediction(requires package "kernlab" installed)
return a list with three elements,
first element is the fit model results of different prediction methods
Second item second element is the data frame that contains evalutation parameters of
different prediction methods' performace:
for glmnet net, the data frame has row number equal to number of alpha
values given in the function argument times 16 columns with different
evaluation parameters including NumOfRep,NumOfCv, auc_results,
Sensitivity, Specificity, etc;
for random forest and support vector machine, the data frame has one
row times 14 columns with different evaluation parameters including
NumOfRep,NumOfCv, auc_results, Sensitivity, Specificity, etc
third element is a vector that indicate number of predictors used
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | ## Not run:
data(Example_df)
data(pfcInfo_df)
test1 <- pipeCometh(
rowNum = 10,
Beta_df = Example_df,
beta2M = TRUE,
respCol_index = 1,
designInfo_df = pfcInfo_df,
alphaValue = seq(0, 1, by = 0.1),
ncores = 2,
chooseCpGs = fullCpGs,
predictMethod = "glmnet",
outcome_type = "binomial",
save = FALSE,
resultPath = NULL
)
test2 <- pipeCometh(
rowNum = 10,
Beta_df = Example_df,
beta2M = TRUE,
respCol_index = 1,
designInfo_df = pfcInfo_df,
chromeAnnot_ls = chrome_annot_files,
alphaValue = seq(0, 1, by = 0.1),
ncores = 2,
chooseCpGs = getPC1,
predictMethod = "glmnet",
outcome_type = "binomial",
save = FALSE,
resultPath = NULL
)
test3 <- pipeCometh(
rowNum = 10,
Beta_df = Example_df,
beta2M = TRUE,
respCol_index = 1,
designInfo_df = pfcInfo_df,
chromeAnnot_ls = chrome_annot_files,
alphaValue = seq(0, 1, by = 0.1),
ncores = 2,
chooseCpGs = maxCpGs,
predictMethod = "glmnet",
outcome_type = "binomial",
save = FALSE,
resultPath = NULL
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.