Skip to main content

REBAR (Removing the Effects of Bias through Analysis of Residuals): Improving the accuracy of bulk fitness assays by correcting barcode processing biases.

Project description

REBAR

Removing the Effects of Bias through Analysis of Residuals

Code and data accompanying the preprint:

Improving the accuracy of bulk fitness assays by correcting barcode processing biases.
Ryan Seamus McGee, Grant Kinsler, Dmitri Petrov, Mikhail Tikhonov.
bioRxiv 2023.10.31.565047; doi: https://doi.org/10.1101/2023.10.31.565047

Code

rebar.py is a python module that implements our barcode bias correction method.

You can run this bias correction method using the command line or as part of your own python scripts, as seen in the brief examples below and in the case study `run-rebar.ipynb' notebooks.

Further documentation about code usage is forthcoming. Questions regarding this code can be directed to ryansmcgee@gmail.com.

Running the method from the command line

Run rebar.py as a script from the command line, specifying the paths of input files and the desired output directory as arguments.

For example:

python rebar.py --counts ./case-study/data/kinsler-2020-preprocessed-data/counts.csv --samples ./case-study/data/kinsler-2020-preprocessed-data/samples.csv --variants ./case-study/data/kinsler-2020-preprocessed-data/variants_withNeutralGroups.csv --config ./case-study/rebar-config.json -outdir case-study/results/ 

Interfacing with the method within python scripts

Our method is implemented using an object-oriented structure that makes it easy to interface with as a "black box" or in a more "hands on" manner as desired.

For example, executing the method within your own script can be as simple as:

# Set up bias correction object
debiaser = BiasCorrection(counts='./data/kinsler-2020-preprocessed-data/counts.csv', 
                          samples='./data/kinsler-2020-preprocessed-data/samples.csv', 
                          variants='./data/kinsler-2020-preprocessed-data/variants_withNeutralGroups.csv',
                          config='./rebar-config.json',
                          outdir='./results/')

# Perform bias correction
debiaser.run()

Case Study Results

We applied our bias inference and correction method to the bulk fitness assay data from Kinsler et al. (2020) (refer to our preprint for more information). Input data, jupyter notebooks that replicate the execution of our method, results data, and figures can be found in the case-study directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rebar_py-1.0.3.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rebar_py-1.0.3-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file rebar_py-1.0.3.tar.gz.

File metadata

  • Download URL: rebar_py-1.0.3.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for rebar_py-1.0.3.tar.gz
Algorithm Hash digest
SHA256 6cd5e437296965613e477e630afa29ac15f6ce009b59a01ca010a46cedd319b9
MD5 6926507d77010c2561742388a55d18f2
BLAKE2b-256 6371caf896ffb06812077fc0a53e858d48f50cf337615ca98a037d034ddaa596

See more details on using hashes here.

File details

Details for the file rebar_py-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: rebar_py-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for rebar_py-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 814775605d4d10c2acaedd5de8ba38ba7a6d3dc7577fb0d8751b3f86e8e98f03
MD5 cba0d596bf910f3f5f36f76db4abb38a
BLAKE2b-256 381db4a305a457f95f8ec998d36eda3ba600592cb75b819af0977c1096224ea9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page