Description Usage Arguments Author(s) References Examples
View source: R/phrapl-utilities.R
This function reads a Structure file for SNPs. It assumes you have states 1 and 2 and that missing data is encoded as -9.
It returns a list with three objects:
$snps the data to pass into ConvertStructureDataToTrees
$sample.names the first column of sample names
$populations the second column in the original data, assumed (but not required) to be population names.
1 |
file |
A file with the structure data |
pairs |
If 0, take all columns and rows. If 1, assume individuals are repeated on rows and so you should sample one row at random per site. If 2, assume individuals are represented as duplicated columns, so choose samples at random. |
Brian O'Meara, Bryan Carstens, Nathan Jackson, Ariadna Morales-Garcia
Maintainer: Brian O'Meara <bomeara@utk.edu>
O'Meara, B.C., N. Jackson, A. Morales-Garcia, and B. Carstens (2014) Phrapl in prep.
1 | #snptrees <- ConvertStructureDataToTrees(ReadStructureData(file="mydata")$snps)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.