Description Usage Arguments Details Value
Simply sums every pair of rows together.
1 2 |
fn |
Filename of input file, every two rows are for same animal. |
outfn |
Filename of intended output. |
ncol |
Integer, number of SNP columns in files. When |
nlines |
Integer, maximum number of pairs of lines to convert. |
na |
Missing value. |
int |
Logical (default |
format |
Character, Fortran edit descriptors for output. See parseformat. |
A phase file has format similar to SNP files, expect the genotype on each allele are listed on two pairs of rows. Each individual has therefore two rows, one for each allele, see following example:
Genotype file:
1003 | 0 | 1 | 1 | 2 | 0 |
1004 | 1 | 1 | 0 | 1 | 0 |
Phase file:
1003 | 0 | 0 | 1 | 1 | 0 |
1003 | 0 | 1 | 0 | 1 | 0 |
1004 | 0 | 1 | 0 | 0 | 0 |
1004 | 1 | 0 | 0 | 1 | 0 |
By default assumes genotypes are whole integers (cf. int
argument).
If numeric values are required, e.g. gene dosages from imputation, use int=FALSE
.
Use format
to change from default 5 characters width and 2 decimals ("5.2"
).
NB! Function does not test for validity of this argument, so change with caution!
Missing values: Values after summing less than 0 or greater than 2 are assumed as missing and replaced with na
.
Number of rows written.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.