{"id":19994047,"url":"https://github.com/kapsner/rbiascorrection","last_synced_at":"2026-01-03T09:02:49.911Z","repository":{"id":48285005,"uuid":"192962743","full_name":"kapsner/rBiasCorrection","owner":"kapsner","description":"R package to correct measurement biases in gene methylation analyses","archived":false,"fork":false,"pushed_at":"2024-05-24T12:51:06.000Z","size":695,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-24T11:46:52.124Z","etag":null,"topics":["bias-correction","cran","gene-methylation","pcr","r","r-package"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kapsner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-06-20T17:38:21.000Z","updated_at":"2023-01-16T10:18:11.000Z","dependencies_parsed_at":"2023-09-24T18:10:18.098Z","dependency_job_id":null,"html_url":"https://github.com/kapsner/rBiasCorrection","commit_stats":{"total_commits":275,"total_committers":1,"mean_commits":275.0,"dds":0.0,"last_synced_commit":"3873d8f363859990468eee41b94a192d28fda92f"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapsner%2FrBiasCorrection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapsner%2FrBiasCorrection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapsner%2FrBiasCorrection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapsner%2FrBiasCorrection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kapsner","download_url":"https://codeload.github.com/kapsner/rBiasCorrection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243934009,"owners_count":20371108,"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":["bias-correction","cran","gene-methylation","pcr","r","r-package"],"created_at":"2024-11-13T04:53:53.088Z","updated_at":"2026-01-03T09:02:49.903Z","avatar_url":"https://github.com/kapsner.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# rBiasCorrection\n\n\u003c!-- badges: start --\u003e\n\n[![](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n[![](https://www.r-pkg.org/badges/version/rBiasCorrection)](https://cran.r-project.org/package=rBiasCorrection)\n[![CRAN\nchecks](https://badges.cranchecks.info/worst/rBiasCorrection.svg)](https://cran.r-project.org/web/checks/check_results_rBiasCorrection.html)\n[![](http://cranlogs.r-pkg.org/badges/grand-total/rBiasCorrection?color=blue)](https://cran.r-project.org/package=rBiasCorrection)\n[![](http://cranlogs.r-pkg.org/badges/last-month/rBiasCorrection?color=blue)](https://cran.r-project.org/package=rBiasCorrection)\n[![Dependencies](https://tinyverse.netlify.app/badge/rBiasCorrection)](https://cran.r-project.org/package=rBiasCorrection)\n[![R build\nstatus](https://github.com/kapsner/rBiasCorrection/workflows/R%20CMD%20Check%20via%20%7Btic%7D/badge.svg)](https://github.com/kapsner/rBiasCorrection/actions)\n[![R build\nstatus](https://github.com/kapsner/rBiasCorrection/workflows/lint/badge.svg)](https://github.com/kapsner/rBiasCorrection/actions)\n[![R build\nstatus](https://github.com/kapsner/rBiasCorrection/workflows/test-coverage/badge.svg)](https://github.com/kapsner/rBiasCorrection/actions)\n[![](https://codecov.io/gh/https://github.com/kapsner/rBiasCorrection/branch/master/graph/badge.svg)](https://codecov.io/gh/https://github.com/kapsner/rBiasCorrection)\n[![](https://img.shields.io/badge/doi-10.1002/ijc.33681-yellow.svg)](https://doi.org/10.1002/ijc.33681)\n\n\u003c!-- badges: end --\u003e\n\n`rBiasCorrection` is published in *‘BiasCorrector: fast and accurate\ncorrection of all types of experimental biases in quantitative DNA\nmethylation data derived by different technologies’ (2021)* in the\n*International Journal of Cancer* (DOI:\n[https://onlinelibrary.wiley.com/doi/10.1002/ijc.33681](https://doi.org/10.1002/ijc.33681)).\n\n`rBiasCorrection` is the R implementation with minor modifications of\nthe algorithms described by Moskalev et al. in their research article\n*‘Correction of PCR-bias in quantitative DNA methylation studies by\nmeans of cubic polynomial regression’*, published 2011 in *Nucleic acids\nresearch, Oxford University Press* (DOI:\n\u003chttps://doi.org/10.1093/nar/gkr213\u003e).\n\n# Installation\n\n## CRAN version\n\nYou can install `rBiasCorrection` simply with via R’s `install.packages`\ninterface:\n\n``` r\ninstall.packages(\"rBiasCorrection\")\n```\n\n## Development version\n\nIf you want to use the latest development version, you can install the\ngithub version of `rBiasCorrection` with:\n\n``` r\ninstall.packages(\"remotes\")\nremotes::install_github(\"kapsner/rBiasCorrection\")\n```\n\n## Example\n\nThis is a basic example which shows you how to correct PCR-bias in\nquantitative DNA methylation data:\n\n``` r\nlibrary(rBiasCorrection)\n\n# define input file paths\nexperimental \u003c- file.path(tempdir(), \"/experimental_data.csv\")\ncalibration \u003c- file.path(tempdir(), \"/calibration_data.csv\")\n\n# create example files from provided example dataset\ndata.table::fwrite(\n  rBiasCorrection::example.data_experimental$dat,\n  experimental\n)\ndata.table::fwrite(\n  rBiasCorrection::example.data_calibration$dat,\n  calibration\n)\n\n# run bias correction algorithm\nbiascorrection(\n  experimental = experimental,\n  calibration = calibration,\n  samplelocusname = \"BRAF\"\n)\n```\n\nMore detailed information on how to use the package `rBiasCorrection`\ncan be found in the\n[vignette](https://cran.r-project.org/web/packages/rBiasCorrection/vignettes/rBiasCorrection_howto.html)\nand the\n[FAQs](https://github.com/kapsner/rBiasCorrection/blob/master/FAQ.md).\n\n## Available Fitting Options (TODO)\n\nThere are three fitting options available for fitting the non-linear\nleast squares (nls) algorithm with `rBiasCorrection`. The default method\n(used in the publication) is to fit nls with the Gauss-Newton algorithm\nand define for each parameter that should be optimized a random grid\nbetween -1000 and 1000 for initializing the starting estimates\n(`options(rBiasCorrection.nls_implementation = \"GN.paper\")`.  \nFor making a better guess on the starting estimates when fitting nls\nwith the Gauss-Newton algorithm\n(`options(rBiasCorrection.nls_implementation = \"GN.guess\")`), the\nestimates of a linear model (for both hyperbolic corrections) and of a\ncubic model (for the cubic correction with defined minimum- and maximum\nvalues (`minmax = TRUE`)) are computed for initializing the nls (see\ndetails below).  \nThe third option is to fit nls with the Levenberg-Marquardt algorithm\n(using the implementation from the `minpack.lm` R package). In this\ncase, the start estimates of the nls model are also guessed using either\na linear or a cubic model (as previously described).\n\n### `GN.paper`\n\nAlgorithm: Gauss-Newton\n\nParameterizing `nls2::nls2()` with starting values:\n\n- hyperbolic equation: a = b = d = c(-1000, 1000)\n- hyperbolic equation (minmax): b = c(-1000, 1000)\n- cubic equation (minmax): a, b = c(-1000, 1000)\n\n``` r\noptions(rBiasCorrection.nls_implementation = \"GN.paper\")\n```\n\n### `GN.guess`\n\nAlgorithm: Gauss-Newton\n\nParameterizing `nls2::nls2()` with starting values:\n\n- hyperbolic equation: fitting a linear regression and taking the\n  intercept and the beta as starting values and defaulting `d` to `1000`\n- hyperbolic equation (minmax): fitting a linear regression and taking\n  the beta as starting value\n- cubic equation (minmax): fitting a cubic regression and taking the\n  betas for the cubic and the quadratic term as starting values\n\n``` r\noptions(rBiasCorrection.nls_implementation = \"GN.guess\")\n```\n\n### `LM`\n\nAlgorithm: Levenberg-Marquardt\n\nParameterizing `minpack.lm::nlsLM()` with starting values: same as\nguessing starting values for option `GN.guess`\n\n``` r\noptions(rBiasCorrection.nls_implementation = \"LM\")\n```\n\n## BiasCorrector\n\nThe GUI `BiasCorrector` provides the functionality implemented in\n`rBiasCorrection` in a web application. For further information please\nvisit \u003chttps://github.com/kapsner/BiasCorrector\u003e.\n\n## FAQ\n\nFor further information, please refer to the [frequently asked\nquestions](https://github.com/kapsner/rBiasCorrection/blob/master/FAQ.md).\n\n## Citation\n\nL.A. Kapsner, M.G. Zavgorodnij, S.P. Majorova, A. Hotz‐Wagenblatt, O.V.\nKolychev, I.N. Lebedev, J.D. Hoheisel, A. Hartmann, A. Bauer, S. Mate,\nH. Prokosch, F. Haller, and E.A. Moskalev, BiasCorrector: fast and\naccurate correction of all types of experimental biases in quantitative\nDNA methylation data derived by different technologies, Int. J. Cancer.\n(2021) ijc.33681.\ndoi:[10.1002/ijc.33681](https://onlinelibrary.wiley.com/doi/10.1002/ijc.33681).\n\n``` bibtex\n@article{kapsner2021,\n  title = {{{BiasCorrector}}: Fast and Accurate Correction of All Types of Experimental Biases in Quantitative {{DNA}} Methylation Data Derived by Different Technologies},\n  author = {Kapsner, Lorenz A. and Zavgorodnij, Mikhail G. and Majorova, Svetlana P. and Hotz-Wagenblatt, Agnes and Kolychev, Oleg V. and Lebedev, Igor N. and Hoheisel, J{\\\"o}rg D. and Hartmann, Arndt and Bauer, Andrea and Mate, Sebastian and Prokosch, Hans-Ulrich and Haller, Florian and Moskalev, Evgeny A.},\n  year = {2021},\n  month = may,\n  pages = {ijc.33681},\n  issn = {0020-7136, 1097-0215},\n  doi = {10.1002/ijc.33681},\n  journal = {International Journal of Cancer},\n  language = {en}\n}\n```\n\n## More Infos\n\n- Original work by Moskalev et al.: https://doi.org/10.1093/nar/gkr213\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkapsner%2Frbiascorrection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkapsner%2Frbiascorrection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkapsner%2Frbiascorrection/lists"}