#******************************************************************************************************** # This is a wrapper for computing the phenotypic variance of a continuous trait given a set of SNPs #******************************************************************************************************** # read arguments args <- commandArgs() file <- args[6] totalN <- as.numeric(args[7]) # read the association file assoc <- read.table(file,h=T) zvec <- assoc$STAT # load the original R script source("correction_z_for_continuoustrait(H1removed).R") # compute the variance explained by SNPs Vg <- SumVg.cont(zall=zvec,totalN) c("Vg(sum.kernel)", Vg)