Documentation / v1.2.0

Documentation for working minds.

Everything you need to move from sequence-level exploration to reproducible genomic workflows.

Installation

Install the latest release from the Python Package Index or work from source.

Install from PyPI

pip install genomehouse

Install from source

git clone https://github.com/GenomeHouse/GenomeHouse-1.1.git
cd GenomeHouse-1.1
pip install -e .

Requirements

The core package is intentionally lightweight. Add optional dependencies as your analysis grows.

Python requirements

Python ≥ 3.8

NumPy ≥ 1.19.0

Pandas ≥ 1.3.0

Optional dependencies

Matplotlib for visualization

Scikit-learn for ML features

Seaborn for advanced plots

Quick start

Import the modules you need and compose them in a normal Python workflow.

Basic workflow

from genomehouse import sequence_tools, genomic_parsers

seq = "ATGCGTAC"
print(sequence_tools.gc_content(seq))

for header, sequence in genomic_parsers.parse_fasta("example.fasta"):
    print(header, sequence)

sequence_tools module

Composable primitives for common bioinformatics analysis tasks.

gc_content(sequence)

Calculate the GC content percentage of a DNA sequence.

sequence_tools.gc_content("ATGCGCGCTA")

reverse_complement(sequence)

Generate the reverse complement of a DNA sequence.

sequence_tools.reverse_complement("ATGCGT")

find_motifs(sequence, motif)

Find all occurrences of a motif pattern in a sequence.

sequence_tools.find_motifs("ATGCGCGCTA", "GC")

translate(sequence, frame=0)

Translate DNA sequence to amino acid sequence.

sequence_tools.translate("ATGAAATAG")

genomic_parsers module

Composable primitives for common bioinformatics analysis tasks.

parse_fasta(filename)

Parse FASTA files and yield header-sequence pairs.

for header, sequence in genomic_parsers.parse_fasta("sequences.fasta")

parse_fastq(filename)

Parse FASTQ files with quality scores.

for record in genomic_parsers.parse_fastq("reads.fastq")

parse_vcf(filename)

Parse VCF variant files.

for variant in genomic_parsers.parse_vcf("variants.vcf")

ml_tools module

Composable primitives for common bioinformatics analysis tasks.

extract_features(sequences, method="kmer")

Extract numerical features from biological sequences.

features = ml_tools.extract_features(sequences, method="kmer")

SequenceClassifier()

Machine learning classifier for biological sequences.

classifier.fit(features, labels)
predictions = classifier.predict(new_features)

Basic analysis

A complete sequence analysis workflow using the core sequence_tools API.

Analyze a sequence

from genomehouse import sequence_tools

dna_sequence = "ATGAAACGCATTAGCACCACCATTACCACCACCATCACCATTACCACAGGTAACGGTGCGGGCTGA"
gc_content = sequence_tools.gc_content(dna_sequence)
protein = sequence_tools.translate(dna_sequence)
print(f"GC content: {gc_content:.1f}%")
print(f"Protein: {protein}")

Troubleshooting

Common issues

ImportError: check that the package is installed in the active environment.

FileNotFoundError: verify the path and working directory.

Memory concerns: use streaming parsers for large files.

Contributing

Contributions, tests, and documentation improvements are welcome.

Development setup

git clone https://github.com/GenomeHouse/GenomeHouse-1.1.git
cd GenomeHouse-1.1
pip install -e .[dev]
pytest tests/