Skip to content
This repository was archived by the owner on Oct 12, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
301 commits
Select commit Hold shift + click to select a range
1240ea5
Merge pull request #18 from DL42/ancestral_sample
molpopgen Feb 5, 2018
8d5ab81
Merge branch 'dev' into ancestral_sample
DL42 Feb 6, 2018
a49c6fd
starting c++ ancestral sampling, adding mutation struct
DL42 Feb 15, 2018
fa264e5
adding mutations to ancestry_tracker.hpp
Feb 17, 2018
41e0dc8
adding mutations to wfarg, changing description of EdgesetTable to Ed…
Feb 21, 2018
918e85a
gitignore
DL42 Feb 21, 2018
ba4794f
changed mutation structure to store node_id and the invariant positio…
Feb 23, 2018
5a43670
adding new handler for combined recombination/mutation, remove old ha…
Mar 3, 2018
778bcee
changing from recmodel to generate_breakpoints
Mar 6, 2018
8246c74
adding mutations via generate_new_mutations rather than mutate_gamete…
Mar 6, 2018
cdd3cd6
adding mutations to handle_mut_rec
Mar 7, 2018
3474825
add KTfwd namespace to generate_new_mutations and breakpoints function
DL42 Mar 8, 2018
61a42e5
change recombine_gametes to mutate_recombine
DL42 Mar 8, 2018
938a638
removal of update_indexes
DL42 Mar 12, 2018
e5aee32
clear mutations after gc
DL42 Mar 15, 2018
2cbae5e
adding mutation tables to argsimplifier
DL42 Mar 15, 2018
7c19646
remove multithreaded versions (for now)
Mar 19, 2018
5343b4b
modified call to accept pop instead of generation
Mar 19, 2018
f600dee
move final simplification to inside wright_fisher_single_thread
Mar 21, 2018
098c372
bug fixes to let code run (no mutations present - current setting in …
Mar 21, 2018
5d98e3d
program run when testing w/ mutations
Mar 21, 2018
a4c9249
simplify sites and mutations for final sample
Mar 21, 2018
390333e
call recombination model directly, which avoids a fwdpp-based idiosyn…
molpopgen Mar 21, 2018
953efbf
import pickle and fix call to get numpy rep of pop's mutationsm
molpopgen Mar 21, 2018
70ad2f3
Merge pull request #1 from ThorntonLab/ancestral_sample
DL42 Mar 21, 2018
4d0cd0c
added comment describing pickling pattern of mutations
DL42 Mar 21, 2018
68234ca
amended comment describing pickling of mutations
DL42 Mar 22, 2018
e8a430c
simulate with initial_tree (for testing purposes)
Mar 23, 2018
309f109
subsume ancestry_tracker inside wright-fisher
Mar 23, 2018
62ca5fb
return to default of not simulating with initial tree
Mar 23, 2018
151acd8
fixed bug introduced in commit 309f1096c7aa27677483142687ed402f7b1b17a4
Mar 23, 2018
44585b2
changed ancestry_tracker to store nodes in reverse time, so need to r…
Mar 23, 2018
e97c678
moves garbage collection to the end of the generation
Mar 23, 2018
c3ade5b
comment out exchange_for_async and ancestry_data (last of the async/q…
Mar 23, 2018
baf1cb8
removing extra last_gc_time and process variables from argsimplifier …
Mar 23, 2018
fc6bb80
simplified node API and usage
Mar 23, 2018
23aeff8
simplify mutation API
Mar 23, 2018
68397d4
simplify edge API and fixes no recombination bug
Mar 23, 2018
1d9d241
removed lastN from ancestry_tracker
Mar 23, 2018
721ab48
adding a vector of vector of ints (gen_pop_indexes) to store each gen…
Mar 24, 2018
830c91c
replace offspring indexes with pop_gen_indexes
Mar 24, 2018
13655bd
using pair instead of array to store node indexes for a generation
Mar 27, 2018
411a2c1
testing ancestral samples (doesn't work)
Mar 28, 2018
3913650
reorganizing python code around argsimplifier so that simulations are…
Mar 29, 2018
f673e92
renamed argsimplifier argevolver to reflect changes in API organization
Mar 29, 2018
be19716
adding a python-based gamete sampler to argevolver for taking ancestr…
Mar 31, 2018
7870331
created sampler that sample X individuals every Y generations (curren…
Apr 1, 2018
3dcaabe
added separate seed for sampler
Apr 1, 2018
0f4d79c
create and draw trees, check for mutation duplicates
Apr 2, 2018
d9b367b
fix mutation duplicate issue by independently storing mutation positi…
Apr 2, 2018
7485f4c
updating simple prototype with mutations to test msprime & mutations
Apr 6, 2018
14b3edb
preprocess mutation vector to remove mutations from the ancestry trac…
Apr 7, 2018
68eaf78
allows ancestral samples to be taken of nodes from input trees
Apr 8, 2018
f7e7a61
empty brace initialization for nodes, edges, mutations in ancestry_tr…
Apr 8, 2018
6590072
add function to preserve mutation indices of ancient samples created …
Apr 8, 2018
ee0b691
custom make_mut_queue: add mutations to the mutation queue if they ha…
Apr 9, 2018
dcc7bdc
custom update_mutations: remove mutation positions from lookup if hav…
Apr 9, 2018
3bbd8f0
Revert "allows ancestral samples to be taken of nodes from input trees"
Apr 9, 2018
7c19dd6
make total_generations an attribute of argevolver, use as one point o…
Apr 9, 2018
f6ea2b3
rearranges _anc_sampler to be a member of argevolver's __init and __c…
Apr 9, 2018
c6863e9
return pop from ArgEvolver
Apr 9, 2018
b821179
only encode mutation_id into metadata for MutationTable
Apr 9, 2018
d42cd94
prototype merge_sites function
Apr 12, 2018
c417214
preserve fixations
Apr 14, 2018
0fea204
replaces pickle with struct, packs the pos.mutation index into an int…
Apr 14, 2018
4fd3faf
remove copy of pop.mutation.array as it is no longer needed during si…
Apr 14, 2018
1dc6fa5
take in reference to pybind11 array in preserve_mutations_sample
Apr 19, 2018
0bd4db2
faster metadata creation using numpy.view (still uses struct.unpack f…
May 4, 2018
1a1e69f
update to fwdpy11 1.5: compiles, no idea if it runs
May 25, 2018
6dc232a
removed deleted files from setup.py
May 25, 2018
29de864
simulation runs
May 25, 2018
1aaef51
replaced fwdpp's infsites_popgenmut with infsites_Mutation from fwdpy11
Jun 1, 2018
6e0b465
upgraded update_mutations to match similar function in latest fwdpy11
Jun 1, 2018
566277d
adding extra diploid fields
Jun 1, 2018
4a82978
changed fitness function to multiplicative since we are removing fixa…
Jun 1, 2018
d62916c
preserve all fixations and test lookup table
Jun 5, 2018
22c065b
mcounts will be set to 0 next generation anyway as gamete_cleaner rem…
Jun 6, 2018
9d930ba
removed mutation metadata ... with the numpy view trick, storing/acce…
Jun 6, 2018
e5c5ccd
initial injection of juvenile migration code with two demes, seems to…
Jun 8, 2018
2719053
small two-population simulation with human out-of-africa demography, …
Jul 3, 2018
ccb6d13
default simulation runs
Jul 4, 2018
f73a973
expand final population size
Jul 9, 2018
9c0ba86
set migration boundaries to prevent too large/small migration
Jul 9, 2018
5830fdf
small changes
Jul 31, 2018
f7189ce
alterations to reflect underlying changes in fwdpy11 population and p…
Aug 8, 2018
2366ac5
update reflects changes in fwdpy11 diploid class (separating metadata…
Aug 8, 2018
e8ccc1f
fwdpy11 changed parental data tuple to parent array
Aug 8, 2018
248a536
error in previous commit
Aug 8, 2018
1349a71
np.random.choice gave error on linux dev machine when final_pop2_size…
Aug 8, 2018
92b8460
added extra print statement to printout number of rows, fixed evolver…
Aug 8, 2018
7900736
requirements file
Aug 13, 2018
500f12f
more flexible initial starting points
Aug 13, 2018
23fe701
fixing string to int bugs
Aug 13, 2018
39e5f43
added neutral theta as parameter
Aug 13, 2018
65a473c
bug fix
Aug 15, 2018
c1806ca
bug fix2
Aug 15, 2018
5212ef9
fixed input bug for pop1 and when making a single population simulation
Aug 15, 2018
0d8f535
initial upgrades to create parallel simulations
DL42 Aug 23, 2018
128fa56
fixes + make burn-in a parameter
DL42 Aug 23, 2018
b0627b7
tab error will do full fix later
DL42 Aug 23, 2018
7a035e7
more tab error
DL42 Aug 23, 2018
988d64f
name error
DL42 Aug 23, 2018
b63a920
fixing seeds
DL42 Aug 23, 2018
673609a
putting back in accidently removed lines
DL42 Aug 23, 2018
19c7402
fix seeds and add print
DL42 Aug 23, 2018
c256b0f
hopefully a fix to the numpy dtype error
DL42 Aug 23, 2018
752a1a0
should fix dtype error
DL42 Aug 23, 2018
6aeeea8
absolutely should fix dtype error
DL42 Aug 23, 2018
7a97cd9
name error
DL42 Aug 23, 2018
2b30268
test evolver in interactive window
Sep 11, 2018
2cbc917
made sure anc_sampling was of type int
Sep 11, 2018
de5aa58
fixing tabs
Sep 11, 2018
1f13bd5
fixing parsed args to args
Sep 11, 2018
8d98282
moved anc_sam conversion to int to evolve_arg and fixed indexing in s…
Sep 11, 2018
b7a4702
fix sample taking
Sep 12, 2018
4377c2e
fix sample dtype
Sep 12, 2018
3bd7454
create sample list from node list
Sep 12, 2018
25382ec
change results to evolver
Sep 12, 2018
3c67688
first commit for multi-sample fst analysis
DL42 Sep 13, 2018
6020819
syntax and bug fixes
Sep 14, 2018
956e112
(test_evolve and evolve_arg) moved args.anc_sam1/2 manipulation back …
Sep 14, 2018
8672870
eliminated last reference to burn-in scale and fixed indentation
Sep 14, 2018
c6b5350
just return fst_list and comment out print statements
Sep 14, 2018
57e7a98
temp
Sep 14, 2018
d9ff32b
Merge branch 'as_dev' into ancestral_sample
Sep 14, 2018
9caae86
added concurrent futures
Sep 19, 2018
08a9b02
fixes
Sep 19, 2018
b30b82c
define fst_list
Sep 19, 2018
66d8139
Merge branch 'as_dev' into ancestral_sample
Sep 19, 2018
69b82ab
print mean, median, and std fst results out to file
Sep 30, 2018
a20bda9
allow setting of initial migration rate (good for when I wan the sist…
Oct 1, 2018
35b253e
better migration checking when pop 2 doesn't exist
Oct 1, 2018
224099d
output linearized fst results and expected linearized fst results for…
Oct 2, 2018
b1ce216
single population simulation
Oct 4, 2018
8901ab9
changes to test comparison with coalescent theory for sister populati…
Oct 4, 2018
e35f953
adding simulation command lines
Nov 18, 2018
b52b9ad
created new split/recover and split migration models so that ancestra…
Jan 6, 2019
9826294
allow selection coefficient to be set by user and make use of fwdpy11…
Jan 7, 2019
456a91e
got separate msprime simulation working (same interface for simplicity)
Jan 21, 2019
dacd7da
fixes
Jan 23, 2019
191fd81
allow number of generations in flat demography to be set by user
Jan 31, 2019
82fc9fe
add option to create custom filename for outfile
Jan 31, 2019
b25f0d2
indentation fix
Jan 31, 2019
e3ccc55
add user defined boolean where split rate is an exact rather than ran…
Feb 1, 2019
76491a2
upgraded msprime simulation to model split_loss and split_recovery mo…
Feb 2, 2019
c76db54
fixing population split non-recovery
DL42 Feb 19, 2019
a163041
add tennyson model to msprime
DL42 Feb 19, 2019
d07781f
simulation commands and results
DL42 Feb 19, 2019
142c7e9
adding option for two-locus simulation
Mar 29, 2019
b6b9b4d
flanking, recombining deleterious regions w/ central, non-recombining…
Apr 1, 2019
eaae5a9
change multiplicative gvalue to 2.0
DL42 Apr 4, 2019
60d3520
changed name of two_loc param to mul_loc, made region_break exactly 1/3
DL42 Apr 4, 2019
ff29746
changed -mloc parameter name to avoid conflicts
DL42 Apr 4, 2019
56f3a6b
add cores option, fixes compilation on new fwdpy11 versions
Apr 11, 2019
5a14547
BGS command lines
DL42 Apr 11, 2019
e8d8be2
first simulation script
DL42 Apr 12, 2019
0402441
fixing BGC->BGS, fixing shell commands
DL42 Apr 12, 2019
912fd62
conversion to msprime 0.6.1
Apr 12, 2019
49de7a8
new shell scripts
Apr 12, 2019
9d4aa84
check error
Apr 13, 2019
dcf4a00
fixes and mutation printing
Apr 13, 2019
6e08a73
tried to use table collection API, but no dice
Apr 13, 2019
c288896
deduplicate sites, non-discarding of populations during simplification
Apr 13, 2019
770c80d
removed population_table function, unnecessary, handled in ArgEvolver…
Apr 13, 2019
7fe30e6
updated seed values for shellcmd files and added R values to test
Apr 14, 2019
7c4c077
results
DL42 Apr 14, 2019
05df875
removed the call to make a python interactive after running bash scri…
Apr 14, 2019
b79abaf
updated shell commands for interleaved model
Apr 14, 2019
f826341
updated shell commands for HK95 model
Apr 14, 2019
9fbbcda
moved small replicate results to store them for later if needed
Apr 14, 2019
bf1a91f
decreased number of cores, sometimes 128 ran out of memory
Apr 15, 2019
c946538
large replicate results, missing HKBGS_R2 because I set R to 11000
DL42 Apr 15, 2019
2004186
fixes R parameter for HKBGS_R2
Apr 15, 2019
a28994e
Results for HKBGS_R2
Apr 16, 2019
c35af8e
r plot scripts and tables
Apr 17, 2019
ef1f5d4
small fix to R script
Apr 17, 2019
c03a23a
final improvement to R script
Apr 17, 2019
e982f8b
no pop size change demography model with background selection
Apr 21, 2019
2a953b2
fixes to command line and shell commands (recombination rate and misc)
Apr 21, 2019
2afe279
simulation results no popsize changes
Apr 21, 2019
9057c10
print sample pi for every sample
Apr 22, 2019
c6203ef
fix
Apr 22, 2019
0a6de3c
results and fixes
Apr 22, 2019
b901320
long burn-in HK results
Apr 23, 2019
1b5b665
delete file
Apr 23, 2019
667b135
upgraded test_msprime to msprime v0.6.1 and pi_array, removed unneede…
Apr 25, 2019
9dbe777
fix in test_msprime, changed split rate to 1 (duplication)
Apr 25, 2019
2137e0a
code to output tree sequences to files
Apr 25, 2019
53e4aa7
tree sequences are not pickle-able, output ts file in run_sim
Apr 26, 2019
66c8048
test_msprime fixes and results
Apr 26, 2019
4e50d92
further fixes to test_msprime and removal of extra zeros from results
Apr 26, 2019
7b2cc6b
fixes to ts_output and shell commands
Apr 26, 2019
ef08ed1
got tree sequence output for HK and IBGS R1, rsynced to Irvine/BGS_re…
Apr 26, 2019
baa6268
fixes population table when initializing from neutral tree sequence
May 29, 2019
baf85aa
adding josh schraiber's continuity to project
Nov 18, 2018
b26bb0a
initial stab at full integration of continuity with project, probably…
Nov 22, 2018
0571ebb
small fixes and testing lines (reads not being sliced right)
Dec 5, 2018
6b250a6
further attempts to get Josh's continuity program working ... still d…
Dec 11, 2018
483b8b5
continuity analyses successfully run in python 3 for both my simulati…
May 23, 2019
195227f
fixes continuity analyses so I can take multiple ancient samples and …
May 29, 2019
74f3012
output continuity results
May 29, 2019
9796e82
make simulation like mine
Jun 28, 2019
d60e43c
continuity simulation working!
Jun 28, 2019
e057017
fixing random number seeds in test_evolve so continuity within test_e…
Jun 30, 2019
4428d9f
fixed msprime's current population sampling to be the same as fwdpy11…
Jun 30, 2019
a869092
outputting branch length estimations for split times in addition to l…
Jun 30, 2019
e04a93e
preparing for cluster (no joblib/matplotlib), cluster commands
Jun 30, 2019
86719aa
fixing cluster commands for fwdpy11 and num_process/replicated for co…
Jun 30, 2019
bc5da32
stop openBlas from spamming threads in numpy calculations
Jun 30, 2019
0bb2505
continuity results for continuity and fwdpy11 with different rates of…
Jun 30, 2019
b3fd49f
increase replicates to 10,0000
Jul 3, 2019
89e4f5f
trying to get around msprime simulation error where a small number of…
Jul 4, 2019
0ad500b
forgot that sys.argv[0] is the file name
Jul 4, 2019
80d009d
large replicate sim results, fix to continuity shell commands
Jul 5, 2019
454d3d9
deleted excess simulation functions, added test for bug in msprime wh…
Jul 5, 2019
7256688
large replicate sim results for continuity
Jul 5, 2019
6bafbfb
Merge branch 'ancestral_sample' of https://github.com/DL42/fwdpy11_ar…
Jul 5, 2019
c930213
combined continuity msprime sim results files
Jul 6, 2019
74e062a
BGS continuity tests for demographic model 2C with recombination rate…
Jul 7, 2019
858d07d
msprime doesn't like seeds of 0
Jul 8, 2019
9a66804
BGS continuity results
Jul 8, 2019
ec94fb5
reorganize files, new R figure code, fix mistake in test_msprime, fix 2E
Jul 12, 2019
41962d5
reorganize HKBGS results for BGS results
Jul 12, 2019
d1c9313
rename of folder
Jul 12, 2019
e7d0dc1
continuity BGS with duplication demography 1
Jul 12, 2019
5c165cb
new msprime results
Jul 12, 2019
fd34d54
continuity BGS results for demography scenario 1 + nohup_msprime_2B
Jul 12, 2019
c42ccad
corrected sim2C to sim1
Jul 12, 2019
04d9590
forgot to add to previous commit
Jul 12, 2019
cc5bfd8
2C > 2B
Jul 12, 2019
96eea90
continuity BGS with duplication demography 1 and recombination rate 1…
Jul 12, 2019
37cf013
eliminated extra file
Jul 12, 2019
c3774c8
continuity BGS2 rec111 results + fwdpy11 neutral 2E
Jul 12, 2019
ad72141
reorganize HK results and add csv results and modify gitignore
Nov 1, 2019
6b64bbf
add and modify rplots
Nov 1, 2019
0ae83d9
rename 2C to 2B
Nov 1, 2019
4a3530a
made separate axes for graphs
Nov 4, 2019
1342106
multipanel plot 2
Nov 5, 2019
db1dca7
plot 1 tiff
Nov 5, 2019
7812009
plot 2 reformatted
Nov 6, 2019
56b4a06
convert to jpg for google docs, regularize sizes, make plot titles "A…
Nov 6, 2019
6efa4d1
ignore pptx and tex files, have LaTex output figures using tikzLatex …
Nov 19, 2019
ff6daee
new combined plot 1
Dec 3, 2019
0feb61b
increase replicates BGS_1_rec_3 by 16x for 1/4 se
Dec 3, 2019
932a7ae
new results
Dec 3, 2019
0015bb5
rename sim2C to sim2B files
Dec 5, 2019
14115b9
new continuity BGS plots
Dec 5, 2019
975dbb3
changing legend keyheight for linetype legend (spacing out neutral an…
Dec 6, 2019
f0e266f
regularizing BGS plots and legends
Dec 6, 2019
698707e
r_plot for pi
Dec 6, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.o
*.so
*.pyc
*.numbers
*.pdf
*.tiff
*.jpg
*.pptx
*.tex
8 changes: 7 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GPLv3 or later (see COPYING)
Overview
----------------------------------

We define a C++ class called "ancestry_tracker", which stores nodes and edges as they appear forwards in time. These data structures, and their updating, are non-intrusive, meaning that they don't care about any of the fwdpp_ internals. Rather, we simply have to define a new "iterate a generation" function that uses both fwdpp_ machinery and updates an ancestry_tracker as appropriate.
We define a C++ class called "ancestry_tracker", which stores nodes, edges, and mutations as they appear forwards in time. These data structures, and their updating, are non-intrusive, meaning that they don't care about any of the fwdpp_ internals. Rather, we simply have to define a new "iterate a generation" function that uses both fwdpp_ machinery and updates an ancestry_tracker as appropriate.

Using pybind11_, we make ancestry_trackers visible to Python as an AncestryTracker class. The Python class has access to the nodes and edges as NumPy structured arrays, which can be viewed "for free", meaning that no copy from C++ to Python is required to look at them.

Expand Down Expand Up @@ -49,7 +49,13 @@ Make a local build and run the unit tests:
#on Linux.
python setup.py build_ext -i --gcc
python -m unittest discover tests

Changelog
----------------------------------

Version 0.0.2: Removed multi-threaded versions of simulation in order to implement mutation and ancient sample tracking. The multi-threaded versions may or may not return in a later release. Requires fwdpy11 0.1.4.

Version 0.0.1: Release version used in Kelleher et al.

Test simulation
+++++++++++++++++++++++++++++++++
Expand Down
Loading