{"id":25977603,"url":"https://github.com/nylander/saturation.plot","last_synced_at":"2026-06-11T09:31:33.503Z","repository":{"id":223713223,"uuid":"760635961","full_name":"nylander/saturation.plot","owner":"nylander","description":"Code for for displaying the relationship between the uncorrected (P-) distance and the distance on a phylogenetic tree","archived":false,"fork":false,"pushed_at":"2025-02-11T10:08:28.000Z","size":412,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-05T04:38:36.782Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nylander.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-20T16:53:05.000Z","updated_at":"2025-02-11T10:08:32.000Z","dependencies_parsed_at":"2024-02-21T18:05:52.046Z","dependency_job_id":null,"html_url":"https://github.com/nylander/saturation.plot","commit_stats":null,"previous_names":["nylander/saturation.plot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nylander/saturation.plot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylander%2Fsaturation.plot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylander%2Fsaturation.plot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylander%2Fsaturation.plot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylander%2Fsaturation.plot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nylander","download_url":"https://codeload.github.com/nylander/saturation.plot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylander%2Fsaturation.plot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34192870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"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":[],"created_at":"2025-03-05T04:38:41.465Z","updated_at":"2026-06-11T09:31:33.471Z","avatar_url":"https://github.com/nylander.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Saturation plots\r\n\r\n- Last modified: ons feb 21, 2024  11:27\r\n- Sign: JN\r\n\r\n![Saturation plots](img/plots.png)\r\n\r\n## Description\r\n\r\nCode for generating saturation plots used in [Klopfstein et al.,\r\n2013](https://doi.org/10.1371/journal.pone.0069344) for displaying the\r\nrelationship between the uncorrected (P-) distance and the distance on a\r\nphylogenetic tree.\r\n\r\n## Requirements\r\n\r\n[R](https://www.r-project.org/) with R-package\r\n[ape](https://cloud.r-project.org/web/packages/ape/index.html).\r\nRecently tested with R v4.3.2 and ape v5.7.1.\r\n\r\n## Input\r\n\r\n1. Multiple sequence alignment in fasta format ([example](data/data.fas))\r\n2. Tree with tip labels corresponding to sequence labels\r\n   ([example](data/tree.phy))\r\n\r\n## Examples\r\n\r\n```R\r\nlibrary(\"ape\")\r\nsource(\"src/saturation.plot.R\")\r\ntree \u003c- read.tree(\"data/tree.phy\")\r\nultrametric_tree \u003c- read.tree(\"data/ultrametric.phy\")\r\ndna \u003c- read.dna(\"data/data.fas\", format=\"fasta\")\r\nthird_pos \u003c- dna[, seq(3, ncol(dna), by=3)]\r\nfirstsecond_pos \u003c- dna[, -seq(3, ncol(dna), by=3)]\r\npar(mfrow=c(2, 3))\r\nsaturation.plot(tree, dna, main=\"Default\")\r\nsaturation.plot(tree, dna, main=\"Background, no regression line\",\r\n    bg=TRUE, regr=FALSE)\r\nsaturation.plot(tree, dna, main=\"Change some settings\",\r\n    bg=FALSE, col=\"red\", ylim=c(0, 0.08), cex=0.5)\r\nsaturation.plot(tree, dna, main=\"Other colors and symbols\",\r\n    bg=TRUE, col=\"yellow\", bg.col=\"darkgray\", reg.col=\"red\",\r\n    pch=24, cex=1.5, lwd=2)\r\nsaturation.plot(ultrametric_tree, dna, main=\"Use ultrametric tree\")\r\nsaturation.plot(tree, firstsecond_pos, main=\"Codon pos 1st+2nd vs. 3rd\",\r\n    regr=FALSE, col=\"red\", ylim=c(0, 0.15))\r\nsaturation.plot(tree, third_pos,\r\n    bg=FALSE, regr=FALSE, col=\"blue\", ylim=c(0, 0.15), add=TRUE)\r\nlegend(x=\"topright\", legend=c(\"3rd\", \"1st+2nd\"),\r\n    col=c(\"blue\", \"red\"), pch=20, bty=\"n\")\r\n```\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnylander%2Fsaturation.plot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnylander%2Fsaturation.plot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnylander%2Fsaturation.plot/lists"}