Skip to content
Automation
Skill

/scikit-bio

Biological data toolkit. Sequence analysis, alignments, phylogenetic trees, diversity metrics (alpha/beta, UniFrac), ordination (PCoA), PERMANOVA, FASTA/Newick I/O, for microbiome analysis.

From plugin
vibe-skills
2.7k200 skills8 agents3 commands
Install
$ npx -y skills add foryourhealth111-pixel/Vibe-Skills --skill scikit-bio --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/scikit-bio

Context preview

The summary Claude sees to decide when to auto-load this skill.

Biological data toolkit. Sequence analysis, alignments, phylogenetic trees, diversity metrics (alpha/beta, UniFrac), ordination (PCoA), PERMANOVA, FASTA/Newick I/O, for microbiome analysis.

SKILL.md

scikit-bio.SKILL.md
name: scikit-bio
description: "Biological data toolkit. Sequence analysis, alignments, phylogenetic trees, diversity metrics (alpha/beta, UniFrac), ordination (PCoA), PERMANOVA, FASTA/Newick I/O, for microbiome analysis."

scikit-bio

Overview

scikit-bio is a comprehensive Python library for working with biological data. Apply this skill for bioinformatics analyses spanning sequence manipulation, alignment, phylogenetics, microbial ecology, and multivariate statistics.

When to Use This Skill

This skill should be used when the user:

  • Works with biological sequences (DNA, RNA, protein)
  • Needs to read/write biological file formats (FASTA, FASTQ, GenBank, Newick, BIOM, etc.)
  • Performs sequence alignments or searches for motifs
  • Constructs or analyzes phylogenetic trees
  • Calculates diversity metrics (alpha/beta diversity, UniFrac distances)
  • Performs ordination analysis (PCoA, CCA, RDA)
  • Runs statistical tests on biological/ecological data (PERMANOVA, ANOSIM, Mantel)
  • Analyzes microbiome or community ecology data
  • Works with protein embeddings from language models
  • Needs to manipulate biological data tables

Core Capabilities

1. Sequence Manipulation

Work with biological sequences using specialized classes for DNA, RNA, and protein data.

**Key operations:**

  • Read/write sequences from FASTA, FASTQ, GenBank, EMBL formats
  • Sequence slicing, concatenation, and searching
  • Reverse complement, transcription (DNA→RNA), and translation (RNA→protein)
  • Find motifs and patterns using regex
  • Calculate distances (Hamming, k-mer based)
  • Handle sequence quality scores and metadata

**Common patterns:**

import skbio

# Read sequences from file
seq = skbio.DNA.read('input.fasta')

# Sequence operations
rc = seq.reverse_complement()
rna = seq.transcribe()
protein = rna.translate()

# Find motifs
motif_positions = seq.find_with_regex('ATG[ACGT]{3}')

# Check for properties
has_degens = seq.has_degenerates()
seq_no_gaps = seq.degap()

**Important notes:**

  • Use `DNA`, `RNA`, `Protein` classes for grammared sequences with validation
  • Use `Sequence` class for generic sequences without alphabet restrictions
  • Quality scores automatically loaded from FASTQ files into positional metadata
  • Metadata types: sequence-level (ID, description), positional (per-base), interval (regions/features)

2. Sequence Alignment

Perform pairwise and multiple sequence alignments using dynamic programming algorithms.

**Key capabilities:**

  • Global alignment (Needleman-Wunsch with semi-global variant)
  • Local alignment (Smith-Waterman)
  • Configurable scoring schemes (match/mismatch, gap penalties, substitution matrices)
  • CIGAR string conversion
  • Multiple sequence alignment storage and manipulation with `TabularMSA`

**Common patterns:**

from skbio.alignment import local_pairwise_align_ssw, TabularMSA

# Pairwise alignment
alignment = local_pairwise_align_ssw(seq1, seq2)

# Access aligned sequences
msa = alignment.aligned_sequences

# Read multiple alignment from file
msa = TabularMSA.read('alignment.fasta', constructor=skbio.DNA)

# Calculate consensus
consensus = msa.consensus()

**Important notes:**

  • Use `local_pairwise_align_ssw` for local alignments (faster, SSW-based)
  • Use `StripedSmithWaterman` for protein alignments
  • Affine gap penalties recommended for biological sequences
  • Can convert between scikit-bio, BioPython, and Biotite alignment formats

3. Phylogenetic Trees

Construct, manipulate, and analyze phylogenetic trees representing evolutionary relationships.

**Key capabilities:**

  • Tree construction from distance matrices (UPGMA, WPGMA, Neighbor Joining, GME, BME)
  • Tree manipulation (pruning, rerooting, traversal)
  • Distance calculations (patristic, cophenetic, Robinson-Foulds)
  • ASCII visualization
  • Newick format I/O

**Common patterns:**

from skbio import TreeNode
from skbio.tree import nj

# Read tree from file
tree = TreeNode.read('tree.nwk')

# Construct tree from distance matrix
tree = nj(distance_matrix)

# Tree operations
subtree = tree.shear(['taxon1', 'taxon2', 'taxon3'])
tips = [node for node in tree.tips()]
lca = tree.lowest_common_ancestor(['taxon1', 'taxon2'])

# Calculate distances
patristic_dist = tree.find('taxon1').distance(tree.find('taxon2'))
cophenetic_matrix = tree.cophenetic_matrix()

# Compare trees
rf_distance = tree.robinson_foulds(other_tree)

**Important notes:**

  • Use `nj()` for neighbor joining (classic phylogenetic method)
  • Use `upgma()` for UPGMA (assumes molecular clock)
  • GME and BME are highly scalable for large trees
  • Trees can be rooted or unrooted; some metrics require specific rooting

4. Diversity Analysis

Calculate alpha and beta diversity metrics for microbial ecology and community analysis.

**Key capabilities:**

  • Alpha diversity: richness, Shannon entropy, Simpson index, Faith's PD, Pielou's evenness
  • Beta diversity: Bray-Curtis, Jaccard, weighted/unweighted UniFrac, Euclidean distances
  • Phylogenetic diversity metrics (require tree input)
  • Rarefaction and subsampling
  • Integration with ordination and statistical tests

**Common patterns:**

from skbio.diversity import alpha_diversity, beta_diversity
import skbio

# Alpha diversity
alpha = alpha_diversity('shannon', counts_matrix, ids=sample_ids)
faith_pd = alpha_diversity('faith_pd', counts_matrix, ids=sample_ids,
                          tree=tree, otu_ids=feature_ids)

# Beta diversity
bc_dm = beta_diversity('braycurtis', counts_matrix, ids=sample_ids)
unifrac_dm = beta_diversity('unweighted_unifrac', counts_matrix,
                           ids=sample_ids, tree=tree, otu_ids=feature_ids)

# Get available metrics
from skbio.diversity import get_alpha_diversity_metrics
print(get_alpha_diversity_metrics())

**Important notes:**

  • Counts must be integers representing abundances, not relative frequencies
  • Phylogenetic metrics (Faith's PD, UniFrac) require tree and OTU ID mapping
  • Use `partial_beta_diver
Read more
Ships withvibe-skills

VibeSkills is a general-purpose Skill that automatically routes local Skills and intelligently orchestrates harness workflows.

Get the whole plugin

Other skills on vibe-skills.