← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / OpenAI4S / skills / bioskills / bio-sequence-io-read-sequences / references / usage-guide.md

Read Sequences - Usage Guide

Overview

This skill enables AI agents to help you read biological sequence data from common file formats using Biopython. It covers FASTA, FASTQ, GenBank, and 40+ other formats, and the choice between streaming, in-memory, and on-disk-indexed access.

Prerequisites

pip install biopython

Quick Start

Tell your AI agent what you want to do:

Example Prompts

Basic Reading

"Parse sequences.fasta and print each sequence ID and length"

Working with GenBank

"Read the GenBank file and extract all CDS product names"

FASTQ Quality Analysis

"Load reads.fastq and calculate the average quality score for each read"

Large File Handling

"I have a 10GB FASTA file and need to extract just one sequence by ID without loading the whole file"

Reusable Index

"I query the same set of reference FASTA files every run; build a persistent index so lookups are instant next time"

What the Agent Will Do

  1. Import Bio.SeqIO
  2. Choose the access pattern: stream with parse, assert single with read, or random-access with to_dict/index/index_db
  3. Specify the correct lowercase format string for the file type
  4. Iterate or look up records as needed
  5. Extract the requested information from SeqRecord objects

Supported File Types

The agent can read these common formats: - FASTA (.fasta, .fa, .fna, .faa) - FASTQ (.fastq, .fq) - GenBank (.gb, .gbk) - EMBL (.embl) - Swiss-Prot (.dat) - Alignment formats (PHYLIP, Clustal, Stockholm)

Tips