Skip to content

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

@isaacovercast

Description

@isaacovercast

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")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions