---
name: pylabrat
description: >
  A Python framework designed to improve reproducibility, simplify laboratory management, and support common biomedical research tasks. Use when writing Python code that uses the labrat package.
license: MIT
compatibility: Requires Python >=3.10.
---

# labrat

A Python framework designed to improve reproducibility, simplify laboratory management, and support common biomedical research tasks.

## Installation

```bash
pip install pylabrat
```

## API overview

### Query models and clients

Shared results and clients for external biological resources.

- `query.QueryResult`
- `query.QueryError`
- `query.PubTatorClient`

### Biological queries

Gene, variant, and biomedical literature queries.

- `query.query_gene`
- `query.query_variant`
- `query.query_literature`

### Project and file management

Classes for projects, archives, and scientific files.

- `project.ProjectManager`
- `filemanager.Archiver`
- `filemanager.FileOrganizer`

### ProjectManager methods

- `project.ProjectManager.new_project`
- `project.ProjectManager.list_projects`
- `project.ProjectManager.update_project`
- `project.ProjectManager.list_project_files`
- `project.ProjectManager.archive_project`
- `project.ProjectManager.add_template`
- `project.ProjectManager.delete_project`

### FileOrganizer methods

- `filemanager.FileOrganizer.move_file`
- `filemanager.FileOrganizer.organize_by_year`
- `filemanager.FileOrganizer.organize_documents`
- `filemanager.FileOrganizer.organize_archives`
- `filemanager.FileOrganizer.organize_files`
- `filemanager.FileOrganizer.move_specific_files`
- `filemanager.FileOrganizer.organize_science_files`
- `filemanager.FileOrganizer.organize_all`

### Genetics

DNA and protein sequence utilities.

- `genetics.atgc_content`
- `genetics.complementary_dna`
- `genetics.dna2aminoacid`

### Laboratory math

Common concentration and optical calculations.

- `math.calculate_molarity`
- `math.dilute_stock`
- `math.mass_recorder`
- `math.refractive_index_prism`
- `math.transmittance_to_absorbance`

## Resources

- [Full documentation](https://www.shauritahutchins.com/labrat/)
- [llms.txt](llms.txt) — Indexed API reference for LLMs
- [llms-full.txt](llms-full.txt) — Comprehensive documentation for LLMs
