Learn R Programming

Haplin (version 7.3.2)

toDataFrame: Stack dataframes from haplinSlide into a single dataframe

Description

When haplinSlide is run with the option table.output = T, the result is a list of haptables, i.e. tables with summary haplin results for each window haplinSlide is run on. toDataFrame stacks the separate dataframes into one large dataframe containing all results.

Usage

toDataFrame(x, reduce = F)

Value

The output is a dataframe. First column contains the marker names. Second column are row numbers, counted within each output table. The remaining columns are identical to the individual output columns, which are described in more detail in the help file for haptable.

Arguments

x

The output from haplinSlide run with option table.output = TRUE.

reduce

Reduce output to one line per marker

Author

Hakon K. Gjessing
Professor of Biostatistics
Division of Epidemiology
Norwegian Institute of Public Health
hakon.gjessing@uib.no

Details

When haplinSlide is run with winlength = 1 on SNP markers, each table in the output has only two rows, and can be condensed to a single row. By setting the argument reduce to TRUE, toDataFrame reduces each table to one line and returns a dataframe with one line for each SNP. In more general situations, with multi-allelic markers or, more commonly, winlength set to 2 or more, each output table will typically have more than two rows and cannot be reduced, so reduce should be set to FALSE.

References

Gjessing HK and Lie RT. Case-parent triads: Estimating single- and double-dose effects of fetal and maternal disease gene haplotypes. Annals of Human Genetics (2006) 70, pp. 382-396.

Web Site: https://haplin.bitbucket.io