f.create.snp.names {Haplin}R Documentation

Intern function for creating column names for genotype data

Description

Creating column names either from a .map file or generating dummy names

Usage

f.create.snp.names(map.file, header = FALSE, ncol, format, design)

Arguments

map.file

Filename (with path if the file is not in current directory) of the .map file holding the SNP names, if available (see Details).

header

Logical: does the map.file contain a header in the first row? Default: FALSE.

ncol

Number of columns IN TOTAL in the dataset containing only the genotype data

format

Format of data (will influence how data is processed) - choose from:

  • haplin - data already in one row per family,

  • ped - data from .ped file, each row represents an individual.

.

design

The design used in the study - choose from:

  • triad - (default), data includes genotypes of mother, father and child;

  • cc - classical case-control;

  • cc.triad - hybrid design: triads with cases and controls

.

Details

If the .map file is given, the SNP names are read in, if not dummy names are created by attaching numbers to "m" prefix. Then, a "_a" and "_b" suffix is attached to each allele, respectively. Finally, if the design is "triad" or "cc.triad", the following suffixes are attached: "_m" for the mother's alleles, "_f" for the father's, and "_c" for the child's.

Value

A list containing:

Details

The .map file should contain at least two columns, where the second one contains SNP names. Any additional columns should be separated by a whitespace character, but will be ignored. The file should contain a header.


[Package Haplin version 7.3.2 Index]