mdahirel / pushed-pulled-2020-heritability-IBM

code for the paper "Individual variation in dispersal, and its sources, shape the fate of pushed vs. pulled range expansions"
0 stars 0 forks source link

genotype parsing issues in experiments with reproduction = "sexual" #15

Closed mdahirel closed 3 years ago

mdahirel commented 3 years ago

After running a simulation including reproduction = "sexual", there are two issues that arise during post-processing, when one wants to extract genotypic values of traits:

> exp_h2$metrics.turtles[[47]]$genotype_disp_slope[2000]
[1] 1.556749

because both our genotypic traits are decimal, we can parse the string in the "sexual" case to get the value back using the decimal sign, but it's a mess

Proposed solution:

mdahirel commented 3 years ago

just realised (yes at 3 a.m.) that we don't actually need the values of each allele to be exported to R, we just need the genotypic value for each trait, i.e. the mean of the allelic values So we can perfectly arrange to only export this genotypic mean for disp_slope and logit_disp0, rather than the two allele values, side-stepping the list parsing issue

update 3:10 a.m. : it looks we can even do the averaging from R, like by asking to export "mean metric" rather than "metric" in the metric.turtles part of the experiment design. That would make things wayyy easier. Will double check tomorrow

mdahirel commented 3 years ago

solved as of cbad77d4af5a73929b328499eaa388f75af647d1 but probably moot due to developments in #16 anyway (we'll need to only export population-level metrics "pre-cooked" on the NetLogo side, so no more parsing issues)