{
  "_id": "6a489a8de06c18f0a6542dbd",
  "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-07-04 05:17:35 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>",
  "_user": "storeylab",
  "_type": "src",
  "_file": "popkin_1.3.25.9000.tar.gz",
  "_fileid": "https://r2.ropensci.org/cd95df9d1d43a78bc17372aec7d51aef5da2d06f48b062b493f08b970d7295f9",
  "_filesize": 1552702,
  "_sha256": "cd95df9d1d43a78bc17372aec7d51aef5da2d06f48b062b493f08b970d7295f9",
  "_expires": "2026-10-12T05:30:51.000Z",
  "_created": "2026-07-04T05:17:35.000Z",
  "_published": "2026-07-04T05:30:53.150Z",
  "_jobs": [
    {
      "job": 85105556897,
      "time": 128,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "8078613758"
    },
    {
      "job": 85105556875,
      "time": 122,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8078612763"
    },
    {
      "job": 85105556858,
      "time": 80,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "8078666637"
    },
    {
      "job": 85105556864,
      "time": 85,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8078687175"
    },
    {
      "job": 85105377536,
      "time": 163,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8078597625"
    },
    {
      "job": 85105556855,
      "time": 133,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "8078614393"
    },
    {
      "job": 85105556861,
      "time": 65,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "8078606008"
    },
    {
      "job": 85105556887,
      "time": 76,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "8078607183"
    },
    {
      "job": 85105556860,
      "time": 70,
      "config": "windows-release",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8078606514"
    }
  ],
  "_host": "GitHub-Actions",
  "_buildurl": "https://github.com/r-universe/storeylab/actions/runs/28695933414",
  "_status": "success",
  "_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
  },
  "_distro": "resolute",
  "_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",
    "followers": 21,
    "description": "Storey Lab at Princeton University"
  },
  "_downloads": {
    "count": 381,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/popkin"
  },
  "_mentions": 2,
  "_devurl": "https://github.com/storeylab/popkin",
  "_searchresults": 107,
  "_rbuild": "4.6.1",
  "_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.6526330680831105,
  "_indexed": true,
  "_nocasepkg": "popkin",
  "_universes": [
    "storeylab",
    "alexviiia"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.3.25.9000",
      "date": "2026-07-04T05:19:43.000Z",
      "distro": "resolute",
      "commit": "a5d45b5f26f6c88e01099356572c72c18e07a922",
      "fileid": "https://r2.ropensci.org/1ec4812820c1fd03865f217844ef7e0878e66694abad32fa92c1abe0bebfdea3",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/storeylab/actions/runs/28695933414"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "1.3.25.9000",
      "date": "2026-07-04T05:19:38.000Z",
      "distro": "resolute",
      "commit": "a5d45b5f26f6c88e01099356572c72c18e07a922",
      "fileid": "https://r2.ropensci.org/eebc81385d80fa02c27c16c78e4f25aedaf835084b8bfa318ef4256de43b359b",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/storeylab/actions/runs/28695933414"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.3.25.9000",
      "date": "2026-07-04T05:27:15.000Z",
      "commit": "a5d45b5f26f6c88e01099356572c72c18e07a922",
      "fileid": "https://r2.ropensci.org/d8c8a6e863cf5d548234551778241cb2704f200a8f9e9392294a5167dc1e2ba3",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/storeylab/actions/runs/28695933414"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "1.3.25.9000",
      "date": "2026-07-04T05:30:21.000Z",
      "commit": "a5d45b5f26f6c88e01099356572c72c18e07a922",
      "fileid": "https://r2.ropensci.org/7f175684c0c2a54fe0891b287a48a6595a8b9ebff2468f34b384cf3b9666922a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/storeylab/actions/runs/28695933414"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.3.25.9000",
      "date": "2026-07-04T05:20:05.000Z",
      "commit": "a5d45b5f26f6c88e01099356572c72c18e07a922",
      "fileid": "https://r2.ropensci.org/39c77cd3913ddafcd35f80b85aedc4383ead058a016b4cbc0ccab4de7bad6c31",
      "status": "success",
      "buildurl": "https://github.com/r-universe/storeylab/actions/runs/28695933414"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.3.25.9000",
      "date": "2026-07-04T05:18:37.000Z",
      "commit": "a5d45b5f26f6c88e01099356572c72c18e07a922",
      "fileid": "https://r2.ropensci.org/db7aabff147b93442b45966b0270c41b402482032eadab26d90ac82736e39851",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/storeylab/actions/runs/28695933414"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.3.25.9000",
      "date": "2026-07-04T05:18:45.000Z",
      "commit": "a5d45b5f26f6c88e01099356572c72c18e07a922",
      "fileid": "https://r2.ropensci.org/5fb689d49e66599623c778cc7cbc52f4b5635a6a2c66b0467f3c24d29b93c3b2",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/storeylab/actions/runs/28695933414"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "1.3.25.9000",
      "date": "2026-07-04T05:18:40.000Z",
      "commit": "a5d45b5f26f6c88e01099356572c72c18e07a922",
      "fileid": "https://r2.ropensci.org/5de6745b72f9d5a2f1a5c191fd39bf52a7c35f6a70be8f9bf793f66c7267ad1b",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/storeylab/actions/runs/28695933414"
    }
  ]
}