Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

write.pop.file

Create genetics data files


Description

write.pop.file creates a 'pop' data file, as used by the GenePop (https://genepop.curtin.edu.au/) and LinkDos (https://genepop.curtin.edu.au/linkC.html) software packages.

write.pedigree.file creates a 'pedigree' data file, as used by the QTDT software package (http://csg.sph.umich.edu//abecasis/QTDT/).

write.marker.file creates a 'marker' data file, as used by the QTDT software package (http://csg.sph.umich.edu//abecasis/QTDT/).

Usage

write.pop.file(data, file = "", digits = 2, description = "Data from R")
write.pedigree.file(data, family, pid, father, mother, sex,
                    file="pedigree.txt")
write.marker.file(data, location, file="marker.txt")

Arguments

data

Data frame containing genotype objects to be exported

file

Output filename

digits

Number of digits to use in numbering genotypes, either 2 or 3.

description

Description to use as the first line of the 'pop' file.

family, pid, father, mother

Vector of family, individual, father, and mother id's, respectively.

sex

Vector giving the sex of the individual (1=Make, 2=Female)

location

Location of the marker relative to the gene of interest, in base pairs.

Details

The format of 'Pop' files is documented at https://genepop.curtin.edu.au/help_input.html, the format of 'pedigree' files is documented at http://csg.sph.umich.edu/abecasis/GOLD/docs/pedigree.html and the format of 'marker' files is documented at http://csg.sph.umich.edu/abecasis/GOLD/docs/map.html.

Value

No return value.

Author(s)

Gregory R. Warnes greg@warnes.net

See Also

Examples

# TBA

genetics

Population Genetics

v1.3.8.1.3
GPL
Authors
Gregory Warnes, with contributions from Gregor Gorjanc, Friedrich Leisch, and Michael Man.
Initial release
2012-11-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.