A command line utility for shuffling biological sample positions in microwell plates.
Project description
WellShuffled 🎲
Installation
There are two ways to install wellshuffled:
Option 1: Install from GitLab using pip
You can install the latest version of wellshuffled directly from GitLab by
running the following command:
pip install git+https://github.com/exfab/wellshuffled.git
Option 2: Install from a local clone
-
Clone the repository:
git clone https://github.com/exfab/wellshuffled.git cd wellshuffled -
Install using
pip:pip install .
Usage
The main command is wellshuffled. It has two subcommands: shuffle and
trace.
After installation, you can run the tool from your terminal like this:
wellshuffled --help
shuffle Command
The shuffle command generates randomized plate maps from a list of sample IDs.
wellshuffled shuffle <sample_file> <output_path> [OPTIONS]
Options:
--plates, -n: Number of plates to generate. Default is 1.--size: Well plate size (96 or 384). Default is 96.--simple: Use simple randomization (disables neighbor-awareness).--separate-files: Save each plate map to a separate CSV file.--seed: Set the random seed for reproducible results.--control-prefix: Prefix used to identify control samples.--fixed-map: Manually specify fixed control locations (e.g., "A1:control-85,H12:control-96").--fixed-map-file: Manually specify fixed control locations from a CSV file.--nonstandard: Allow for the use of non-standard plate dimensions.--nonstandard_dims: The dimensions (x, y) for the nonstandard plate.
trace Command
The trace command traces the locations of samples across multiple plates.
wellshuffled trace <input_path> [OPTIONS]
Options:
--output-csv: Optional path to save the full trajectory map as a CSV file.--numeric: Return the plate positions as 1-based column major numeric values.
Examples
1. Generate a single 96-well plate with neighbor-awareness:
wellshuffled shuffle example_files/samples.csv single_plate.csv --size 96
2. Generate 5 plates and save to a single combined file:
wellshuffled shuffle example_files/samples.csv combined_layouts.csv --plates 5
3. Generate 3 plates and save them to separate files in a directory: The
output path my_layouts will be created if it doesn't exist.
wellshuffled shuffle example_files/samples.csv my_layouts --plates 3 --separate-files
4. Generate a reproducible layout using a seed: Running this command
multiple times with --seed 123 will always produce the exact same output file.
wellshuffled shuffle example_files/samples.csv reproducible_run.csv --plates 4 --seed 123
5. Use the simple randomization logic (disabling neighbor-awareness):
wellshuffled shuffle example_files/samples.csv simple_run.csv --simple
6. Generate a plate with a predefined layout for the first plate: The
samples_with_positions.csv file contains a second column with the initial well
positions.
wellshuffled shuffle example_files/samples_with_positions.csv predefined_layout.csv
7. Provide Nonstandard plate dimensions: We use the --nonstandard flag to
ensure you are explicitly meaning to pass in nonstandard plate dimensions along
with the --nonstandard_dims=[RowsxColumns] or [Rows,Columns]
wellshuffled shuffle example_files/60_samples_w_controls_initial_pos.csv nonstandard_layout.csv --nonstandard --nonstandard_dims=6,10
8. View all available options and help:
wellshuffled --help
Development Installation
If you want to contribute to the development of wellshuffled, you can set up a
development environment by following these steps:
-
Clone the repository:
git clone https://github.com/exfab/wellshuffled.git cd wellshuffled -
Sync the project using
uv:This project is managed with
uv, a fast Python package installer and resolver.uv sync -
Installing without
uv syncor usingvenvIf you encounter errors with
uv sync, you can install the project manually in editable mode:Using
uv:uv run python -m pip install -e .Using
venv:python -m venv .venv source .venv/bin/activate python -m pip install -e .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wellshuffled-0.1.0.tar.gz.
File metadata
- Download URL: wellshuffled-0.1.0.tar.gz
- Upload date:
- Size: 57.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c31563a42aca56bb7afa0f4c92f7e045e29b2a122d8f2fe22b24c03df2d72132
|
|
| MD5 |
1f0a165eaa206477b7b4b004b37eb163
|
|
| BLAKE2b-256 |
f0f788fcb1d6398233420c536f89dbfd7d1482ff5540482cbd6a0bc18fec2221
|
File details
Details for the file wellshuffled-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wellshuffled-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f6fb30c447aed89af0661e947a005f79297c4719be74e8571f34c17163b2bbd
|
|
| MD5 |
9def74b258f846fc218c9e0bc0870be7
|
|
| BLAKE2b-256 |
78ab33e13b3ac6bbacd2fd7f647de792e8137c8517ed4bf4b0872283b5d0b445
|