{
  "analytic": "ancient-genome-demography",
  "kind": "declared_analytical_or_constructed_example",
  "experimental_model_result": false,
  "panels": [
    {
      "kind": "line",
      "x": [
        0.2,
        0.22681564245810057,
        0.2536312849162011,
        0.28044692737430166,
        0.30726256983240224,
        0.33407821229050283,
        0.36089385474860336,
        0.3877094972067039,
        0.4145251396648045,
        0.44134078212290506,
        0.4681564245810056,
        0.4949720670391062,
        0.5217877094972068,
        0.5486033519553073,
        0.5754189944134078,
        0.6022346368715084,
        0.6290502793296089,
        0.6558659217877094,
        0.6826815642458101,
        0.7094972067039107,
        0.7363128491620112,
        0.7631284916201118,
        0.7899441340782123,
        0.8167597765363128,
        0.8435754189944134,
        0.8703910614525139,
        0.8972067039106144,
        0.9240223463687152,
        0.9508379888268157,
        0.9776536312849162,
        1.0044692737430168,
        1.0312849162011173,
        1.0581005586592178,
        1.0849162011173183,
        1.1117318435754189,
        1.1385474860335196,
        1.1653631284916202,
        1.1921787709497207,
        1.2189944134078212,
        1.2458100558659218,
        1.2726256983240223,
        1.2994413407821228,
        1.3262569832402233,
        1.3530726256983239,
        1.3798882681564246,
        1.4067039106145252,
        1.4335195530726257,
        1.4603351955307262,
        1.4871508379888267,
        1.5139664804469273,
        1.5407821229050278,
        1.5675977653631283,
        1.5944134078212289,
        1.6212290502793296,
        1.6480446927374302,
        1.6748603351955307,
        1.7016759776536312,
        1.7284916201117317,
        1.7553072625698323,
        1.7821229050279328,
        1.8089385474860336,
        1.835754189944134,
        1.8625698324022346,
        1.8893854748603351,
        1.9162011173184357,
        1.9430167597765362,
        1.9698324022346367,
        1.9966480446927373,
        2.023463687150838,
        2.0502793296089385,
        2.077094972067039,
        2.1039106145251396,
        2.13072625698324,
        2.1575418994413407,
        2.184357541899441,
        2.211173184357542,
        2.2379888268156427,
        2.2648044692737432,
        2.2916201117318438,
        2.3184357541899443,
        2.345251396648045,
        2.3720670391061454,
        2.398882681564246,
        2.4256983240223464,
        2.452513966480447,
        2.4793296089385475,
        2.506145251396648,
        2.5329608938547485,
        2.5597765363128495,
        2.58659217877095,
        2.6134078212290506,
        2.640223463687151,
        2.6670391061452516,
        2.693854748603352,
        2.7206703910614527,
        2.7474860335195532,
        2.7743016759776538,
        2.8011173184357543,
        2.827932960893855,
        2.8547486033519553,
        2.881564245810056,
        2.9083798882681564,
        2.935195530726257,
        2.9620111731843575,
        2.988826815642458,
        3.015642458100559,
        3.0424581005586595,
        3.06927374301676,
        3.0960893854748606,
        3.122905027932961,
        3.1497206703910616,
        3.176536312849162,
        3.2033519553072627,
        3.230167597765363,
        3.2569832402234637,
        3.2837988826815643,
        3.310614525139665,
        3.3374301675977653,
        3.364245810055866,
        3.3910614525139664,
        3.4178770949720674,
        3.444692737430168,
        3.4715083798882684,
        3.498324022346369,
        3.5251396648044695,
        3.55195530726257,
        3.5787709497206706,
        3.605586592178771,
        3.6324022346368716,
        3.659217877094972,
        3.6860335195530727,
        3.712849162011173,
        3.7396648044692737,
        3.7664804469273743,
        3.793296089385475,
        3.8201117318435753,
        3.846927374301676,
        3.873743016759777,
        3.9005586592178774,
        3.927374301675978,
        3.9541899441340784,
        3.981005586592179,
        4.007821229050279,
        4.03463687150838,
        4.06145251396648,
        4.088268156424581,
        4.115083798882681,
        4.141899441340782,
        4.168715083798882,
        4.195530726256983,
        4.222346368715084,
        4.249162011173184,
        4.275977653631285,
        4.302793296089385,
        4.329608938547486,
        4.356424581005586,
        4.383240223463687,
        4.410055865921787,
        4.436871508379888,
        4.4636871508379885,
        4.4905027932960895,
        4.5173184357541905,
        4.5441340782122905,
        4.5709497206703915,
        4.597765363128492,
        4.624581005586593,
        4.651396648044693,
        4.678212290502794,
        4.705027932960894,
        4.731843575418995,
        4.758659217877095,
        4.785474860335196,
        4.812290502793296,
        4.839106145251397,
        4.865921787709497,
        4.892737430167598,
        4.919553072625699,
        4.946368715083799,
        4.9731843575419,
        5.0
      ],
      "series": [
        {
          "label": "Observed A proportion",
          "y": [
            0.07894736842105263,
            0.08859470468431771,
            0.09804203858335735,
            0.10729552579082359,
            0.11636107193229901,
            0.12524434515498467,
            0.13395078794581144,
            0.1424856282507528,
            0.150853889943074,
            0.15906040268456376,
            0.16710981122042012,
            0.17500658414537792,
            0.18275502217584141,
            0.19035926596019645,
            0.19782330345710628,
            0.20515097690941386,
            0.21234598943927582,
            0.21941191128831297,
            0.22635218572487037,
            0.23317013463892292,
            0.2398689638437273,
            0.24645176810199665,
            0.25292153589315525,
            0.25928115393710094,
            0.26553341148886284,
            0.2716810044175773,
            0.277726539082315,
            0.2836725360164647,
            0.2895214334316172,
            0.29527559055118113,
            0.3009372907833073,
            0.3065087447420855,
            0.3119920931254118,
            0.31738940945739813,
            0.3227027027027027,
            0.32793391975970826,
            0.3330849478390462,
            0.3381576167335728,
            0.34315370098553155,
            0.34807492195629547,
            0.3529229498037596,
            0.357699405372155,
            0.3624058619987787,
            0.367043847241867,
            0.3716148445336008,
            0.3761202947619996,
            0.3805615977852482,
            0.38494011388179855,
            0.3892571651394034,
            0.39351403678606,
            0.3977119784656797,
            0.40185220546114186,
            0.40593589986724815,
            0.4099642117159541,
            0.4139382600561272,
            0.4178591339899646,
            0.421727893668082,
            0.42554557124518616,
            0.4293131717981417,
            0.43303167420814476,
            0.43670203200863156,
            0.4403251742004645,
            0.4439020060358601,
            0.44743340977244667,
            0.45092024539877296,
            0.4543633513325205,
            0.45776354509260864,
            0.46112162394632716,
            0.4644383655325697,
            0.467714528462192,
            0.47095085289647015,
            0.47414806110458285,
            0.4773068580010012,
            0.4804279316636258,
            0.4835119538334707,
            0.4865595803966563,
            0.48957145184943784,
            0.4925481937469626,
            0.49549041713641495,
            0.4983987189751801,
            0.5012736825346282,
            0.5041158777900903,
            0.5069258617975759,
            0.5097041790577554,
            0.5124513618677043,
            0.5151679306608884,
            0.5178543943358472,
            0.5205112505740088,
            0.5231389861470543,
            0.5257380772142317,
            0.5283089896099986,
            0.5308521791223604,
            0.5333680917622523,
            0.5358571640243,
            0.5383198231392778,
            0.540756487318575,
            0.5431675659909582,
            0.5455534600319165,
            0.5479145619858565,
            0.550251256281407,
            0.55256391944008,
            0.5548529202785277,
            0.5571186201046232,
            0.559361372907582,
            0.5615815255423373,
            0.5637794179083694,
            0.5659553831231814,
            0.5681097476906108,
            0.5702428316641515,
            0.5723549488054608,
            0.5744464067382149,
            0.576517507097472,
            0.578568545674694,
            0.5805998125585755,
            0.5826115922718188,
            0.5846041639039915,
            0.5865778012405966,
            0.5885327728884803,
            0.5904693423976991,
            0.592387768379961,
            0.5942883046237535,
            0.5961712002062654,
            0.5980366996022072,
            0.5998850427896283,
            0.601716465352829,
            0.603531198582458,
            0.6053294695728865,
            0.6071115013169447,
            0.6088775127981021,
            0.610627719080174,
            0.6123623313946294,
            0.614081557225576,
            0.6157856003924935,
            0.6174746611307852,
            0.6191489361702127,
            0.6208086188112819,
            0.6224538989996384,
            0.6240849633985359,
            0.6257019954594336,
            0.6273051754907794,
            0.6288946807250326,
            0.6304706853839802,
            0.632033360742394,
            0.6335828751900807,
            0.6351193942923704,
            0.6366430808490894,
            0.6381540949520619,
            0.6396525940411826,
            0.6411387329591018,
            0.6426126640045636,
            0.6440745369844336,
            0.6455244992644563,
            0.6469626958187761,
            0.6483892692782579,
            0.6498043599776412,
            0.6512081060015588,
            0.6526006432294554,
            0.6539821053794322,
            0.6553526240510508,
            0.6567123287671233,
            0.658061347014518,
            0.6593998042840057,
            0.6607278241091736,
            0.6620455281044342,
            0.6633530360021495,
            0.6646504656888984,
            0.6659379332409086,
            0.6672155529586742,
            0.6684834374007832,
            0.6697416974169743,
            0.6709904421804433,
            0.6722297792194203,
            0.673459814448035,
            0.6746806521964898,
            0.6758923952405587,
            0.6770951448304299,
            0.6782890007189073,
            0.6794740611889901,
            0.6806504230808441,
            0.6818181818181818
          ]
        },
        {
          "label": "Historical proportion",
          "y": [
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3,
            0.3
          ]
        }
      ],
      "xlabel": "A / other sampling probability ratio",
      "ylabel": "Ancestry-group proportion",
      "logx": false,
      "logy": false
    },
    {
      "kind": "line",
      "x": [
        0.0,
        0.002,
        0.004,
        0.006,
        0.008,
        0.01,
        0.012,
        0.014,
        0.016,
        0.018000000000000002,
        0.02,
        0.022,
        0.024,
        0.026000000000000002,
        0.028,
        0.03,
        0.032,
        0.034,
        0.036000000000000004,
        0.038,
        0.04,
        0.042,
        0.044,
        0.046,
        0.048,
        0.05,
        0.052000000000000005,
        0.054,
        0.056,
        0.058,
        0.06,
        0.062,
        0.064,
        0.066,
        0.068,
        0.07,
        0.07200000000000001,
        0.074,
        0.076,
        0.078,
        0.08,
        0.082,
        0.084,
        0.08600000000000001,
        0.088,
        0.09,
        0.092,
        0.094,
        0.096,
        0.098,
        0.1,
        0.10200000000000001,
        0.10400000000000001,
        0.106,
        0.108,
        0.11,
        0.112,
        0.114,
        0.116,
        0.11800000000000001,
        0.12,
        0.122,
        0.124,
        0.126,
        0.128,
        0.13,
        0.132,
        0.134,
        0.136,
        0.138,
        0.14,
        0.14200000000000002,
        0.14400000000000002,
        0.146,
        0.148,
        0.15,
        0.152,
        0.154,
        0.156,
        0.158,
        0.16,
        0.162,
        0.164,
        0.166,
        0.168,
        0.17,
        0.17200000000000001,
        0.17400000000000002,
        0.176,
        0.178,
        0.18,
        0.182,
        0.184,
        0.186,
        0.188,
        0.19,
        0.192,
        0.194,
        0.196,
        0.198,
        0.2,
        0.202,
        0.20400000000000001,
        0.20600000000000002,
        0.20800000000000002,
        0.21,
        0.212,
        0.214,
        0.216,
        0.218,
        0.22,
        0.222,
        0.224,
        0.226,
        0.228,
        0.23,
        0.232,
        0.234,
        0.23600000000000002,
        0.23800000000000002,
        0.24,
        0.242,
        0.244,
        0.246,
        0.248,
        0.25,
        0.252,
        0.254,
        0.256,
        0.258,
        0.26,
        0.262,
        0.264,
        0.266,
        0.268,
        0.27,
        0.272,
        0.274,
        0.276,
        0.278,
        0.28,
        0.28200000000000003,
        0.28400000000000003,
        0.28600000000000003,
        0.28800000000000003,
        0.29,
        0.292,
        0.294,
        0.296,
        0.298,
        0.3
      ],
      "series": [
        {
          "label": "Measured allele frequency",
          "y": [
            0.2,
            0.2012,
            0.20240000000000002,
            0.2036,
            0.2048,
            0.20600000000000002,
            0.2072,
            0.20840000000000003,
            0.2096,
            0.21080000000000002,
            0.21200000000000002,
            0.2132,
            0.2144,
            0.2156,
            0.21680000000000002,
            0.218,
            0.2192,
            0.2204,
            0.22160000000000002,
            0.22280000000000003,
            0.224,
            0.2252,
            0.22640000000000002,
            0.2276,
            0.2288,
            0.23,
            0.2312,
            0.2324,
            0.2336,
            0.2348,
            0.236,
            0.2372,
            0.2384,
            0.2396,
            0.24080000000000001,
            0.242,
            0.2432,
            0.24440000000000003,
            0.2456,
            0.24680000000000002,
            0.24800000000000003,
            0.24920000000000003,
            0.25040000000000007,
            0.25160000000000005,
            0.2528,
            0.254,
            0.2552,
            0.2564,
            0.25760000000000005,
            0.25880000000000003,
            0.26,
            0.2612,
            0.2624,
            0.2636,
            0.26480000000000004,
            0.266,
            0.2672,
            0.2684,
            0.2696,
            0.27080000000000004,
            0.272,
            0.2732,
            0.27440000000000003,
            0.2756,
            0.2768,
            0.278,
            0.2792,
            0.28040000000000004,
            0.2816,
            0.2828,
            0.28400000000000003,
            0.2852,
            0.28640000000000004,
            0.2876,
            0.2888,
            0.29000000000000004,
            0.2912,
            0.2924,
            0.2936,
            0.2948,
            0.29600000000000004,
            0.2972,
            0.2984,
            0.2996,
            0.3008,
            0.30200000000000005,
            0.3032,
            0.3044,
            0.30560000000000004,
            0.3068,
            0.30800000000000005,
            0.30920000000000003,
            0.3104,
            0.31160000000000004,
            0.3128,
            0.31400000000000006,
            0.31520000000000004,
            0.3164,
            0.31760000000000005,
            0.31880000000000003,
            0.32000000000000006,
            0.32120000000000004,
            0.3224,
            0.32360000000000005,
            0.32480000000000003,
            0.32600000000000007,
            0.32720000000000005,
            0.3284,
            0.3296,
            0.3308,
            0.3320000000000001,
            0.33320000000000005,
            0.33440000000000003,
            0.3356,
            0.3368,
            0.3380000000000001,
            0.33920000000000006,
            0.34040000000000004,
            0.3416,
            0.3428,
            0.34400000000000003,
            0.3452,
            0.34640000000000004,
            0.3476,
            0.3488,
            0.35000000000000003,
            0.3512,
            0.35240000000000005,
            0.3536,
            0.3548,
            0.356,
            0.3572,
            0.35840000000000005,
            0.35960000000000003,
            0.3608,
            0.362,
            0.3632,
            0.36440000000000006,
            0.36560000000000004,
            0.3668,
            0.368,
            0.36920000000000003,
            0.37040000000000006,
            0.37160000000000004,
            0.3728,
            0.374,
            0.3752,
            0.37639999999999996,
            0.37760000000000005,
            0.3788,
            0.38
          ]
        }
      ],
      "xlabel": "Constructed contamination fraction",
      "ylabel": "Allele frequency",
      "logx": false,
      "logy": false
    }
  ],
  "title": "Unequal sampling and contamination affect different layers",
  "assumptions": "Historical A fraction0.3; fixed relative sampling. Ancient allele frequency0.2, contaminant0.8. No ancient genomes, identities or demographic estimates.",
  "worked": "A取样机会为其他群体三倍时，样本A比例0.9/(0.9+0.7)=0.5625；污染占20%时构造位点频率由0.2变0.32。",
  "checks": {
    "sample_pi_r3": 0.5625,
    "contaminated_c02": 0.32,
    "inverse_pi": 0.3
  },
  "generator_source_sha256": {
    "ops/datacenter/editorial_guides/horizons_figures.py": "5ed0031cf4cbcfb7d2d78b4385c8c29200a8312d53744507241da3ca5ca44a9c",
    "ops/datacenter/editorial_guides/deep_figures.py": "158969d9b1f5a4bd13906cf78dd71affc2692df9194593918059d861a6f59c85"
  },
  "source_ids": [
    "h-admixture2012",
    "h-europe2025"
  ],
  "formula_source": "Article equations and this versioned script",
  "diagram_nodes": [
    "Permitted samples",
    "Authentication and dates",
    "Kinship structure",
    "Reference models",
    "Sampling sensitivity",
    "Historical alternatives"
  ]
}
