A package of helpful guis and functions to improve reproducibility for genetics/psychiatry related labs.
Project description
labrat
A basic science lab framework aimed at reproducibility and lab management. This package is in the very early stages of development.
Features
- Create, list, and track/manage computational biology projects with structured templates
- Calculate solution dilutions, molarity, transmittance/absorbance conversions, and more
- Automatically organize scientific data files (FASTQ, FASTA, SAM, BAM, VCF, etc.) and others files like pictures, videos, and archives
- Archive projects and directories with timestamped backups
- Convert DNA sequences to amino acids and analyze genetic data
- Full-featured CLI for all major operations
Install
Install from PyPI:
pip install pylabrat
Or install from source:
git clone https://github.com/sdhutchins/labrat.git
cd labrat
pip install .
For development, install in editable mode:
pip install -e .
Examples
Command-Line Interface
Create a new project:
labrat project new --type computational-biology --name "KARG Analysis" \
--path ./karg_analysis --description "Analyze the KARG data"
List all projects:
labrat project list
Archive files or directories:
labrat archive --source ./my_project --destination ~/Archive --name "project_backup"
Organize scientific data files:
labrat organize --science
Python API
Calculate solution dilutions:
from labrat.math import dilute_stock
# Calculate final concentration
final_conc = dilute_stock(100, 2, vF=4) # Returns 50.0
Manage projects programmatically:
from labrat.project import ProjectManager
# Create a new project
manager = ProjectManager('Dr. Jane Doe')
manager.new_project(
project_type='computational-biology',
project_name='KARG Analysis',
project_path='./karg_analysis',
description="Analyze the KARG data."
)
# List all projects
projects = manager.list_projects()
Tests
Before running tests, ensure all dependencies are installed:
pip install -r requirements.txt
Or if installing the package:
pip install .
Run all tests using unittest:
python -m unittest discover -s tests
Or run tests with pytest (if installed):
pytest tests/
To run a specific test file:
python -m unittest tests.test_archiver
python -m unittest tests.test_file_organizer
python -m unittest tests.test_project_manager
ToDo
- Add a lab inventory app
- Add project report template
- Integrate exmemo
Author
Shaurita Hutchins · @sdhutchins · :email:
Contributing
If you would like to contribute to this package, install the package in development mode, and check out our contributing guidelines.
License
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 pylabrat-0.1.tar.gz.
File metadata
- Download URL: pylabrat-0.1.tar.gz
- Upload date:
- Size: 26.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b556af61b976721cda103e7bee7594d8c90b23b5b47adf33af7e33e7da14355
|
|
| MD5 |
a89220c39958ed639660b1e6d4ee4269
|
|
| BLAKE2b-256 |
2c8cc02fd83b800e1720bd6536cc13f5f790725977f7c163a4a54ce77d0020aa
|
File details
Details for the file pylabrat-0.1-py3-none-any.whl.
File metadata
- Download URL: pylabrat-0.1-py3-none-any.whl
- Upload date:
- Size: 29.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dd18182259cc9b95048da3b1360499a19a719808b08de3f9234f8b8180f0e51
|
|
| MD5 |
fdd582735ec5243bd3789f5bda786d90
|
|
| BLAKE2b-256 |
8b83c42707637ad0605f64234d053e2662f44b3221b28fc5c69130697e2f5f54
|