Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocalCommunity._simulate_seqs() - Initial size is broken #53

Open
isaacovercast opened this issue Apr 10, 2020 · 0 comments
Open

LocalCommunity._simulate_seqs() - Initial size is broken #53

isaacovercast opened this issue Apr 10, 2020 · 0 comments

Comments

@isaacovercast
Copy link
Collaborator

For a species that is a result of local speciation this call is broken:

meta_abund = self.region._get_abundance(cname)

This is setting abundance for the sister species in the metacommunity, but it doesn't work at all for local speciation, this should get the abundance of the parent species at time of divergence. Some relevant debug info:

  [####################] 100% 0.2460 ming Simulations    | 0:00:00 | > /home/isaac/Continuosity/MESS/MESS/LocalCommunity.py(969)_simulate_seqs()
-> pop_cfgs.append(pop_meta)
(Pdb) l
964  	            meta_abund = self.region._get_abundance(cname)
965  	            try:
966  	                pop_meta = msprime.PopulationConfiguration(sample_size = 10, initial_size = meta_abund)
967  	            except ValueError:
968  	                import pdb; pdb.set_trace()
969  ->	            pop_cfgs.append(pop_meta)
970  	            species_dict = {}
971  	            for sp, idx in sp_idxs.items():
972  	                if not sp:
973  	                    continue
974  	                try:
(Pdb) species_list
['t8.Loc1-191']
(Pdb) cname
't8.Loc1-191'
(Pdb) self.local_info[species_list]
                           t8.Loc1-191
colonization_times                2809
post_colonization_migrants           0
abundances_through_time             {}
ancestor                            t8
ancestral_abundance                 []
speciation_completion                0
meta_abund                           0
local_abund                          3
(Pdb) self.region._get_abundance("t8")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant