Description Usage Arguments Value See Also Examples
View source: R/FeatureSelection.R
Logistic regression-based feature selection approach.
1 2 3 4 5 6 7 8 9 10 11 12 |
input.dir |
[character] The full absolute path to the directory containing the training and test dataset. If |
output.dir |
[character] The full absolute path where the result will be written to. If |
genotype |
[character] The prefix of PLINK binary files (bed/bim/fam). |
phenotype |
[character] A space- or tab-delimited file to specify an alternate phenotype for the logistic regression analysis using the " |
plink.path |
[character] The full absolute path to the PLINK executable file. The executable to run is path/to/plink.exe if you are on a Windows operating system, for Unix-like operating system this is path/to/plink. If |
topK |
[numeric] To specify the top K significant SNPs to build a prediction model. For a fair comparison, the number of the top-ranked SNPs from entire sample (for LR and PRS model) equals to the number of the unique union set of the selected SNPs from each stratum in PV. The default value is 10. This value is ignored when P.value or candidate.SNPs is not NULL. |
P.value |
[double] To specify the genome-wide significance P-value threshold to select the significant SNPs to build a prediction model. The default value is NULL. This value is ignored when candidate.SNPs is not NULL. When left NULL (the default), the topK or candidate.SNPs will be used. The P-value of each SNP is calculated from logistic regression analysis using PLINK 1.9 (via |
candidate.SNPs |
[vector] A character vector of SNP name, used to specify the candidate SNPs to build a prediction model, ignores |
verbose |
[logical] If TRUE, the PLINK log, error, and warning information are printed to standard out. The default value is TRUE. |
feature.selection
return a list containing the results of logistic regression analysis derived from PLINK (via plink.lr
), the indices and names of selected features.
lr.result |
The output of |
index |
A vector of indices of the selected features. |
name |
A vector of names of the selected features. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | input.dir <- system.file("extdata", package="pv")
output.dir <- system.file("extdata", package="pv")
path2plink <- '/path/to/plink'
## Not run:
feature.selection.result <- feature.selection(input.dir = input.dir,
output.dir = output.dir,
genotype = "train",
phenotype = "train.phenotypes.txt",
covar.number = c(2, 3),
plink.path = path2plink,
topK = 10,
verbose = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.