read.indiv | R Documentation |
Reads individual IDs from a genotype file.
read.indiv(file, skip=NA, cskip=NA)
file |
Name of the genotype file. |
skip |
Take line |
cskip |
Take column |
Reading individual IDs from phased marker files.
Marker file format: Each marker file containing phased genotypes has a header and no row names. Cells are separated by blank spaces. The number of rows is equal to the number of markers from the respective chromosome and the markers are in the same order as in the map
. The first cskip
columns are ignored. The remaining columns contain genotypes of individuals written as two alleles separated by a character, e.g. A/B, 0/1, A|B, A B, or 0 1. The same two symbols must be used for all markers. Column names are the IDs of the individuals. If the blank space is used as separator then the ID of each individual should repeated in the header to get a regular delimited file. The columns to be skipped and the individual IDs must have no white spaces. The name of each file must contain the chromosome name as specified in the map
in the form "ChrNAME."
, e.g. "Breed2.Chr1.phased"
.
Vector with the IDs of the individuals.
Robin Wellmann
data(Cattle)
dir <- system.file("extdata", package = "optiSel")
file <- file.path(dir, "Chr1.phased")
ID <- read.indiv(file)
identical(Cattle$Indiv, ID)
#[1] TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.