npx skills add ...
npx skills add novainsilico/jinko-skills --skill jinko-vpop
Create, generate, inspect, or work with Jinkō virtual populations (vpops) and vpop designs via the jinko-sdk. Use this skill whenever the user wants to upload a vpop from CSV or pandas DataFrame, create a vpop generator from marginal distributions, generate a vpop from a vpop design, inspect vpop content/statistics, or edit an existing vpop design. Vpops generated or uploaded as Vpop project items are not editable; edit the vpop design instead and regenerate.
npx skills add novainsilico/jinko-skills --skill jinko-vpop
Use this skill for technical vpop and vpop-design workflows through the SDK. Keep distribution guidance minimal; use the allowed distribution shapes in assets/distrib.json and defer deeper distribution design to a dedicated distribution skill when available.
PREREQUISITE: This skill needs an initialized
jinko-sdkconnection and an SDK satisfying itsmetadata.requires_sdkrange. Run thejinko-sdk-setupskill (../jinko-sdk-setup/SKILL.md) and proceed only once its check passes. If that skill is not found, install it fromnovainsilico/jinko-skills.
client.create_vpop_from_csv() or client.create_vpop_from_dataframe() for direct vpop upload.client.create_vpop_design_from_design() for marginal-distribution vpop designs.design.generate_vpop() to generate an immutable Vpop from a VpopDesign.design.diagnostics (or design.get_sanity()) before generating, and fix reported errors first.design.descriptors (create*/set_distribution*) and design.correlations, not by replacing the raw payload.--apply before creating or updating project items.LogUniform, LogNormal, or LogNormalTruncated payload.YYYY-MM-DD-<experiment-name>.client.get_folder_by_name(name, exact_match_only=True).--apply.folder=folder to SDK creation calls that support it.assets/toy_vpop.csv: two-patient vpop CSV using the toy model descriptors Dose and k_elim.assets/toy_marginals.json: list-of-marginals vpop design for Dose and k_elim.assets/distrib.json: source of truth for admissible marginal distribution shapes.Use scripts rather than embedding long Python examples in chat. These are on
PATH as console scripts once the SDK is installed, and also runnable via
python -m as shown below.
jinko.cli.create_vpop_from_csv: uploads a CSV directly, or via pandas DataFrame with --method dataframe.jinko.cli.create_vpop_design_from_design: creates a vpop design from a list of unique { "id": ..., "distribution": ... } entries and can optionally generate a vpop after diagnostics pass.jinko.cli.inspect_vpop: inspects content, description, or statistics for an existing vpop.jinko.cli.edit_vpop_design: updates or adds descriptors sequentially, reports already-applied IDs if a later edit fails, and runs post-edit diagnostics before success.Examples:
The minimal CSV shape is one row per patient:
Use actual component IDs, not biological labels such as age or weight, when the vpop is meant to drive a model.
Use a list of marginal entries in skill assets and scripts:
The script converts this list to the SDK mapping expected by create_vpop_design_from_design(marginal_distributions=...).
assets/distrib.json defines numeric fields but does not describe their scale:
LogUniform: lowBound and highBound are exponents of base. For a range of approximately 9.5e-8 to 8.55e-7 with base: 10, pass -7.02 and -6.07.LogNormal and LogNormalTruncated: mean and stdev are the mean and standard deviation of the base logarithm of the value. With base: 10, mean: -6 gives an untruncated median of 1e-6.LogNormalTruncated: posLowBound and posHighBound bound the value itself. For a range of 1e-7 to 1e-5, pass those positive numbers directly.Value-scale numbers passed as log-scale parameters can produce a Vpop at the wrong order of magnitude without a diagnostic error. After generating a Vpop with a log-scale marginal, read back the descriptor statistics before using it:
references/csv-vpop.md for direct CSV/DataFrame upload details.references/vpop-design.md for marginal vpop design and generation details.assets/distrib.json before adding or changing marginal distribution shapes.patientIndex,Dose,k_elim
1,1.0,0.08
2,1.2,0.12[
{"id": "Dose", "distribution": {"tag": "Uniform", "lowBound": 0.8, "highBound": 1.2}},
{"id": "k_elim", "distribution": {"tag": "NormalTruncated", "mean": 0.1, "stdev": 0.02, "lowBound": 0.01, "highBound": 0.3}}
]python -m jinko.cli.inspect_vpop --vpop-sid vp-... --statistics