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.1.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.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rob_norm-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 46bf10d4b3994394ddc7ad3ec6de03a8d23ee979d9a8343523fc70d22b5461e8
MD5 13cf6ada3aa8b0af33b40e26a1f51ba5
BLAKE2b-256 844aed3aeb212c8857db1f3bb5fc168dd8a516e3a9dabea1e11c7c948c90b8bc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rob_norm-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 83aa7281f1a35e16866fee0dc75676ba53d48449b09eb720ee84db40d646adaa
MD5 7029e9295af38a1a448c608723f60d62
BLAKE2b-256 bd4f6b00f7e8baed16d36e52305271f635a723b358a38426a6865c034a9af31a

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