Skip to content

Conversation

@AprilYUZhang
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Sep 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.38%. Comparing base (d17796f) to head (3f59ae7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1752      +/-   ##
==========================================
- Coverage   99.81%   99.38%   -0.43%     
==========================================
  Files         142      143       +1     
  Lines        4863     4884      +21     
  Branches      470      470              
==========================================
  Hits         4854     4854              
- Misses          6       27      +21     
  Partials        3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AprilYUZhang AprilYUZhang changed the title Sus scrofa demography from Wang's Piecewise size model for wild boar (Wang et al. 2025) Sus scrofa demography from Piecewise size model for wild boar (Wang et al. 2025) Sep 24, 2025
long_description = """
This demographic model is a piecewise size model for wild boar
from Zhang et al. (2022). Effective population sizes were estimated by
PSMC with parameters Tmax = 20, n = 64 (4 + 50*1 + 4 + 6)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AprilYUZhang change 50*1 to just 50?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

n here is PSMC parameter. We likely don't need this level of detail here.

long_description = """
This demographic model is a piecewise size model for wild boar
from Wang et al. (2025). Effective population sizes were estimated by
MSMC with parameters n = 64 (4 + 50*1 + 4 + 6), generation time (g) = 5 years, and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AprilYUZhang change 50*1 to just 50?

long_description = """
This demographic model is a piecewise size model for wild boar
from Zhang et al. (2022). Effective population sizes were estimated by
PSMC with parameters Tmax = 20, n = 64 (4 + 50*1 + 4 + 6)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AprilYUZhang PSMC is run on just one genome (as far as I know), but you state n=64, so I am confused. Will read the paper, but you might get back to this comment faster.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading the paper shows that PSMC was run on each sample, but then also MSMC2 was used, but this data was not shared by the authors.

PSMC with parameters Tmax = 20, n = 64 (4 + 50*1 + 4 + 6)
"""
populations = [
stdpopsim.Population(id="EUW", description="European wild boar"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@petrelharp with PSMC we get just one population model. @AprilYUZhang has here combined 4 populations into one model. Is this ok or should we have 4 separate models from one study?

@gregorgorjanc
Copy link
Contributor

I am happy to work with @AprilYUZhang on revising this PR and the follow-up QC

@gregorgorjanc
Copy link
Contributor

Tagging the issue that this PR addresses #1312

_species.add_demographic_model(_WildBoar_4Z22())

_WangEtAl = stdpopsim.Citation(
doi="https://doi.org/10.1101/2025.02.05.636574",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This DOI points to pre-print at https://www.biorxiv.org/content/10.1101/2025.02.05.636574v1, but the corresponding paper has now been published at https://doi.org/10.1016/j.xgen.2025.100954. Best to use the latter DOI.


def _WildBoar_4Z22():
id = "WildBoar_4Z22"
description = "Piecewise size model for wild boar (Zhang et al. 2022)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description = "Piecewise size model for wild boar (Zhang et al. 2022)"
description = "Piecewise size model for wild boar (pig) (Zhang et al., 2022)"

generation_time=3,
mutation_rate=3.6e-9,
population_configurations=[
stdpopsim.PopulationConfiguration(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AprilYUZhang there is a lot of code here due to many timesteps. I suggest you follow the style from https://github.com/popsim-consortium/stdpopsim/blob/main/stdpopsim/qc/BosTau.py

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

Successfully merging this pull request may close these issues.

2 participants