Rserve and the R plugin for PLINK - ohsu-comp-bio/cedar-gwas GitHub Wiki
Install Rserve (using R cmd prompt):
install.packages("Rserve")
Run Rserve daemon:
R CMD Rserve
Example function:
Rplink <- function(PHENO,GENO,CLUSTER,COVAR)
{
f1 <- function(s)
{
m <- glm( PHENO ~ s , family="binomial" )
r <- summary(m)$coef[8]
c( length(r) , r )
}
apply( GENO , 2 , f1 )
}
Running R-plugin with custom function:
plink --file mydata --R myscript.R