Learn R Programming

GWAF (version 2.0)

auto: function to generate scripts for genome-wide association/interaction analysis

Description

Given a path/directory (genopath) that keeps geotype files, phenotype file, pedigree file, phenotype of interest, covariates, analysis of interest (can be 'lme', 'lme.imputed', 'geepack', 'geepack.imputed', 'geepack.quant', 'geepack.quant.imputed', 'lme.int', 'lme.int.imputed', 'geepack.int', 'geepack.int.imputed', 'geepack.quant.int', 'geepack.quant.int.imputed') and other arguments, auto function generates one R script, one shell script that can excute R script, and one list file that can excute all shell scripts in batch mode, for each genotype file. Once the list file (XXXX.lst) is generated, user can use ksh XXXX.lst to submit all jobs to test all SNPs in genopath.

Usage

auto(genopath, phenfile, pedfile, outfile, phen, covars, cov.int, sub="N", analysis, lib.loc, model = NULL, 
kinmat = NULL, col.names = F, sep.ped = ",", sep.phe = ",", sep.gen = ",")

Arguments

Value

No value is returned. Instead, results are written to outfile.

Details

auto function generates one R script, one shell script that can excute R script, and one list file that can excute all shell scripts in batch mode. These scripts are named based on the phenotype of interest, the analysis of interest and the time these scripts are generated. After generating these scripts, auto function genertates a message telling the user how to submit ALL the jobs (using ksh XXXX.lst). When a submitted job is completed, a log file indicating which genotype file was analyzed will be generated and the R script and the shell script will be removed. The number of log files should equal to the number of genotype files, if all jobs are completed. All the results will be written and appended to the user specified single output file. Different outfile should be assigned for different genopath to avoid over-writting.