Closed BenjaminPeter closed 9 years ago
I have added an option to read the population grid from two input files: gridpath.demes
and gridpath.edges
. The assignment of samples to demes has to be provided as well in gridpath.ipmap
.
x and y (longitude and latitude) coordinate of each deme, with implicit indexing -- the line number is the deme id. The demes file has nDemes
rows, 2 cols. That is, just as Ben described it.
pairs of connected demes, using the implicit indexing in the demes file. The edges file has nEdges
rows, 2 cols. It would be easy to provide a grid that is not triangular -- though, it must be connected. The edges file would look something like this (note that the indexing start at 1):
1 87 1 72 72 87 72 88 72 2 2 88 2 89 2 73
the deme each individual is assigned to. The individuals are implicitly indexed -- the line number is the individual id. The integers are the corresponding deme id's. The ipmap file has nIndiv
rows, 1 col.
1 1 1 2 2 2 3
To use the grid and assignment described by these three files, use the option gridpath = xxxxx
in the parameter input file (*.ini).
It might be useful at some point to define custom grid points outside the eems executable.
We were talking about grid input formats, I suppose the easiest would be to use the same format as is currently output in demes.txt and edges.txt, i.e.
demes.txt:
x and y coordiante of deme location, implicit indexing (
n_demes
rows, 2 cols)edges.txt:
line
i
contains indeces of demes which are connected toi
, (n_demes
rows)max_n_deme
cols (max_n_deme=6?); 0 implies no connectionI guess the easiest way to implement this would be to reimplement
as the other two functions you described should be exactly the same as if the grid was constructed within eems.