Understanding of shared ancestry in genetic datasets is almost always key to their interpretation. The fineSTRUCTURE package (Lawson et al., 2012) represents a powerful model-based approach to investigating population structure using genetic data. It offers especially high resolution in inference of recent shared ancestry, as evidenced for example in its application to investigation of genetic structure of the British population (Leslie et al., 2015). The high resolution of this method derives from utilizing haplotype linkage information and from focusing on the most recent coalescence (common ancestry) among the sampled individuals to derive a "co-ancestry matrix" - a summary of nearest neighbor haplotype relationships in the dataset. Further advantages when compared with other model-based methods (e.g. STRUCTURE and ADMIXTURE) include the ability to deal with a very large number of populations, explore relationships between them, and to quantify ancestry sources in each population.
The existing pipeline for co-ancestry matrix inference was designed to meet the needs of analyzing large scale human genetic SNP datasets, where chromosomal location of the markers are known and haplotypes are typically assumed to be correctly phased. Therefore, these methods have so far been inaccessible to users without high quality genome-wide haplotypes.
Here we present RADpainter, a program designed specifically to infer the co-ancestry matrix from RAD-seq data, taking full advantage of its unique features. We package this new program together with the fineSTRUCTURE MCMC clustering algorithm into fineRADstructure - a complete, easy to use, and fast population inference package for RAD-seq data.
The fineRADstructure package is available to download here and should work on most UNIX like system (including Linux and OSX/Apple).
Mac/Apple users need to have the Command Line Tools installed on their machine to run "configure" and "make".
- Uncompress/open the package (e.g.
tar -xvzf fineRADstructure.tar.gz)
- Enter the unpacked folder:
- Run configure:
- Run make:
- Calculate the co-ancestry matrix:
./RADpainter paint INPUT_RAD_FILE.txt
- Assign individuals to populations:
./finestructure -x 100000 -y 100000 -z 1000 INPUT_RAD_FILE_chunks.out INPUT_RAD_FILE_chunks.mcmc.xml
- Tree building:
./finestructure -m T -x 10000 INPUT_RAD_FILE_chunks.out INPUT_RAD_FILE_chunks.mcmc.xml INPUT_RAD_FILE_chunks.mcmcTree.xml
The input file (
INPUT_RAD_FILE.txt) should be in one of the three following fomats:
In all cases, rows correspond to RAD loci. Data columns correspond to individual haplotype calls (only sites variable in the dataset are needed). The program assumes all individuals are diploid: if the two alleles are the same (e.g.
export_sql.pl output (
-a haplo -o tsv -F snps_l=1): Example
- Tag Haplotype Matrix (for unmapped data): Example
- Chromosome/scaffold + Tag Haplotype Matrix (for mapped data): Example
TGAT/TGAT) they can be collapsed (to just
TGAT), if not then both alleles need to be fully specified (e.g.
TGAT/CGAT). Missing data is left blank (see the examples above).
Important note: The amount of missing data should not vary too much across individuals (remove outliers if necessary) or systematically between putative populations.
If you have R installed (and are a bit familiar with it) then the easiest way to plot the results may be using our R scripts: fineRADstructurePlot.R and FinestructureLibrary.R (download both and follow the intructions in the first one). These scripts are a simplified version of the Daniel Lawson's scripts from the finestructure website).
Alternatively you can try to install and use the fineStructure GUI
Please write to Milan Malinsky: mm812 at cam.ac.uk