Learn R Programming

hsphase (version 3.0.0)

cs: Chromosome Splitter

Description

Splits the genotype list generated by hss into chromosomes based on a map file/data.frame and orders SNPs by chromosomal position.

Usage

cs(halfsib, mapPath, separator = " ")

Value

Returns a list of matrices, the number of elements in this list is the number of half-sib families multiplied by the number of chromosomes.

Arguments

halfsib

list. List of genotype matrices (one family per list item).

mapPath

character path to the map file (column 1 -> SNP names, column 2 -> chromosome name and column 3 -> SNP position in base pairs) or, alternatively, the name of a dataframe with the mapping information (in the same format)

separator

character. Field separator for the map file.

Details

The map file should include only the chromosomes that will be analyzed. For example, the Y and X chromosomes should be excluded (and others optionally). Names of each element in the list can be used for further categorization. The header must be "Name Chr Position".

Examples

Run this code
# Please run demo(hsphase)

Run the code above in your browser using DataLab