Skip to content

Latest commit

 

History

History
28 lines (16 loc) · 2.1 KB

File metadata and controls

28 lines (16 loc) · 2.1 KB

SampleCode-Project

Two pieces of code from my work as an evolutionary biologist. One is data analysis in R, which is most of what I do day to day. The other is a simulation model, which is a newer part of my work.

  • Part1_FromConstraintToOpportunity/ — genomic analysis for a recent paper
  • Part2_CyclicResponseModel/ — an evolutionary simulation

Part 1 — From constraint to opportunity

The analysis for our paper "From constraint to opportunity: Relaxing sexual antagonism reveals adaptive potential maintained by balancing selection" (Zwoinska MK et al., 2026, bioRxiv: https://doi.org/10.1101/2026.02.04.703537). One Quarto document takes the raw Pool-Seq allele counts from an experimental evolution study in seed beetles and runs the whole way through to the figures in the paper: filtering, PCA and pcadapt outliers, F_ST, Tajima's D, selection coefficients, and a test for parallel selection across replicates. I wrote and ran this myself.

To look at it, open the .qmd in RStudio. It needs five data files in the same folder, which are large and archived separately.

Part 2 — Cyclic response model

A simulation of how a population responds to an environment that keeps changing. Five ways of responding evolve at once: genetic tracking, developmental plasticity, reversible plasticity, parental effects, and developmental variance. The model asks which of these wins out depending on how predictable the environment is and how fast it cycles, across different population sizes and costs.

I designed the model and decided what it should do and test, then checked the results against theory and against sanity checks I built in. I wrote the R code with a lot of help from AI tools. I want to be upfront about that.

The model lives in scripts/, the runs are set up in config/, and Snakemake ties it together. A few example figures are in example_outputs/. To run one scenario locally:

snakemake --cores 4 --configfile config/config_N800_loci50.yaml

Contact

Martyna K. Zwoinska — zwoinska@gmail.comhttps://linkedin.com/in/martyna-zwoinska