Skip to main content

Python implementation of RobNorm, a robust normalization method for labeled quantitative proteomics data.

Project description

rob_norm 🦭🧬

Python implementation of the RobNorm R package for robust normalization of quantitative omics data.

Features

  • Identical normalization results to the original R implementation.
  • Fast and efficient implementation using NumPy (57 ms vs 113 ms in R for 5000x200 data on an M1 MacBook Air)

Installation

Install via pip:

pip install rob_norm

Usage

import pandas as pd
from rob_norm import rob_norm

# load your data into a DataFrame (rows = features, columns = samples)
data = pd.read_csv('./data/simulated_measurements.txt', index_col=0, sep='\t')

# alternatively, simulate data using the provided function
# sim_dat_fn(row_frac, col_frac, mu_up, mu_down, n, m, nu_fix=True, seed=None):

# perform a normalization operation provided by the package
results = rob_norm(data, gamma_0=0.5, tol=1e-4, step=200)

normalized_data = results['norm_data']

# verify against reference results
df_results = pd.read_csv('./data/simulated_measurements_normalized.txt', index_col=0, sep='\t')

assert np.allclose(df_results, normalized_data) # == True

Development

Clone the repository and use uv for development and testing:

git clone https://github.com/Tom-Julux/rob_norm
cd rob_norm

uv run pytest
uv build
uv publish

License

The project is licensed under the GNU Lesser General Public License v3.0.

See the LICENSE file for full licensing information.

The file data/robnorm.r contains R code used to generate reference results for testing and was copied and adapted from the original R package RobNorm.

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

rob_norm-1.0.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

rob_norm-1.0.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file rob_norm-1.0.0.tar.gz.

File metadata

  • Download URL: rob_norm-1.0.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rob_norm-1.0.0.tar.gz
Algorithm Hash digest
SHA256 dce292f34e050302da20eddc07ba8a10e171e4a3cfee806f51d85f6510bb2d28
MD5 7d628363b78d0ee58d9f823c7fd6f7b1
BLAKE2b-256 b66a63ebfda690cff6d138d2e2cb835b05868b8d00829885835c862343f1c8ae

See more details on using hashes here.

File details

Details for the file rob_norm-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: rob_norm-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rob_norm-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5ebe6d30688c909551671f65cfb74081fa6fa8ae6f1e7551144b87cdbc7a211e
MD5 0c3fd4678461c0b2a5c2c6dc5522b1d4
BLAKE2b-256 d1a0ca811da5391683c393e437474b7fb3498c3f97becd891496873f9dd34a0b

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