Learn R Programming

paramlink (version 0.3-1)

linkdat: linkdat objects

Description

Functions to create and display 'linkdat' objects.

Usage

linkdat(x, model=NULL, verbose=TRUE, missing=0)

## S3 method for class 'linkdat':
print(x, ..., markers)

## S3 method for class 'linkdat':
summary(object, ...)

## S3 method for class 'linkdat':
as.data.frame(x, ..., famid=F, markers=seq_len(x$nMark), alleles=NULL, 
        missing=NULL, singleCol=FALSE)

Arguments

x, object
a linkdat object, or a matrix/data.frame. In the latter case, x should contain containing columns corresponding to those indicated above. The order of the columns must be correct, as column names are ignored.
model
a linkdat.model object (typically y$model for some linkdat object y), or a single integer with the following meaning: 1 = autosomal dominant; 2 = autosomal recessive; 3 = X-linked dominant; 4 = X-linked recessive.
verbose
a logical; verbose output or not.
markers
a numeric indicating which markers should be included.
famid
a logical indicating if the family identifier should be included as the first column.
alleles
a character containing the allele names, e.g. alleles=c("A","B").
missing
a character of length 1 indicating how missing alleles should be represented.
singleCol
a logical: Should the two alleles for each marker be pasted into one column or kept in separate columns?
...
further arguments.

Value

  • A linkdat object, which is essentially a list with some or all of the following entries:
  • pedigreedata.frame describing the pedigree in standard linkage format, i.e. one row for each individual and 5 columns: ID, FID, MID, SEX, AFF.
  • orig.idsthe original individual id labels
  • nIndthe number of individuals in the pedigree
  • foundersvector of the founder individuals (NB: Internal labeling used)
  • nonfoundersvector of the nonfounder individuals (NB: Internal labeling used)
  • subnucslist containing all (maximal) nuclear families in the pedigree. Each nuclear family is given as a vector of the form c(pivot, father, mother, child1, ...), where the pivot is either the id of the individual linking the nuclear family to the rest of the pedigree, or 0 if there are none. (NB: Internal labeling used)
  • markerdatamatrix containing the markerdata
  • nMarkthe number of markers
  • sima numeric vector indicating the simulation status for each individual, using the standard SLINK codes: 2 if genotypes should be simulated for the individual, 0 if not. (This peculiar set of possible values stems from the original SLINK program, where the values 1 and 3 were used as well.)
  • modela linkdat.model object, essentially a list containing the model parameters. See setModel for details
  • initial_probsonly if markers are diallelic (i.e. if x$model$nallel==2) - a list of length nInd containing "initial" haplotype probabilities for each individual, given the penetrance values and allele frequencies

Details

A linkdat object is a list whose entries describe a single medical pedigree. Internally the individuals are relabeled as 1,2,..., but this should rarely be of concern to the end user. Some pedigree checking is done, but it is recommended to plot the pedigree before doing any analysis.

See Also

setModel, read.linkdat, write.linkdat

Examples

Run this code
data(toyped)
toyped
x=linkdat(toyped, model=1)
x
summary(x)

Run the code above in your browser using DataLab