{"id":15938185,"url":"https://github.com/bradyajohnston/reluxr","last_synced_at":"2025-10-17T19:03:19.541Z","repository":{"id":121679070,"uuid":"463089680","full_name":"BradyAJohnston/reluxr","owner":"BradyAJohnston","description":"Deconvolute Luminescence Readings on Bacterial Culture Plates","archived":false,"fork":false,"pushed_at":"2023-03-20T12:39:30.000Z","size":7527,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-31T18:34:38.374Z","etag":null,"topics":["plate-reader","r","r-package","synthetic-biology"],"latest_commit_sha":null,"homepage":"https://bradyajohnston.github.io/reluxr/","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/BradyAJohnston.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-24T09:43:11.000Z","updated_at":"2023-07-18T09:10:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"ea1f1a84-2235-4012-8ce6-7a6194c4bdc2","html_url":"https://github.com/BradyAJohnston/reluxr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BradyAJohnston%2Freluxr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BradyAJohnston%2Freluxr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BradyAJohnston%2Freluxr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BradyAJohnston%2Freluxr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BradyAJohnston","download_url":"https://codeload.github.com/BradyAJohnston/reluxr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239922006,"owners_count":19718879,"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":["plate-reader","r","r-package","synthetic-biology"],"created_at":"2024-10-07T05:21:31.040Z","updated_at":"2025-10-17T19:03:14.521Z","avatar_url":"https://github.com/BradyAJohnston.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\nbibliography: '`r system.file(\"REFERENCES.bib\", package=\"reluxr\")`'\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# reluxr\n\n\u003c!-- badges: start --\u003e\n\n[![R-CMD-check](https://github.com/BradyAJohnston/reluxr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/BradyAJohnston/reluxr/actions/workflows/R-CMD-check.yaml) [![CRAN status](https://www.r-pkg.org/badges/version/reluxr)](https://CRAN.R-project.org/package=reluxr) [![reluxr status badge](https://bradyajohnston.r-universe.dev/badges/reluxr)](https://bradyajohnston.r-universe.dev) [![:name status badge](https://bradyajohnston.r-universe.dev/badges/:name)](https://bradyajohnston.r-universe.dev)\n\n\u003c!-- badges: end --\u003e\n\nImplements the deconvolution algorithm developed in Mauri, Vecchione, and Fritz (2019) which enables deconvolution of luminscence readings for experimental culture plates.\n{reluxr} provides functions for calculating the 'best' deconvolution matrix from a calibration plate, and enables usage of this calibration matrix (or one calculated previously) to adjust luminescent experimental values from a plate reader.\nThis is an R-based implementation of the MatLab workflow from the original paper paper titled *1Deconvolution of Luminescence Cross-Talk in High-Throughput Gene Expression Profiling'* [@mauri2019]\n\n## Installation\n\nThe package is not currently available on CRAN.\nInstall the released version from `r-universe` with the following code:\n\n``` r\ninstall.package(\"reluxr\", repos = \"https://bradyajohnston.r-universe.dev\")\n```\n\n## Example\n\nThis is a basic example which shows you how to solve a common problem:\n\n```{r}\n#| label: setup\n#| message: false\n#| warning: false\nlibrary(reluxr)\n\nfl \u003c- system.file(\n   \"extdata\",\n   \"calibrate_tecan\",\n   \"calTecan1.xlsx\",\n   package = \"reluxr\"\n )\n```\n\n## Create a Deconvolution Matrix\n\nThe deconvolution matrix is created from a calibration plate, which contains a single well with luminescent bacteria, with all other wells being empty.\nThe cross-talk when the plate-reader measures the wells can then be calculated and used to create a deconvolution matrix which will remove the crosstalk from the measured values.\n\n```{r}\ndat \u003c- plate_read_tecan(fl)\n\ndat\n```\n\nRegardless of how you read in the required data, it needs to be (and should be regardless) in a _tidy_ format, with each row being an observation and each column a variable. In the case above we have columns for the `cycle_nr`, `time_s`, `signal`, `well` and `value`. While it would be better to have a column for the OD600 and for the LUMI data, the time points do not match and aren't currently pivotable.\n\nTo have a look at the final data, we can plot the plate based on log-transformed luminescence values. We can see the very bright single well than contains the bacteria, and the bleed-through signal that is around it.\n\n```{r}\ndat_fil \u003c- dat |\u003e \n  dplyr::filter(signal == \"LUMI\", time_s \u003e 500)\n\n\ndat_fil |\u003e \n  dplyr::group_by(well) |\u003e \n  dplyr::summarise(value = mean(value)) |\u003e \n  rl_plot_plate(value)\n\n```\n\nWe can use the `rl_calc_decon_matrix()` function which will calculate a deconvolution matrix, reducing the background bleed-through from the plate to below a noise threshold. The noise threshold should be the instrument's background noise, which is defined as three times the standard deviation of a blank well. The lower the noise threshold, the harder it will be to calculate a deconvolution matrix which works with the data.\n\nWe can also quickly look at the resulting deconvolution matrix (`mat_d_best`) itself.\n\n```{r}\nmat_d_best \u003c- rl_calc_decon_matrix(\n  data = dat_fil,\n  value = value,\n  time = time_s,\n  ref_well = \"E05\",\n  b_noise = 20\n)\n\nimage(log10(mat_d_best))\n```\n\n## Deconvoluting the Data\n\nNow that we have the matrix, we can use it to adjust the data.\n\nWe do so using the `rl_adjust_plate()` funciton, which takes a dataframe, the name of the column you which to adjust, the deconvolution matrix (in this case `mat_d_best`, and the name ofthe column which stores the time data).\n\nThe returned dataframe will have the value column adjusted and deconvoluted using the deconvolution matrix supplied.\n\nIn the examples below we first plot all of the values without deconvolution, then apply the deconvolution matrix and plot the values again.\n```{r}\n#| code-fold: true\nrl_plot_time \u003c- function(data, time, value, group = \"well\") {\n  \n  data \u003c- dplyr::mutate(\n    data, \n    time = {{ time }}, \n    value = {{ value }}, \n    group = {{ group }}\n  )\n  \n  plt \u003c- ggplot2::ggplot(\n    data, \n    mapping = ggplot2::aes(\n      x = time,\n      y = value, \n      group = group\n    )\n  ) + \n    ggplot2::geom_line() + \n    ggplot2::scale_y_log10() + \n    ggplot2::theme_bw()\n  \n  plt\n}\n```\n\n\n#### Raw Values\n```{r}\ndat |\u003e\n  dplyr::filter(signal == \"LUMI\") |\u003e \n  rl_plot_time(time_s, value, well) + \n  ggplot2::labs(\n    x = \"Time (s)\", \n    y = \"LUM\"\n  )\n```\n\n#### Deconvoluted Values\n```{r}\ndat |\u003e\n  dplyr::filter(signal == \"LUMI\") |\u003e \n  \n  rl_adjust_plate(value, mat_d_best, time = time_s) |\u003e # deconvolute the values\n  \n  rl_plot_time(time_s, value, well) + \n  ggplot2::labs(\n    x = \"Time (s)\", \n    y = \"LUM\"\n  )\n\n\n```\n\nWe can also replot the plate from earlier, with the newly deconvoluted values.\n\n```{r}\n\ndat_fil |\u003e \n  rl_adjust_plate(value, mat_d_best, time = time_s) |\u003e # deconvolute the values\n  dplyr::group_by(well) |\u003e \n  dplyr::summarise(value = mean(value)) |\u003e \n  rl_plot_plate(value) + \n  ggplot2::scale_fill_viridis_c(\n    \"log10(LUMI)\",\n    breaks = 1:5, \n    limits = c(1, NA)\n  )\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradyajohnston%2Freluxr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbradyajohnston%2Freluxr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradyajohnston%2Freluxr/lists"}