Learn R Programming

HapEstXXR (version 0.1-8)

read.data: Read data from different input files

Description

Data can be loaded in different formats.

Usage

read.data(filename, linkage = TRUE, map = NA)

Arguments

filename
the name of the file which the data are to be read from.
linkage
a logical value indicating whether the file is in linkage format.
map
Localizion of a map file.

Value

famid
family identifier
patid
individual identifier
fid
father identifier (0=unkown)
mid
mother identifier (0=unkown)
sex
sex (0=unkown,1=male,2=female)
genotypes
(n,m)-matrix; n=No. of individuals; m=No. of SNPs; Klaus format
trait
phenotype values
chr
chromosome
snp
snp identifier or rs id
pos
Base-pair position on chromosome (base pair units)

Details

1) single individuals (3-columns) expected columns Individual identifier genotype STRING (1=homozygot (wildtype) 2=homozygot (variant) 3=heterozygote 0=missing value) >> Example: "1223" "3023" phenotype 2) family data (4-columns) expected columns Family identifier Individual identifier genotype (1=homozygot (wildtype) 2=homozygot (variant) 3=heterozygote 0=missing value) >> Example: "1223" "3023" phenotype Remark 1: patid should not be 0 because 0 is unkown value for fid and mid. Remark 2: Families are sorted. First two person in a family are adults (father and then mother) and after that all children. 3) Linkage format is expected, if linkage=TRUE : Family identifier Individual identifier Father identifier (0=unkown) Mother identifier (0=unkown) Sex (0=unkown,1=male,2=female) Affectation_status (0=unkown,1=unaffected,2=affected) or trait_value Marker_genotypes (M1_A1 M1_A2 M2_A1 ...) >> only 1, 2, or 0 for missing values 4) map file (4-columns), if specified: chromosome (1-22, only autosomes) snp identifier Genetic distance (morgans) Base-pair position (bp units)