{
  "_id": "6a169f68acfb0bcc41d801f8",
  "Package": "popkin",
  "Title": "Estimate Kinship and FST under Arbitrary Population Structure",
  "Version": "1.3.25.9000",
  "Authors@R": "c(\nperson(given = \"Alejandro\",\nfamily = \"Ochoa\",\nrole = c(\"aut\", \"cre\"),\nemail = \"alejandro.ochoa@duke.edu\",\ncomment = c(ORCID = \"0000-0003-4928-3403\")),\nperson(given = \"John D.\",\nfamily = \"Storey\",\nrole = c(\"aut\"),\nemail = \"jstorey@princeton.edu\",\ncomment = c(ORCID = \"0000-0001-5992-402X\"))\n)",
  "Description": "Provides functions to estimate the kinship matrix of\nindividuals from a large set of biallelic SNPs, and extract\ninbreeding coefficients and the generalized FST (Wright's\nfixation index).  Method described in Ochoa and Storey (2021)\n<doi:10.1371/journal.pgen.1009241>.",
  "LazyData": "true",
  "License": "GPL-3",
  "Encoding": "UTF-8",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.3",
  "VignetteBuilder": "knitr",
  "URL": "https://github.com/StoreyLab/popkin/",
  "BugReports": "https://github.com/StoreyLab/popkin/issues",
  "Repository": "https://storeylab.r-universe.dev",
  "Date/Publication": "2026-01-27 19:05:12 UTC",
  "RemoteUrl": "https://github.com/storeylab/popkin",
  "RemoteRef": "HEAD",
  "RemoteSha": "a5d45b5f26f6c88e01099356572c72c18e07a922",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-27 07:34:01 UTC",
    "User": "root"
  },
  "Author": "Alejandro Ochoa [aut, cre] (ORCID:\n<https://orcid.org/0000-0003-4928-3403>),\nJohn D. Storey [aut] (ORCID: <https://orcid.org/0000-0001-5992-402X>)",
  "Maintainer": "Alejandro Ochoa <alejandro.ochoa@duke.edu>",
  "MD5sum": "203244dc8befc65e1e7dbb75031f285d",
  "_user": "storeylab",
  "_type": "src",
  "_file": "popkin_1.3.25.9000.tar.gz",
  "_fileid": "8ec975165a8aae6fcc930a542e37742504611410069acd976ce382a98cec3d0e",
  "_filesize": 1551848,
  "_sha256": "8ec975165a8aae6fcc930a542e37742504611410069acd976ce382a98cec3d0e",
  "_created": "2026-05-27T07:34:01.000Z",
  "_published": "2026-05-27T07:38:16.946Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 78029331483,
      "time": 124,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7234549408"
    },
    {
      "job": 78029331401,
      "time": 115,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7234546546"
    },
    {
      "job": 78029331388,
      "time": 114,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7234571603"
    },
    {
      "job": 78029331468,
      "time": 98,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7234578929"
    },
    {
      "job": 78028911061,
      "time": 169,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7234508120"
    },
    {
      "job": 78029331453,
      "time": 99,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7234541316"
    },
    {
      "job": 78029331517,
      "time": 72,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7234532273"
    },
    {
      "job": 78029331508,
      "time": 79,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7234534732"
    },
    {
      "job": 78029331469,
      "time": 85,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7234536555"
    }
  ],
  "_buildurl": "https://github.com/r-universe/storeylab/actions/runs/26497395363",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/storeylab/popkin",
  "_commit": {
    "id": "a5d45b5f26f6c88e01099356572c72c18e07a922",
    "author": "Alejandro Ochoa Garcia <alexviiiag@gmail.com>",
    "committer": "Alejandro Ochoa Garcia <alexviiiag@gmail.com>",
    "message": "Function `plot_popkin` added options `xlab`, `xlab_adj`, `xlab_line`, and `xlab_side`\n",
    "time": 1769540712
  },
  "_maintainer": {
    "name": "Alejandro Ochoa",
    "email": "alejandro.ochoa@duke.edu",
    "login": "alexviiia",
    "orcid": "0000-0003-4928-3403",
    "description": "Statistical geneticist, computational biologist.  Well-rounded nerd, also love languages and music.",
    "uuid": 12603341
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.5.0",
      "role": "Depends"
    },
    {
      "package": "RColorBrewer",
      "role": "Imports"
    },
    {
      "package": "graphics",
      "role": "Imports"
    },
    {
      "package": "grDevices",
      "role": "Imports"
    },
    {
      "package": "ape",
      "role": "Imports"
    },
    {
      "package": "BEDMatrix",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "bnpsd",
      "role": "Suggests"
    }
  ],
  "_owner": "storeylab",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-01",
      "n": 1
    },
    {
      "week": "2026-05",
      "n": 1
    }
  ],
  "_tags": [],
  "_stars": 21,
  "_contributors": [
    {
      "user": "alexviiia",
      "count": 172,
      "uuid": 12603341
    }
  ],
  "_userbio": {
    "uuid": 8007641,
    "type": "organization",
    "name": "Storey Lab",
    "description": "Storey Lab at Princeton University"
  },
  "_downloads": {
    "count": 258,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/popkin"
  },
  "_mentions": 2,
  "_devurl": "https://github.com/storeylab/popkin",
  "_searchresults": 104,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/popkin.html",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/storeylab/popkin",
  "_realowner": "storeylab",
  "_cranurl": true,
  "_releases": [
    {
      "version": "1.0.4",
      "date": "2018-01-15"
    },
    {
      "version": "1.0.5",
      "date": "2018-01-26"
    },
    {
      "version": "1.1.2",
      "date": "2019-02-14"
    },
    {
      "version": "1.2.2",
      "date": "2019-05-13"
    },
    {
      "version": "1.3.0",
      "date": "2019-12-18"
    },
    {
      "version": "1.3.7",
      "date": "2021-02-09"
    },
    {
      "version": "1.3.8",
      "date": "2021-02-11"
    },
    {
      "version": "1.3.13",
      "date": "2021-07-27"
    },
    {
      "version": "1.3.17",
      "date": "2022-01-27"
    },
    {
      "version": "1.3.23",
      "date": "2023-01-07"
    }
  ],
  "_exports": [
    "admix_label_cols",
    "admix_order_cols",
    "avg_kinship_subpops",
    "fst",
    "inbr",
    "inbr_diag",
    "mean_kinship",
    "n_eff",
    "plot_admix",
    "plot_phylo",
    "plot_popkin",
    "popkin",
    "popkin_A",
    "popkin_A_min_subpops",
    "popkin_af",
    "pwfst",
    "rescale_popkin",
    "validate_kinship",
    "weights_subpops"
  ],
  "_datasets": [
    {
      "name": "hgdp_subset",
      "title": "HGDP subset",
      "object": "hgdp_subset",
      "class": [
        "matrix",
        "array"
      ],
      "fields": [
        "EUROPE",
        "EUROPE",
        "EUROPE",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "AFRICA",
        "AFRICA",
        "AFRICA",
        "AFRICA",
        "AFRICA",
        "AFRICA",
        "EUROPE",
        "EUROPE",
        "EUROPE",
        "MIDDLE_EAST",
        "MIDDLE_EAST",
        "MIDDLE_EAST",
        "AFRICA",
        "AFRICA",
        "AFRICA",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "AMERICA",
        "AMERICA",
        "AMERICA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "MIDDLE_EAST",
        "MIDDLE_EAST",
        "MIDDLE_EAST",
        "EUROPE",
        "EUROPE",
        "EUROPE",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EUROPE",
        "EUROPE",
        "EUROPE",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "AMERICA",
        "AMERICA",
        "AMERICA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "AFRICA",
        "AFRICA",
        "AFRICA",
        "AMERICA",
        "AMERICA",
        "AMERICA",
        "AFRICA",
        "AFRICA",
        "AFRICA",
        "OCEANIA",
        "OCEANIA",
        "OCEANIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "MIDDLE_EAST",
        "MIDDLE_EAST",
        "MIDDLE_EAST",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EUROPE",
        "EUROPE",
        "EUROPE",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "MIDDLE_EAST",
        "MIDDLE_EAST",
        "MIDDLE_EAST",
        "OCEANIA",
        "OCEANIA",
        "OCEANIA",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "AMERICA",
        "AMERICA",
        "AMERICA",
        "EUROPE",
        "EUROPE",
        "EUROPE",
        "AFRICA",
        "AFRICA",
        "AFRICA",
        "EUROPE",
        "EUROPE",
        "EUROPE",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "AMERICA",
        "AMERICA",
        "AMERICA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EUROPE",
        "EUROPE",
        "EUROPE",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "CENTRAL_SOUTH_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "EAST_ASIA",
        "AFRICA",
        "AFRICA",
        "AFRICA"
      ],
      "rows": 5000,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "popkin-package",
      "title": "A package for estimating kinship and FST under arbitrary population structure",
      "topics": [
        "popkin-package"
      ]
    },
    {
      "page": "admix_label_cols",
      "title": "Label ancestries based on best match to individual labels",
      "topics": [
        "admix_label_cols"
      ]
    },
    {
      "page": "admix_order_cols",
      "title": "Reorder admixture matrix columns",
      "topics": [
        "admix_order_cols"
      ]
    },
    {
      "page": "avg_kinship_subpops",
      "title": "Calculate a kinship matrix between subpopulations by averaging individual data",
      "topics": [
        "avg_kinship_subpops"
      ]
    },
    {
      "page": "fst",
      "title": "Calculate FST from a population-level kinship matrix or vector of inbreeding coefficients",
      "topics": [
        "fst"
      ]
    },
    {
      "page": "hgdp_subset",
      "title": "HGDP subset",
      "topics": [
        "hgdp_subset"
      ]
    },
    {
      "page": "inbr",
      "title": "Extract inbreeding coefficients from a kinship matrix",
      "topics": [
        "inbr"
      ]
    },
    {
      "page": "inbr_diag",
      "title": "Replace kinship diagonal with inbreeding coefficients",
      "topics": [
        "inbr_diag"
      ]
    },
    {
      "page": "mean_kinship",
      "title": "Calculate the weighted mean kinship",
      "topics": [
        "mean_kinship"
      ]
    },
    {
      "page": "n_eff",
      "title": "Calculates the effective sample size of the data",
      "topics": [
        "n_eff"
      ]
    },
    {
      "page": "plot_admix",
      "title": "Make a structure/admixture plot",
      "topics": [
        "plot_admix"
      ]
    },
    {
      "page": "plot_phylo",
      "title": "Plot a 'phylo' tree object",
      "topics": [
        "plot_phylo"
      ]
    },
    {
      "page": "plot_popkin",
      "title": "Visualize one or more kinship matrices and other related objects",
      "topics": [
        "plot_popkin"
      ]
    },
    {
      "page": "popkin",
      "title": "Estimate kinship from a genotype matrix and subpopulation assignments",
      "topics": [
        "popkin"
      ]
    },
    {
      "page": "popkin_A",
      "title": "Compute popkin's 'A' and 'M' matrices from genotypes",
      "topics": [
        "popkin_A"
      ]
    },
    {
      "page": "popkin_A_min_subpops",
      "title": "Estimate the minimum expected value of a matrix 'A' using subpopulations",
      "topics": [
        "popkin_A_min_subpops"
      ]
    },
    {
      "page": "popkin_af",
      "title": "Estimate coancestry from an allele frequency matrix and subpopulation assignments",
      "topics": [
        "popkin_af"
      ]
    },
    {
      "page": "pwfst",
      "title": "Estimate the individual-level pairwise FST matrix",
      "topics": [
        "pwfst"
      ]
    },
    {
      "page": "rescale_popkin",
      "title": "Rescale kinship matrix to set a given kinship value to zero.",
      "topics": [
        "rescale_popkin"
      ]
    },
    {
      "page": "validate_kinship",
      "title": "Validate a kinship matrix",
      "topics": [
        "validate_kinship"
      ]
    },
    {
      "page": "weights_subpops",
      "title": "Get weights for individuals that balance subpopulations",
      "topics": [
        "weights_subpops"
      ]
    }
  ],
  "_pkglogo": "https://github.com/storeylab/popkin/raw/HEAD/man/figures/logo.png",
  "_readme": "https://github.com/storeylab/popkin/raw/HEAD/README.md",
  "_rundeps": [
    "ape",
    "digest",
    "lattice",
    "nlme",
    "RColorBrewer",
    "Rcpp"
  ],
  "_vignettes": [
    {
      "source": "popkin.Rmd",
      "filename": "popkin.html",
      "title": "Estimate Kinship and FST under Arbitrary Population Structure with popkin",
      "author": "Alejandro Ochoa and John D. Storey",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Kinship and inbreeding coefficients",
        "The generalized $\\Fst$",
        "The individual-level pairwise $\\Fst$",
        "Sample usage",
        "Input genotype data",
        "Load and clean sample data",
        "Estimate and visualize kinship using genotypes and subpopulations",
        "Estimate $\\Fst$ and individual inbreeding from a kinship matrix",
        "Estimate individual-level pairwise $\\Fst$ matrix from a kinship matrix",
        "Rescale kinship matrix in a subset of the data",
        "Plot multiple kinship matrices together",
        "Plot kinship matrices with multiple levels of labels",
        "Coancestry estimation from allele frequencies",
        "Admixture plot example",
        "References"
      ],
      "created": "2017-05-05 21:33:53",
      "modified": "2023-01-06 23:35:36",
      "commits": 22
    }
  ],
  "_score": 6.6402826296966815,
  "_indexed": true,
  "_nocasepkg": "popkin",
  "_universes": [
    "storeylab",
    "alexviiia"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.3.25.9000",
      "date": "2026-05-27T07:36:12.000Z",
      "distro": "noble",
      "commit": "a5d45b5f26f6c88e01099356572c72c18e07a922",
      "fileid": "8dd052881bb852954c101c5e7bdbfdd141ab13808f351b4a675fd2e5dd205ea9",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/storeylab/actions/runs/26497395363"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.3.25.9000",
      "date": "2026-05-27T07:36:05.000Z",
      "distro": "noble",
      "commit": "a5d45b5f26f6c88e01099356572c72c18e07a922",
      "fileid": "9d8500a458feb013b90b302498ccc9772892a3cdb915877599e659942690e548",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/storeylab/actions/runs/26497395363"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.3.25.9000",
      "date": "2026-05-27T07:37:24.000Z",
      "commit": "a5d45b5f26f6c88e01099356572c72c18e07a922",
      "fileid": "727025540fd7c495a977fb5f6482a055a7f2d1c4e9d4f93fa4623216ab16ede6",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/storeylab/actions/runs/26497395363"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.3.25.9000",
      "date": "2026-05-27T07:37:47.000Z",
      "commit": "a5d45b5f26f6c88e01099356572c72c18e07a922",
      "fileid": "3ddec93ddb7966f316310f29cf98c0240e70f5ad9726d4d52b68f58e37cc0d07",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/storeylab/actions/runs/26497395363"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.3.25.9000",
      "date": "2026-05-27T07:36:05.000Z",
      "commit": "a5d45b5f26f6c88e01099356572c72c18e07a922",
      "fileid": "9bef5285eadd3c14e84ffdc5780339d26ac6de7f0718328ce4572deb667cb3b7",
      "status": "success",
      "buildurl": "https://github.com/r-universe/storeylab/actions/runs/26497395363"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.3.25.9000",
      "date": "2026-05-27T07:35:15.000Z",
      "commit": "a5d45b5f26f6c88e01099356572c72c18e07a922",
      "fileid": "0ffe691a3cd247b70235d00fed7127dc4aec91f6749ad6bf1576f3519ae7e9e4",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/storeylab/actions/runs/26497395363"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.3.25.9000",
      "date": "2026-05-27T07:35:23.000Z",
      "commit": "a5d45b5f26f6c88e01099356572c72c18e07a922",
      "fileid": "9ef7095299a80492e42768a25bb84579837ed0b45b50dc6f1e25ae99cb1297cd",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/storeylab/actions/runs/26497395363"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.3.25.9000",
      "date": "2026-05-27T07:35:26.000Z",
      "commit": "a5d45b5f26f6c88e01099356572c72c18e07a922",
      "fileid": "f5e1588db04b276e43bde8529d98f2a7b1fd235e4464e2b254e12671395e20db",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/storeylab/actions/runs/26497395363"
    }
  ]
}