mmore500 / hstrat-evolutionary-inference

How can we use phylogenetic analysis to characterize evolutionary dynamics in distributed digital evolution populations?
https://osf.io/vtxwd/
0 stars 1 forks source link

Create phylogeny figure graphics #6

Closed mmore500 closed 1 year ago

mmore500 commented 1 year ago
df["regime"] = df.apply(
    lambda row: {
        (1, 1, 2, 3.0517578125e-08): "plain",
        (1, 1, 1, 3.0517578125e-08): "neutral selection",
        (1, 1, 8, 3.0517578125e-08): "strong selection",
        (1, 4, 2, 3.0517578125e-06): "weak 4 niche ecology",
        (1, 4, 2, 3.0517578125e-08): "4 niche ecology",
        (1, 8, 2, 3.0517578125e-08): "8 niche ecology",
        (1024, 1, 2, 3.0517578125e-08): "spatial structure",
    }.get(
        tuple(
            row[
                [
                    "num_islands",
                    "num_niches",
                    "tournament_size",
                    "p_niche_invasion",
                ]
            ]
        ),
        np.nan,  # default
    ),
    axis="columns",
)

Other (less important) regimes are

# [ "num_islands",  "num_niches",  "tournament_size", "p_niche_invasion"]
        (1024, 4, 2, 3.0517578125e-06): "weak 4 niche ecology with spatial structure",
        (1024, 4, 2, 3.0517578125e-08): "4 niche ecology with spatial structure",
        (1024, 8, 2, 3.0517578125e-08): "8 niche ecology with spatial structure",

we can just put these files directly in on the tex branch in the image folder