Learn R Programming

paramlink (version 0.2-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=seq_len(x$nMark))

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

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

## S3 method for class 'linkdat':
subset(x, subset=1:x$nInd, ..., markers=seq_len(x$nMark))

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. In each of t
verbose
a logical; verbose output or not.
markers
a numeric indicating which markers should be included.
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?
subset
a numeric containing the individuals in the sub-pedigree to be extracted.
...
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.
  • oldidthe original individual id labels
  • nIndthe number of individuals in the pedigree
  • foundersvector of the founder individuals
  • nonfoundersvector of the nonfounder individuals
  • 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.
  • markerdatamatrix containing the markerdata
  • nMarkthe number of markers
  • simvector indicating simulation status (0 or 2) of each individual
  • modela linkdat.model object, essentially a list containing the model parameters. See setModel for details
  • initial_probsonly if markers are biallelic (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. The individuals are relabeled as 1,2,..., but the original IDs are stored in x$oldid. Very little pedigree checking is done. It is recommended to plot the pedigree before doing any analysis. The simulation status column uses standard SLINK codes: 2 if genotypes should be simulated for the individual, 0 if not. (This peculiar set of possible values stem from the original SLINK program, in which values 1 and 3 were also meaningful.)

See Also

setModel, read.linkdat, write.linkdat

Examples

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

y=subset(x, subset=1:3)
y
as.data.frame(y)
summary(y)

Run the code above in your browser using DataLab