API Reference

Query models and clients

Shared results and clients for external biological resources.

query.QueryResult

Retain normalized provenance alongside an unmodified provider response.

query.QueryError

Report a provider or input error that can be shown to a CLI user.

query.PubTatorClient

Access the documented PubTator 3 search and autocomplete endpoints.

Biological queries

Gene, variant, and biomedical literature queries.

query.query_gene()

Query MyGene while retaining its raw response and build metadata.

query.query_variant()

Query MyVariant while retaining its raw response and source metadata.

query.query_literature()

Search PubTator using either free text or normalized biological entities.

Project and file management

Classes for projects, archives, and scientific files.

project.ProjectManager
filemanager.Archiver

Archive folders and files.

filemanager.FileOrganizer

A utility class for organizing files in standard directories like Downloads and Documents.

ProjectManager methods

project.ProjectManager.new_project()

Create a new project and update its metadata in the .labrat file.

project.ProjectManager.list_projects()

List all projects stored in the .labrat file.

project.ProjectManager.update_project()

Update the last modified timestamp for an existing project.

project.ProjectManager.list_project_files()

List all files within the given project directory.

project.ProjectManager.archive_project()

Archive a project directory to a timestamped archive folder.

project.ProjectManager.add_template()

Add a new project template.

project.ProjectManager.delete_project()

Archive and delete a project directory.

FileOrganizer methods

filemanager.FileOrganizer.move_file()

Move a file to the destination directory, handling duplicates and logging actions.

filemanager.FileOrganizer.organize_by_year()

Organize files into subfolders by year based on the last modified timestamp.

filemanager.FileOrganizer.organize_documents()

Organize documents into subfolders by type and year.

filemanager.FileOrganizer.organize_archives()

Organize archives into subfolders by compression type.

filemanager.FileOrganizer.organize_files()

Organize files into standard categories (e.g., Pictures, Videos).

filemanager.FileOrganizer.move_specific_files()

Move files containing a specific keyword in their names to a designated folder.

filemanager.FileOrganizer.organize_science_files()

Organize scientific data files into a dedicated research files folder.

filemanager.FileOrganizer.organize_all()

Execute all organizational tasks in sequence.

Genetics

DNA and protein sequence utilities.

genetics.atgc_content()

Calculate the nucleotide composition of a DNA sequence.

genetics.complementary_dna()

Create the complementary DNA sequence.

genetics.dna2aminoacid()

Convert a DNA sequence from a FASTA file to an amino acid sequence.

Laboratory math

Common concentration and optical calculations.

math.calculate_molarity()

Calculate the molarity of a solution given moles and liters or mL.

math.dilute_stock()

Dilute a stock concentration.

math.mass_recorder()

Record the mass of different items.

math.refractive_index_prism()

Calculate the refractive index of prism.

math.transmittance_to_absorbance()

Convert transmittance to absorbance.