Learn R Programming

rJPSGCS (version 0.2-7)

FitGMLD: estimate a graphical model for linkage disequilibrium

Description

This function is an R wrapper for the JPSGCS program to estimate a graphical model for linkage disequilibrium (LD) from a sample of genotypes. The genetic markers are assumed to be on the same chromosome.

Usage

FitGMLD(par = "input.par", fped = "flipped.ped", out.ld.par = "out.ld.par")

Arguments

par
Name of a LINKAGE parameter file (also called a DATAFILE: see http://linkage.rockefeller.edu/soft/linkage/) that contains marker and genetic map information.
fped
Name of a LINKAGE pedigree file ``flipped'' so that rows correspond to loci and columns correspond to individuals.
out.ld.par
Name of the file in the current working directory to contain the fitted LD model.

Value

None. The result of the function call is the output file out.ld.par.

Details

The input pedigree file fped is not the standard format where rows correspond to individuals and columns to loci. Rather, it has been transposed so that rows correspond to loci. Transposed LINKAGE pedigree files may be written by the write.pedfile function with the option transpose=TRUE.

Further information on the graphical model is available from the program's description on the JPSGCS website: http://balance.med.utah.edu/wiki/index.php/FitGMLD

References

http://balance.med.utah.edu/wiki/index.php/FitGMLD

See Also

write.parfile, write.pedfile

Examples

Run this code
## Not run: 
# data(exdat)
# sdat<-as(exdat$markers,"snp.matrix") #coerce to snp.matrix
# # Write a LINKAGE parameter file 
# write.parfile(snp.data=sdat,map=exdat$map,file="test.par")
# # Write a "flipped" pedfile for the SNP data on unrelated subjects.
# write.pedfile(pedinf="unrelated",snp.data=sdat,file="ftest.ped",transpose=TRUE)
# FitGMLD(par="test.par",fped="ftest.ped",out.ld.par="test.ld.par")
# # Clean up
# unlink(c("test.par","ftest.ped","test.ld.par"))
# ## End(Not run)

Run the code above in your browser using DataLab