{"id":31790754,"url":"https://github.com/gtonkinhill/rhierbaps","last_synced_at":"2025-10-10T16:29:37.666Z","repository":{"id":54344543,"uuid":"111926448","full_name":"gtonkinhill/rhierbaps","owner":"gtonkinhill","description":"rhierbaps: R implementation of hierBAPS","archived":false,"fork":false,"pushed_at":"2021-05-02T06:15:41.000Z","size":1707,"stargazers_count":35,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-08T13:38:28.455Z","etag":null,"topics":["population-genetics","population-genomics","population-structure","r"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gtonkinhill.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-24T14:22:47.000Z","updated_at":"2025-06-08T14:31:14.000Z","dependencies_parsed_at":"2022-08-13T12:40:42.422Z","dependency_job_id":null,"html_url":"https://github.com/gtonkinhill/rhierbaps","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/gtonkinhill/rhierbaps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtonkinhill%2Frhierbaps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtonkinhill%2Frhierbaps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtonkinhill%2Frhierbaps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtonkinhill%2Frhierbaps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gtonkinhill","download_url":"https://codeload.github.com/gtonkinhill/rhierbaps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtonkinhill%2Frhierbaps/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004707,"owners_count":26083750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["population-genetics","population-genomics","population-structure","r"],"created_at":"2025-10-10T16:29:36.572Z","updated_at":"2025-10-10T16:29:37.661Z","avatar_url":"https://github.com/gtonkinhill.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\nbibliography: vignettes/bibliography.bib\noutput: \n  github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"inst/vignette-supp/\",\n  echo=TRUE, \n  warning=FALSE, \n  message=FALSE,\n  tidy=TRUE\n)\n```\n\n\u003c!-- badges: start --\u003e\n  [![R-CMD-check](https://github.com/gtonkinhill/rhierbaps/workflows/R-CMD-check/badge.svg)](https://github.com/gtonkinhill/rhierbaps/actions)\n\u003c!-- badges: end --\u003e\n\n\n# rhierbaps\n\nWe have recently developed a faster verion of the BAPs clustering method. It can be found [here](https://github.com/gtonkinhill/fastbaps). \n\n## Installation\n`rhierbaps` is available on CRAN.\n```{r, eval=FALSE}\ninstall.packages(\"rhierbaps\")\n```\n\nThe development version is available on github. It can be installed with `devtools`\n```{r, eval = FALSE}\ninstall.packages(\"devtools\")\n\ndevtools::install_github(\"gtonkinhill/rhierbaps\")\n```\n\nIf you would like to also build the vignette with your installation run:\n\n```{r, eval=FALSE}\ndevtools::install_github(\"gtonkinhill/rhierbaps\", build_vignettes = TRUE)\n```\n\n## Quick Start\nRun hierBAPS.\n\n```{r, fig.width =8, fig.height=6, fig.align='center'}\n# install.packages(\"rhierbaps\")\nlibrary(rhierbaps)\n\nfasta.file.name \u003c- system.file(\"extdata\", \"seqs.fa\", package = \"rhierbaps\")\nsnp.matrix \u003c- load_fasta(fasta.file.name)\nhb.results \u003c- hierBAPS(snp.matrix, max.depth=2, n.pops=20, quiet = TRUE)\nhead(hb.results$partition.df)\n```\n\n```{r, echo = FALSE}\nintro_rmd \u003c- 'vignettes/introduction.Rmd'\n\nraw_rmd \u003c- readLines(intro_rmd)\n\n# remove yaml \nyaml_lines \u003c- grep(\"---\", raw_rmd)\n\n# remove appendix (session info)\nappendix \u003c- grep(\"Session\", raw_rmd)\n\ncompressed_rmd \u003c- raw_rmd[c(-seq(yaml_lines[1], yaml_lines[2], by = 1), \n                            -seq(appendix, length(raw_rmd)))]\nwriteLines(compressed_rmd, \"child.Rmd\")\n```\n\n```{r, child = 'child.Rmd'}\n```\n\n```{r cleanup, echo=FALSE, include=FALSE}\nif (file.exists(\"child.Rmd\")) {\n  file.remove(\"child.Rmd\")\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgtonkinhill%2Frhierbaps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgtonkinhill%2Frhierbaps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgtonkinhill%2Frhierbaps/lists"}