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.

Category

Other Tools

Install

Hot:19

Download and extract to your skills directory

Copy command and send to AI Agent for auto-install:

Download and install this skill https://openskills.cc/api/download?slug=k-dense-ai-skills-scikit-bio&locale=en&source=copy

scikit-bio - Python Bioinformatics Toolkit

Skills Overview


scikit-bio is a comprehensive Python library for biological data analysis, offering functions such as sequence manipulation, alignment, phylogenetics, microbial ecology, and multivariate statistical analysis. It is suitable for microbiome research, bioinformatics analyses, and community ecology studies.

Use Cases

1. Microbiome Diversity Analysis


Suitable for analyzing the species composition of microbial communities and changes in diversity. Supports the calculation of Alpha diversity (Shannon, Simpson, Chao1, Faith’s PD) and Beta diversity (Bray-Curtis, Jaccard, UniFrac). Combined with Principal Coordinates Analysis (PCoA) and PERMANOVA statistical testing, it reveals differences in community structure among samples.

2. Sequence Processing and Phylogenetic Analysis


Suitable for handling DNA, RNA, and protein sequences. Supports reading and writing multiple formats such as FASTA, FASTQ, and GenBank. Provides global and local sequence alignment, can build phylogenetic trees from distance matrices (NJ, UPGMA), and supports tree-structure comparisons and evolutionary distance calculations.

3. Statistical Tests for Community Ecology


Suitable for hypothesis testing of ecological data. Supports statistical methods such as PERMANOVA (assessing group differences), ANOSIM (a permutation-based group test), PERMDISP (testing homogeneity of within-group dispersion), and Mantel tests (distance-matrix correlation). Provides rigorous statistical inference for microbiome, plant community, and other research.

Core Features

1. Sequence Manipulation and Alignment


Provides functions to read, write, reverse-complement, transcribe, and translate DNA, RNA, and protein sequences. Supports global, local, and semi-global alignment (pair_align), with configurable scoring matrices and gap penalties. Results include CIGAR strings and aligned sequences, which can be used directly to construct a TabularMSA object for downstream analysis. Supports sequence quality score processing and fast sequence search.

2. Diversity and Ordination Analysis


Calculates Alpha diversity (richness, evenness, phylogenetic diversity) and Beta diversity (including weighted and unweighted UniFrac). Offers ordination and dimensionality-reduction methods such as Principal Coordinates Analysis (PCoA), Correspondence Analysis (CA), Canonical Correspondence Analysis (CCA), and Redundancy Analysis (RDA) for visualizing high-dimensional biological data.

3. Statistical Tests and File I/O


Integrates ecology-specific statistical methods such as PERMANOVA, ANOSIM, and Mantel tests, and supports differential abundance analysis (ancom, dirmult_ttest). Provides read/write support for 19+ biological file formats, including sequences (FASTA/FASTQ), phylogenetic trees (Newick), BIOM tables, distance matrices, and more, with automatic format detection.

Common Questions

What’s the difference between scikit-bio and Biopython?


scikit-bio focuses on microbiome analysis, community ecology, and phylogenetics, providing diversity analysis, ordination, and ecological statistical tests. Biopython is a general-purpose bioinformatics toolkit, with more emphasis on sequence handling, database access, and molecular biology modeling. They can be used complementarily, and scikit-bio offers higher-level abstractions and statistical methods in the field of microbial ecology.

How do I perform UniFrac analysis with scikit-bio?


You need to prepare a feature abundance table, a phylogenetic tree, and a feature-to-taxonomic-unit mapping. Use beta_diversity('unweighted_unifrac', counts, ids=sample_ids, tree=tree, taxa=feature_ids) to compute the distance matrix; the results can be used for downstream clustering, PCoA visualization, or PERMANOVA group testing. Weighted UniFrac uses 'weighted_unifrac' as the metric.

What Python version and dependencies does scikit-bio require?


You need Python 3.10 or higher. Core dependencies include NumPy 2.0+. It is recommended to install using uv pip install scikit-bio (precompiled wheel packages do not require a compiler). Optional dependencies include matplotlib/seaborn/plotly (plotting), biom-format (BIOM tables), polars/anndata (table interoperability). For Conda users, use conda install -c conda-forge scikit-bio.