1 #ifndef DATA_INCLUDE 2 #define DATA_INCLUDE 3 /*------------------------------------------------------ 4 Maximum likelihood estimation 5 of migration rate and effectice population size 6 using a Metropolis-Hastings Monte Carlo algorithm 7 ------------------------------------------------------- 8 D A T A R O U T I N E S 9 10 creates data structures, 11 read data (Electrophoretic loci, sequences, microsats), 12 prints data, 13 destroys data. 14 15 16 Theta(i)=4 N(i)mu 17 M(ji) = m(ji)/mu 18 4 N(i)m(ji) = Theta(i)M(ji) 19 20 *----------------------------------------------------------------- 21 Bayesian and Maximum likelihood estimation of migration rates 22 using coalescent trees 23 24 Peter Beerli 25 Department of Scientific Computing 26 Florida State University 27 Tallahassee, FL 32306-4120 28 beerli@fsu.edu 29 30 31 Copyright 1997-2002 Peter Beerli and Joseph Felsenstein 32 Copyright 2003-2008 Peter Beerli 33 Copyright 2009-2012 Peter Beerli and Michal Palczewski 34 35 Permission is hereby granted, free of charge, to any person obtaining a copy 36 of this software and associated documentation files (the "Software"), to deal 37 in the Software without restriction, including without limitation the rights 38 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 39 of the Software, and to permit persons to whom the Software is furnished to do 40 so, subject to the following conditions: 41 42 The above copyright notice and this permission notice shall be included in all copies 43 or substantial portions of the Software. 44 45 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 46 INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 47 PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 48 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 49 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 50 OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 51 52 $Id: data.h 2126 2013-01-09 03:33:51Z beerli $ 53 54 *---------------------------------------------------------------- 55 */ 56 57 #include "migration.h" 58 59 void create_data (data_fmt ** data); 60 void get_data (FILE * infile, data_fmt * data, option_fmt * options, world_fmt *world); 61 void print_data (world_fmt * world, option_fmt * options, 62 data_fmt * data); 63 void print_spectra(world_fmt * world, option_fmt * options,data_fmt * data); 64 void print_data_summary (FILE * file, world_fmt * world, 65 option_fmt * options, data_fmt * data); 66 long find_missing(data_fmt *data, long pop, long locus); 67 short findAllele (data_fmt * data, char s[], long locus); 68 void free_datapart (data_fmt * data, option_fmt * options, long locus); 69 void read_distance_fromfile (FILE * dfile, long tips, long nmlength, 70 MYREAL **m); 71 void read_geofile (data_fmt * data, option_fmt * options, long numpop); 72 73 void init_data_structure1 (data_fmt ** data, option_fmt * options); 74 void init_data_structure2 (data_fmt ** data, option_fmt * options, 75 long pop); 76 void init_data_structure3 (data_fmt * data, option_fmt *options); 77 MYREAL create_alleles (data_fmt * data, option_fmt * options); 78 void set_numind (data_fmt * data); 79 80 long max_shuffled_individuals(option_fmt *options, data_fmt *data, long pop, long locus); 81 82 long number_genomes (int type); 83 void destroy_data(data_fmt * data); 84 85 #endif /*DATA_INCLUDE */ 86