fgls() function is used for parameter estimation.gls.batch(phenfile,genfile,pedifile,outfile,covmtxfile.in=NULL,
covmtxfile.out=paste(phen,"_cov_matrix.txt",sep=""),phen,covars=NULL,
med="rfgls", sizeLab="OOPP",Mz=TRUE,Bo=TRUE,Ad=TRUE,Mix=TRUE,
indobs=TRUE,col.names=TRUE,pediheader=FALSE,
pedicolname=c("FAMID","ID","PID","MID","SEX"),
sep.phe=" ",sep.gen=" ",sep.ped=" ")NULL, then covmtxfile.in=NULL), will be written. The default is a generic filename that refers to the pheno"rfgls", the default, is implemented."OOPP", if the largest family has two offspring and both parents;"OPP", if the largest family haTRUE or FALSE). An indicator of whether Mz-twin families are in the data; must be set to FALSE if sizeLab="PP". Defaults to TRUE.FALSE if "PP". Defaults to TRUE.FALSE if "PP". Defaults to TRUE.FALSE if "PP". Defaults to TRUE.TRUE, a separate residual variance parameter will be estimated for those individuals.TRUE.TRUE, c("FAMID","ID","PID","MID","SEX"), is the familiar "pedigree table" format. The two critNULL.'FAMID'(family ID),'ID'(uniqueindividual ID),'FTYPE'(family type), and'INDIV'(individual code). The value of"FTYPE"and"FAMID"will be the same for all members of a given family. There are six recognized family types:FTYPE=1for MZ-twin,FTYPE=2for DZ-twin,FTYPE=3for adoptive-offspring,FTYPE=4for non-twin bio-offspring,FTYPE=5for "mixed" families with one bio and one adopted offspring, andFTYPE=6for "independent observations" who do not fit into a four-person nuclear family. The individual code"INDIV"represents how the subject fits into his/her family:INDIV=1is for "Offspring #1,"INDIV=2is for "Offspring 2,"INDIV=3is for the mother, andINDIV=4is for the father. Note that subjects withFTYPE=6MUST haveINDIV=1. The distinction between "Offspring #1" and "#2" is mostly arbitrary, except that in "mixed" families, the biological offspring MUST haveINDIV=1, and the adopted offspring,INDIV=2.INDIV, as: offspring, mother, father. For mixed family type, members must be ordered as: bio-offspring, adopted-offspring, mother, father. For purposes of ordering the phenotype file, subjects with the same family ID but different values forFTYPEare treated as being in different family units."OOPP", 2 offspring and 2 parents; "OO", 2 offspring; "PP", 2 parents; "OP", 1 offspring and 1 parent; and "OPP", 1 offspring and two parents. For each family structure, it handles any combination of the following family types: Mz-twin family type ("Mz"), non-Mz-twin-bio-offspring family type ("Bo"), adopted-offspring family type ("Ad"), and bio/adopted-offspring ("Mix") family type.
When one is conducting parallel analyses on a computing array, judicious use of arguments and can save time. For example, suppose one is analyzing different SNP sets in parallel but using a common phenotype file for all. In this case, one should calculate the residual variance-covariance matrix ahead of time and write it to a file. Then, use the same filename and path for argument , for all jobs running in parallel. The matrix can be calculated by using gls.batch.get() and then fgls().fgls, phenosetwd(tempdir()); getwd() #<--Temp directory to write to.
data(pheno)
data(geno)
data(pedigree)
data(resVCmtx)
gls.batch(
phenfile=pheno,
genfile=data.frame(t(geno)),
pedifile=pedigree,
outfile="example_output.txt",
covmtxfile.in=resVCmtx, #<--Precomputed, to save time.
covmtxfile.out=NULL,
phen="Zscore",covars="IsFemale",med="rfgls",sizeLab="OOPP",
Mz=TRUE,Bo=TRUE,Ad=TRUE,Mix=TRUE,indobs=TRUE,
col.names=TRUE,pediheader=FALSE,pedicolname=c("FAMID","ID","PID","MID","SEX"),
sep.phe="",sep.gen="",sep.ped="")Run the code above in your browser using DataLab