{"id":22175026,"url":"https://github.com/andschar/standartox","last_synced_at":"2025-07-02T12:34:35.966Z","repository":{"id":56934979,"uuid":"200380733","full_name":"andschar/standartox","owner":"andschar","description":"Standardising toxicity data","archived":false,"fork":false,"pushed_at":"2022-11-21T16:39:53.000Z","size":4383,"stargazers_count":14,"open_issues_count":7,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-12T21:05:18.984Z","etag":null,"topics":["api","ecotoxicology","r"],"latest_commit_sha":null,"homepage":"https://andschar.github.io/standartox","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/andschar.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-03T13:48:56.000Z","updated_at":"2025-03-02T02:56:04.000Z","dependencies_parsed_at":"2022-08-21T01:10:09.723Z","dependency_job_id":null,"html_url":"https://github.com/andschar/standartox","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/andschar/standartox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andschar%2Fstandartox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andschar%2Fstandartox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andschar%2Fstandartox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andschar%2Fstandartox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andschar","download_url":"https://codeload.github.com/andschar/standartox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andschar%2Fstandartox/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263141031,"owners_count":23419986,"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","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":["api","ecotoxicology","r"],"created_at":"2024-12-02T07:55:50.175Z","updated_at":"2025-07-02T12:34:35.951Z","avatar_url":"https://github.com/andschar.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ntitle: \"Standartox\"\noutput: rmarkdown::github_document\neditor_options: \n  chunk_output_type: console\n---\n\n[![CRAN](https://www.r-pkg.org/badges/version/standartox)](https://CRAN.R-project.org/package=standartox)\n[![Downloads](https://cranlogs.r-pkg.org/badges/standartox)](https://cran.r-project.org/package=standartox)\n\nStandartox is a database and tool facilitating the retrieval of ecotoxicological test data. It is based on the [EPA ECOTOX database](https://cfpub.epa.gov/ecotox/) as well as on data from several other chemical databases and allows users to filter and aggregate ecotoxicological test data in an easy way. It can be accessed via this R-package [standartox](https://github.com/andschar/standartox). Ecotoxicological test data is used in environmental risk assessment to calculate effect measures such as [TU - Toxic Units](https://en.wikipedia.org/wiki/Toxic_unit) or [SSD - Species Sensitivity Distributions](https://edild.github.io/ssd/) to asses environmental toxicity of chemicals.\n\n## Installation\n\n**_NOTE:_** Currently v0.0.2 is only available here on GitHub.\n\n```{r eval=FALSE}\n# install.packages('standartox') # Currently only available on GitHub\nremotes::install_github('andschar/standartox') # development version\n```\n\n## Functions\n\nStandartox mainly consists of the functions `stx_catalog()` and `stx_datay()`. The former allows you to retrieve a summary catalog of the data. The latter fetches toxicity values from the database. There are also `stx_chem()`, `stx_taxa()` and `stx_meta()` funcitons which fetch chemical, taxonomic and meta data respectively.\n\n### `stx_catalog()`\n\nThe function returns a list of all possible arguments that can bes use in `stx_query()`.\n\n```{r message=FALSE}\nrequire(standartox)\ncatal = stx_catalog()\nnames(catal)\n```\n\n```{r eval=FALSE}\ncatal$endpoint # access the parameter top five endpoints\n```\n\n```{r echo=FALSE}\nendpoint = catal$endpoint\nknitr::kable(endpoint[1:5])\n```\n\n### `stx_data()`\n\nThe function allows you to retrieve all the Standartox data.\n\n```{r echo=FALSE}\ndat = stx_data()\n```\n\n## Example: _Oncorhynchus_\n\nLet's say, we want to retrieve the 20 most tested chemicals on the genus _[Oncorhynchus](https://en.wikipedia.org/wiki/Oncorhynchus)_. We allow for test durations between 48 and 120 hours and want the tests restricted to active ingredients only. Since we are only interested in the half maximal effective concentration, we choose XX50 as our endpoint. As an aggregation method we choose the geometric mean. The code below makes use of the data.table package.\n\n```{r warning=FALSE}\nrequire(data.table)\nrequire(standartox)\n# Retrieve the data\ndat = stx_data()\ntax = stx_taxa()\nche = stx_chem()\n# Merge\ndat2 = merge(dat, tax, by = 'tl_id', all.x = TRUE)\ndat2 = merge(dat2, che, by = 'cl_id', all.x = TRUE)\ndat3 = dat2[\n  endpoint == 'LC50' \u0026\n  duration %between% c(48, 120) \u0026\n  concentration_type == 'active ingredient' \u0026\n  grepl('Oncorhynchus', taxon) # fish genus\n]\n```\n\nWe subset the retrieved data to the 20 most tested chemicals and plot the result.\n\n```{r warning=FALSE, message=FALSE}\ncas20 = dat3[ , .N, cas ][ order(-N) ][1:20]\ndat4 = dat3[ cas %in% cas20$cas ]\ndat4_gmn = dat4[ , .(gmn = exp(mean(log(concentration), na.rm = TRUE))), .(cas, cname, taxon)]\n```\n\n```{r warning=FALSE, message=FALSE, fig.width=9, fig.height=6, dpi=300}\nrequire(ggplot2)\nggplot(dat4, aes(y = cname)) +\n  geom_point(aes(x = concentration, col = 'All values'),\n             pch = 1, alpha = 0.3) +\n  geom_point(data = dat4_gmn,\n             aes(y = reorder(cname, -gmn), x = gmn, col = 'Standartox value\\n(Geometric mean)'),\n             size = 3) +\n  scale_x_log10(breaks = c(0.01, 0.1, 1, 10, 100, 1000, 10000),\n                labels = c(0.01, 0.1, 1, 10, 100, 1000, 10000)) +\n  scale_color_viridis_d(name = '') +\n  labs(title = 'Oncorhynchus EC50 values',\n       subtitle = '20 most tested chemicals',\n       x = 'Concentration (ppb)') +\n  theme_minimal() +\n  theme(axis.title.y = element_blank())\n```\n\n## Article\n\nThe article on Standartox is published [here](https://www.mdpi.com/2306-5729/5/2/46).\n\n## Contributors\n\n### Want to contribute?\n\nCheck out our [contribution guide here](https://github.com/andschar/standartox/blob/master/CONTRIBUTING.md).\n\n### Meta\n\n  - Please report any [issues, bugs or feature requests](https://github.com/andschar/standartox/issues)\n  - License: MIT\n  - Get citation information for the standartox package in R doing `citation(package = 'standartox')`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandschar%2Fstandartox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandschar%2Fstandartox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandschar%2Fstandartox/lists"}