Skip to main content

A tool for generating block randomized LC-MS queue designs for full factorial experiments.

Project description

Block randomized queue designer for LCMS experiments

DOI

Overview

Block randomized queue designer is a Python utility to automatically generate an optimal acquisition queue for sequential experiments such as LCMS experiments run on a single instrument. It accepts any full factorial experimental design with arbitrary number of factors, each of which can have a different number of levels, and an independently chosen block size. Given these tools, the tool will provide users with a block-randomized queue that respects the following constraints. For factors with a number of levels equal to the block size, it will perform strict blocking (each and all levels will be present in each block). For factors with less levels than block size, it will allocate levels so that, for any two levels, the difference between the number of samples holding those levels is at most one. For factors with more levels than the block size, it will enforce that no level be repeated in a block. Should the total number of samples not be divisible by the block size, the remaining samples at the end of the procedure will make up the last block, with relaxed constraints. An intra-block reshuffling method optimizes the position of samples in each block to make sure levels across factors are evenly spread across intra-block positions, and to minimize cases in which two or more samples with the same level of the same factor are aquired one after the other.

Installation

You can install the package using pip:

pip install blockrand_q_designer

Alternatively you can clone the repository and install it locally

git clone https://github.com/nar-g/blockrand_q_designer.git
cd blockrand_q_designer
pip install .
conda install -c conda-forge blockrand_q_designer

Usage example

A simple example of how to use this tool:

from blockrand_q_designer import LCMSQueueDesign

# Define experimental parameters
factors = ['Fraction', 'Treatment', 'Replicate']
levels = [3, 2, 4]
block_size = 3

# Create a design instance
design = LCMSQueueDesign(factors, levels, block_size, base_name="GN01_01_", starting_index=1)

# Optionally, define labels for better readability
design.labels = {
    "Fraction": ("f1", "f2", "f3"),
    "Treatment": ("Nocodazole", "Control"),
    "Replicate": (1, 2, 3, 4)
}

# Print the generated blocks
design.print_blocks_pretty()

# Save the design to a CSV file
design.save_to_csv("queue_design.csv")

Contributing

Contributions are welcome!

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Contact

For questions, suggestions, or feedback, please contact guido.narduzzi@bc.biol.ethz.ch

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

blockrand_q_designer-0.1.0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

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

blockrand_q_designer-0.1.0-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file blockrand_q_designer-0.1.0.tar.gz.

File metadata

  • Download URL: blockrand_q_designer-0.1.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for blockrand_q_designer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1cacbf92e2dab91ecaa2799a4fab1a1790bf0d8fed8d216c649d9eacac5ef024
MD5 7a9e150a94bc812b58c3c218fb8a3556
BLAKE2b-256 ba162da45014efbec6748eb8f1e1e5b86e1d18701c2402052379d61410a8f3cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for blockrand_q_designer-0.1.0.tar.gz:

Publisher: python-publish.yml on nar-g/blockrand_q_designer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file blockrand_q_designer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for blockrand_q_designer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a19ce136c7fd8289f0296bbb2afe0108b02454484d27e644a74074abc46db69c
MD5 bb0b1b44a6745600fb257273ac11621a
BLAKE2b-256 fb19f9d2e38275ab08c293791cf63a45dc5b83f863d3a69d2a98516731eb9ef3

See more details on using hashes here.

Provenance

The following attestation bundles were made for blockrand_q_designer-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on nar-g/blockrand_q_designer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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