[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AFNQ6WKGJ6Z1YA67XEXGR2":3,"skill-same:01M6AFNQ6WKGJ6Z1YA67XEXGR2":68},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":43,"ownerHtmlUrl":44,"ownerBlogUrl":45,"ownerDescription":46,"updatedAt":47,"install":48,"resources":61},"01M6AFNQ6WKGJ6Z1YA67XEXGR2","scikit-bio",null,"Biological data toolkit. Sequence analysis, alignments, phylogenetic trees, diversity metrics (alpha\u002Fbeta, UniFrac), ordination (PCoA), PERMANOVA, FASTA\u002FNewick I\u002FO, for microbiome analysis.","davila7\u002Fclaude-code-templates","davila7","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6216945?v=4","01M6ADEWWFPS191NFM0Y1EX1JH","Daniel Avila","01M6ADJHGM78PHQRD3XZTFDVKK",33481,"MIT","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fscikit-bio\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32],"scikit bio","toolkit","metrics","alpha","beta","data","analysis","diversity","sequence analysis","microbiome","trees","for","sequence","FASTA","2026-11-10 10:12:30",false,"---\nname: scikit-bio\ndescription: \"Biological data toolkit. Sequence analysis, alignments, phylogenetic trees, diversity metrics (alpha\u002Fbeta, UniFrac), ordination (PCoA), PERMANOVA, FASTA\u002FNewick I\u002FO, for microbiome analysis.\"\n---\n\n# scikit-bio\n\n## Overview\n\nscikit-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.\n\n## When to Use This Skill\n\nThis skill should be used when the user:\n- Works with biological sequences (DNA, RNA, protein)\n- Needs to read\u002Fwrite biological file formats (FASTA, FASTQ, GenBank, Newick, BIOM, etc.)\n- Performs sequence alignments or searches for motifs\n- Constructs or analyzes phylogenetic trees\n- Calculates diversity metrics (alpha\u002Fbeta diversity, UniFrac distances)\n- Performs ordination analysis (PCoA, CCA, RDA)\n- Runs statistical tests on biological\u002Fecological data (PERMANOVA, ANOSIM, Mantel)\n- Analyzes microbiome or community ecology data\n- Works with protein embeddings from language models\n- Needs to manipulate biological data tables\n\n## Core Capabilities\n\n### 1. Sequence Manipulation\n\nWork with biological sequences using specialized classes for DNA, RNA, and protein data.\n\n**Key operations:**\n- Read\u002Fwrite sequences from FASTA, FASTQ, GenBank, EMBL formats\n- Sequence slicing, concatenation, and searching\n- Reverse complement, transcription (DNA→RNA), and translation (RNA→protein)\n- Find motifs and patterns using regex\n- Calculate distances (Hamming, k-mer based)\n- Handle sequence quality scores and metadata\n\n**Common patterns:**\n```python\nimport skbio\n\n# Read sequences from file\nseq = skbio.DNA.read('input.fasta')\n\n# Sequence operations\nrc = seq.reverse_complement()\nrna = seq.transcribe()\nprotein = rna.translate()\n\n# Find motifs\nmotif_positions = seq.find_with_regex('ATG[ACGT]{3}')\n\n# Check for properties\nhas_degens = seq.has_degenerates()\nseq_no_gaps = seq.degap()\n```\n\n**Important notes:**\n- Use `DNA`, `RNA`, `Protein` classes for grammared sequences with validation\n- Use `Sequence` class for generic sequences without alphabet restrictions\n- Quality scores automatically loaded from FASTQ files into positional metadata\n- Metadata types: sequence-level (ID, description), positional (per-base), interval (regions\u002Ffeatures)\n\n### 2. Sequence Alignment\n\nPerform pairwise and multiple sequence alignments using dynamic programming algorithms.\n\n**Key capabilities:**\n- Global alignment (Needleman-Wunsch with semi-global variant)\n- Local alignment (Smith-Waterman)\n- Configurable scoring schemes (match\u002Fmismatch, gap penalties, substitution matrices)\n- CIGAR string conversion\n- Multiple sequence alignment storage and manipulation with `TabularMSA`\n\n**Common patterns:**\n```python\nfrom skbio.alignment import local_pairwise_align_ssw, TabularMSA\n\n# Pairwise alignment\nalignment = local_pairwise_align_ssw(seq1, seq2)\n\n# Access aligned sequences\nmsa = alignment.aligned_sequences\n\n# Read multiple alignment from file\nmsa = TabularMSA.read('alignment.fasta', constructor=skbio.DNA)\n\n# Calculate consensus\nconsensus = msa.consensus()\n```\n\n**Important notes:**\n- Use `local_pairwise_align_ssw` for local alignments (faster, SSW-based)\n- Use `StripedSmithWaterman` for protein alignments\n- Affine gap penalties recommended for biological sequences\n- Can convert between scikit-bio, BioPython, and Biotite alignment formats\n\n### 3. Phylogenetic Trees\n\nConstruct, manipulate, and analyze phylogenetic trees representing evolutionary relationships.\n\n**Key capabilities:**\n- Tree construction from distance matrices (UPGMA, WPGMA, Neighbor Joining, GME, BME)\n- Tree manipulation (pruning, rerooting, traversal)\n- Distance calculations (patristic, cophenetic, Robinson-Foulds)\n- ASCII visualization\n- Newick format I\u002FO\n\n**Common patterns:**\n```python\nfrom skbio import TreeNode\nfrom skbio.tree import nj\n\n# Read tree from file\ntree = TreeNode.read('tree.nwk')\n\n# Construct tree from distance matrix\ntree = nj(distance_matrix)\n\n# Tree operations\nsubtree = tree.shear(['taxon1', 'taxon2', 'taxon3'])\ntips = [node for node in tree.tips()]\nlca = tree.lowest_common_ancestor(['taxon1', 'taxon2'])\n\n# Calculate distances\npatristic_dist = tree.find('taxon1').distance(tree.find('taxon2'))\ncophenetic_matrix = tree.cophenetic_matrix()\n\n# Compare trees\nrf_distance = tree.robinson_foulds(other_tree)\n```\n\n**Important notes:**\n- Use `nj()` for neighbor joining (classic phylogenetic method)\n- Use `upgma()` for UPGMA (assumes molecular clock)\n- GME and BME are highly scalable for large trees\n- Trees can be rooted or unrooted; some metrics require specific rooting\n\n### 4. Diversity Analysis\n\nCalculate alpha and beta diversity metrics for microbial ecology and community analysis.\n\n**Key capabilities:**\n- Alpha diversity: richness, Shannon entropy, Simpson index, Faith's PD, Pielou's evenness\n- Beta diversity: Bray-Curtis, Jaccard, weighted\u002Funweighted UniFrac, Euclidean distances\n- Phylogenetic diversity metrics (require tree input)\n- Rarefaction and subsampling\n- Integration with ordination and statistical tests\n\n**Common patterns:**\n```python\nfrom skbio.diversity import alpha_diversity, beta_diversity\nimport skbio\n\n# Alpha diversity\nalpha = alpha_diversity('shannon', counts_matrix, ids=sample_ids)\nfaith_pd = alpha_diversity('faith_pd', counts_matrix, ids=sample_ids,\n                          tree=tree, otu_ids=feature_ids)\n\n# Beta diversity\nbc_dm = beta_diversity('braycurtis', counts_matrix, ids=sample_ids)\nunifrac_dm = beta_diversity('unweighted_unifrac', counts_matrix,\n                           ids=sample_ids, tree=tree, otu_ids=feature_ids)\n\n# Get available metrics\nfrom skbio.diversity import get_alpha_diversity_metrics\nprint(get_alpha_diversity_metrics())\n```\n\n**Important notes:**\n- Counts must be integers representing abundances, not relative frequencies\n- Phylogenetic metrics (Faith's PD, UniFrac) require tree and OTU ID mapping\n- Use `partial_beta_diversity()` for computing specific sample pairs only\n- Alpha diversity returns Series, beta diversity returns DistanceMatrix\n\n### 5. Ordination Methods\n\nReduce high-dimensional biological data to visualizable lower-dimensional spaces.\n\n**Key capabilities:**\n- PCoA (Principal Coordinate Analysis) from distance matrices\n- CA (Correspondence Analysis) for contingency tables\n- CCA (Canonical Correspondence Analysis) with environmental constraints\n- RDA (Redundancy Analysis) for linear relationships\n- Biplot projection for feature interpretation\n\n**Common patterns:**\n```python\nfrom skbio.stats.ordination import pcoa, cca\n\n# PCoA from distance matrix\npcoa_results = pcoa(distance_matrix)\npc1 = pcoa_results.samples['PC1']\npc2 = pcoa_results.samples['PC2']\n\n# CCA with environmental variables\ncca_results = cca(species_matrix, environmental_matrix)\n\n# Save\u002Fload ordination results\npcoa_results.write('ordination.txt')\nresults = skbio.OrdinationResults.read('ordination.txt')\n```\n\n**Important notes:**\n- PCoA works with any distance\u002Fdissimilarity matrix\n- CCA reveals environmental drivers of community composition\n- Ordination results include eigenvalues, proportion explained, and sample\u002Ffeature coordinates\n- Results integrate with plotting libraries (matplotlib, seaborn, plotly)\n\n### 6. Statistical Testing\n\nPerform hypothesis tests specific to ecological and biological data.\n\n**Key capabilities:**\n- PERMANOVA: test group differences using distance matrices\n- ANOSIM: alternative test for group differences\n- PERMDISP: test homogeneity of group dispersions\n- Mantel test: correlation between distance matrices\n- Bioenv: find environmental variables correlated with distances\n\n**Common patterns:**\n```python\nfrom skbio.stats.distance import permanova, anosim, mantel\n\n# Test if groups differ significantly\npermanova_results = permanova(distance_matrix, grouping, permutations=999)\nprint(f\"p-value: {permanova_results['p-value']}\")\n\n# ANOSIM test\nanosim_results = anosim(distance_matrix, grouping, permutations=999)\n\n# Mantel test between two distance matrices\nmantel_results = mantel(dm1, dm2, method='pearson', permutations=999)\nprint(f\"Correlation: {mantel_results[0]}, p-value: {mantel_results[1]}\")\n```\n\n**Important notes:**\n- Permutation tests provide non-parametric significance testing\n- Use 999+ permutations for robust p-values\n- PERMANOVA sensitive to dispersion differences; pair with PERMDISP\n- Mantel tests assess matrix correlation (e.g., geographic vs genetic distance)\n\n### 7. File I\u002FO and Format Conversion\n\nRead and write 19+ biological file formats with automatic format detection.\n\n**Supported formats:**\n- Sequences: FASTA, FASTQ, GenBank, EMBL, QSeq\n- Alignments: Clustal, PHYLIP, Stockholm\n- Trees: Newick\n- Tables: BIOM (HDF5 and JSON)\n- Distances: delimited square matrices\n- Analysis: BLAST+6\u002F7, GFF3, Ordination results\n- Metadata: TSV\u002FCSV with validation\n\n**Common patterns:**\n```python\nimport skbio\n\n# Read with automatic format detection\nseq = skbio.DNA.read('file.fasta', format='fasta')\ntree = skbio.TreeNode.read('tree.nwk')\n\n# Write to file\nseq.write('output.fasta', format='fasta')\n\n# Generator for large files (memory efficient)\nfor seq in skbio.io.read('large.fasta', format='fasta', constructor=skbio.DNA):\n    process(seq)\n\n# Convert formats\nseqs = list(skbio.io.read('input.fastq', format='fastq', constructor=skbio.DNA))\nskbio.io.write(seqs, format='fasta', into='output.fasta')\n```\n\n**Important notes:**\n- Use generators for large files to avoid memory issues\n- Format can be auto-detected when `into` parameter specified\n- Some objects can be written to multiple formats\n- Support for stdin\u002Fstdout piping with `verify=False`\n\n### 8. Distance Matrices\n\nCreate and manipulate distance\u002Fdissimilarity matrices with statistical methods.\n\n**Key capabilities:**\n- Store symmetric (DistanceMatrix) or asymmetric (DissimilarityMatrix) data\n- ID-based indexing and slicing\n- Integration with diversity, ordination, and statistical tests\n- Read\u002Fwrite delimited text format\n\n**Common patterns:**\n```python\nfrom skbio import DistanceMatrix\nimport numpy as np\n\n# Create from array\ndata = np.array([[0, 1, 2], [1, 0, 3], [2, 3, 0]])\ndm = DistanceMatrix(data, ids=['A', 'B', 'C'])\n\n# Access distances\ndist_ab = dm['A', 'B']\nrow_a = dm['A']\n\n# Read from file\ndm = DistanceMatrix.read('distances.txt')\n\n# Use in downstream analyses\npcoa_results = pcoa(dm)\npermanova_results = permanova(dm, grouping)\n```\n\n**Important notes:**\n- DistanceMatrix enforces symmetry and zero diagonal\n- DissimilarityMatrix allows asymmetric values\n- IDs enable integration with metadata and biological knowledge\n- Compatible with pandas, numpy, and scikit-learn\n\n### 9. Biological Tables\n\nWork with feature tables (OTU\u002FASV tables) common in microbiome research.\n\n**Key capabilities:**\n- BIOM format I\u002FO (HDF5 and JSON)\n- Integration with pandas, polars, AnnData, numpy\n- Data augmentation techniques (phylomix, mixup, compositional methods)\n- Sample\u002Ffeature filtering and normalization\n- Metadata integration\n\n**Common patterns:**\n```python\nfrom skbio import Table\n\n# Read BIOM table\ntable = Table.read('table.biom')\n\n# Access data\nsample_ids = table.ids(axis='sample')\nfeature_ids = table.ids(axis='observation')\ncounts = table.matrix_data\n\n# Filter\nfiltered = table.filter(sample_ids_to_keep, axis='sample')\n\n# Convert to\u002Ffrom pandas\ndf = table.to_dataframe()\ntable = Table.from_dataframe(df)\n```\n\n**Important notes:**\n- BIOM tables are standard in QIIME 2 workflows\n- Rows typically represent samples, columns represent features (OTUs\u002FASVs)\n- Supports sparse and dense representations\n- Output format configurable (pandas\u002Fpolars\u002Fnumpy)\n\n### 10. Protein Embeddings\n\nWork with protein language model embeddings for downstream analysis.\n\n**Key capabilities:**\n- Store embeddings from protein language models (ESM, ProtTrans, etc.)\n- Convert embeddings to distance matrices\n- Generate ordination objects for visualization\n- Export to numpy\u002Fpandas for ML workflows\n\n**Common patterns:**\n```python\nfrom skbio.embedding import ProteinEmbedding, ProteinVector\n\n# Create embedding from array\nembedding = ProteinEmbedding(embedding_array, sequence_ids)\n\n# Convert to distance matrix for analysis\ndm = embedding.to_distances(metric='euclidean')\n\n# PCoA visualization of embedding space\npcoa_results = embedding.to_ordination(metric='euclidean', method='pcoa')\n\n# Export for machine learning\narray = embedding.to_array()\ndf = embedding.to_dataframe()\n```\n\n**Important notes:**\n- Embeddings bridge protein language models with traditional bioinformatics\n- Compatible with scikit-bio's distance\u002Fordination\u002Fstatistics ecosystem\n- SequenceEmbedding and ProteinEmbedding provide specialized functionality\n- Useful for sequence clustering, classification, and visualization\n\n## Best Practices\n\n### Installation\n```bash\nuv pip install scikit-bio\n```\n\n### Performance Considerations\n- Use generators for large sequence files to minimize memory usage\n- For massive phylogenetic trees, prefer GME or BME over NJ\n- Beta diversity calculations can be parallelized with `partial_beta_diversity()`\n- BIOM format (HDF5) more efficient than JSON for large tables\n\n### Integration with Ecosystem\n- Sequences interoperate with Biopython via standard formats\n- Tables integrate with pandas, polars, and AnnData\n- Distance matrices compatible with scikit-learn\n- Ordination results visualizable with matplotlib\u002Fseaborn\u002Fplotly\n- Works seamlessly with QIIME 2 artifacts (BIOM, trees, distance matrices)\n\n### Common Workflows\n1. **Microbiome diversity analysis**: Read BIOM table → Calculate alpha\u002Fbeta diversity → Ordination (PCoA) → Statistical testing (PERMANOVA)\n2. **Phylogenetic analysis**: Read sequences → Align → Build distance matrix → Construct tree → Calculate phylogenetic distances\n3. **Sequence processing**: Read FASTQ → Quality filter → Trim\u002Fclean → Find motifs → Translate → Write FASTA\n4. **Comparative genomics**: Read sequences → Pairwise alignment → Calculate distances → Build tree → Analyze clades\n\n## Reference Documentation\n\nFor detailed API information, parameter specifications, and advanced usage examples, refer to `references\u002Fapi_reference.md` which contains comprehensive documentation on:\n- Complete method signatures and parameters for all capabilities\n- Extended code examples for complex workflows\n- Troubleshooting common issues\n- Performance optimization tips\n- Integration patterns with other libraries\n\n## Additional Resources\n\n- Official documentation: https:\u002F\u002Fscikit.bio\u002Fdocs\u002Flatest\u002F\n- GitHub repository: https:\u002F\u002Fgithub.com\u002Fscikit-bio\u002Fscikit-bio\n- Forum support: https:\u002F\u002Fforum.qiime2.org (scikit-bio is part of QIIME 2 ecosystem)\n","# scikit-bio\n\n## Overview\n\nscikit-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.\n\n## When to Use This Skill\n\nThis skill should be used when the user:\n- Works with biological sequences (DNA, RNA, protein)\n- Needs to read\u002Fwrite biological file formats (FASTA, FASTQ, GenBank, Newick, BIOM, etc.)\n- Performs sequence alignments or searches for motifs\n- Constructs or analyzes phylogenetic trees\n- Calculates diversity metrics (alpha\u002Fbeta diversity, UniFrac distances)\n- Performs ordination analysis (PCoA, CCA, RDA)\n- Runs statistical tests on biological\u002Fecological data (PERMANOVA, ANOSIM, Mantel)\n- Analyzes microbiome or community ecology data\n- Works with protein embeddings from language models\n- Needs to manipulate biological data tables\n\n## Core Capabilities\n\n### 1. Sequence Manipulation\n\nWork with biological sequences using specialized classes for DNA, RNA, and protein data.\n\n**Key operations:**\n- Read\u002Fwrite sequences from FASTA, FASTQ, GenBank, EMBL formats\n- Sequence slicing, concatenation, and searching\n- Reverse complement, transcription (DNA→RNA), and translation (RNA→protein)\n- Find motifs and patterns using regex\n- Calculate distances (Hamming, k-mer based)\n- Handle sequence quality scores and metadata\n\n**Common patterns:**\n```python\nimport skbio\n\n# Read sequences from file\nseq = skbio.DNA.read('input.fasta')\n\n# Sequence operations\nrc = seq.reverse_complement()\nrna = seq.transcribe()\nprotein = rna.translate()\n\n# Find motifs\nmotif_positions = seq.find_with_regex('ATG[ACGT]{3}')\n\n# Check for properties\nhas_degens = seq.has_degenerates()\nseq_no_gaps = seq.degap()\n```\n\n**Important notes:**\n- Use `DNA`, `RNA`, `Protein` classes for grammared sequences with validation\n- Use `Sequence` class for generic sequences without alphabet restrictions\n- Quality scores automatically loaded from FASTQ files into positional metadata\n- Metadata types: sequence-level (ID, description), positional (per-base), interval (regions\u002Ffeatures)\n\n### 2. Sequence Alignment\n\nPerform pairwise and multiple sequence alignments using dynamic programming algorithms.\n\n**Key capabilities:**\n- Global alignment (Needleman-Wunsch with semi-global variant)\n- Local alignment (Smith-Waterman)\n- Configurable scoring schemes (match\u002Fmismatch, gap penalties, substitution matrices)\n- CIGAR string conversion\n- Multiple sequence alignment storage and manipulation with `TabularMSA`\n\n**Common patterns:**\n```python\nfrom skbio.alignment import local_pairwise_align_ssw, TabularMSA\n\n# Pairwise alignment\nalignment = local_pairwise_align_ssw(seq1, seq2)\n\n# Access aligned sequences\nmsa = alignment.aligned_sequences\n\n# Read multiple alignment from file\nmsa = TabularMSA.read('alignment.fasta', constructor=skbio.DNA)\n\n# Calculate consensus\nconsensus = msa.consensus()\n```\n\n**Important notes:**\n- Use `local_pairwise_align_ssw` for local alignments (faster, SSW-based)\n- Use `StripedSmithWaterman` for protein alignments\n- Affine gap penalties recommended for biological sequences\n- Can convert between scikit-bio, BioPython, and Biotite alignment formats\n\n### 3. Phylogenetic Trees\n\nConstruct, manipulate, and analyze phylogenetic trees representing evolutionary relationships.\n\n**Key capabilities:**\n- Tree construction from distance matrices (UPGMA, WPGMA, Neighbor Joining, GME, BME)\n- Tree manipulation (pruning, rerooting, traversal)\n- Distance calculations (patristic, cophenetic, Robinson-Foulds)\n- ASCII visualization\n- Newick format I\u002FO\n\n**Common patterns:**\n```python\nfrom skbio import TreeNode\nfrom skbio.tree import nj\n\n# Read tree from file\ntree = TreeNode.read('tree.nwk')\n\n# Construct tree from distance matrix\ntree = nj(distance_matrix)\n\n# Tree operations\nsubtree = tree.shear(['taxon1', 'taxon2', 'taxon3'])\ntips = [node for node in tree.tips()]\nlca = tree.lowest_common_ancestor(['taxon1', 'taxon2'])\n\n# Calculate distances\npatristic_dist = tree.find('taxon1').distance(tree.find('taxon2'))\ncophenetic_matrix = tree.cophenetic_matrix()\n\n# Compare trees\nrf_distance = tree.robinson_foulds(other_tree)\n```\n\n**Important notes:**\n- Use `nj()` for neighbor joining (classic phylogenetic method)\n- Use `upgma()` for UPGMA (assumes molecular clock)\n- GME and BME are highly scalable for large trees\n- Trees can be rooted or unrooted; some metrics require specific rooting\n\n### 4. Diversity Analysis\n\nCalculate alpha and beta diversity metrics for microbial ecology and community analysis.\n\n**Key capabilities:**\n- Alpha diversity: richness, Shannon entropy, Simpson index, Faith's PD, Pielou's evenness\n- Beta diversity: Bray-Curtis, Jaccard, weighted\u002Funweighted UniFrac, Euclidean distances\n- Phylogenetic diversity metrics (require tree input)\n- Rarefaction and subsampling\n- Integration with ordination and statistical tests\n\n**Common patterns:**\n```python\nfrom skbio.diversity import alpha_diversity, beta_diversity\nimport skbio\n\n# Alpha diversity\nalpha = alpha_diversity('shannon', counts_matrix, ids=sample_ids)\nfaith_pd = alpha_diversity('faith_pd', counts_matrix, ids=sample_ids,\n                          tree=tree, otu_ids=feature_ids)\n\n# Beta diversity\nbc_dm = beta_diversity('braycurtis', counts_matrix, ids=sample_ids)\nunifrac_dm = beta_diversity('unweighted_unifrac', counts_matrix,\n                           ids=sample_ids, tree=tree, otu_ids=feature_ids)\n\n# Get available metrics\nfrom skbio.diversity import get_alpha_diversity_metrics\nprint(get_alpha_diversity_metrics())\n```\n\n**Important notes:**\n- Counts must be integers representing abundances, not relative frequencies\n- Phylogenetic metrics (Faith's PD, UniFrac) require tree and OTU ID mapping\n- Use `partial_beta_diversity()` for computing specific sample pairs only\n- Alpha diversity returns Series, beta diversity returns DistanceMatrix\n\n### 5. Ordination Methods\n\nReduce high-dimensional biological data to visualizable lower-dimensional spaces.\n\n**Key capabilities:**\n- PCoA (Principal Coordinate Analysis) from distance matrices\n- CA (Correspondence Analysis) for contingency tables\n- CCA (Canonical Correspondence Analysis) with environmental constraints\n- RDA (Redundancy Analysis) for linear relationships\n- Biplot projection for feature interpretation\n\n**Common patterns:**\n```python\nfrom skbio.stats.ordination import pcoa, cca\n\n# PCoA from distance matrix\npcoa_results = pcoa(distance_matrix)\npc1 = pcoa_results.samples['PC1']\npc2 = pcoa_results.samples['PC2']\n\n# CCA with environmental variables\ncca_results = cca(species_matrix, environmental_matrix)\n\n# Save\u002Fload ordination results\npcoa_results.write('ordination.txt')\nresults = skbio.OrdinationResults.read('ordination.txt')\n```\n\n**Important notes:**\n- PCoA works with any distance\u002Fdissimilarity matrix\n- CCA reveals environmental drivers of community composition\n- Ordination results include eigenvalues, proportion explained, and sample\u002Ffeature coordinates\n- Results integrate with plotting libraries (matplotlib, seaborn, plotly)\n\n### 6. Statistical Testing\n\nPerform hypothesis tests specific to ecological and biological data.\n\n**Key capabilities:**\n- PERMANOVA: test group differences using distance matrices\n- ANOSIM: alternative test for group differences\n- PERMDISP: test homogeneity of group dispersions\n- Mantel test: correlation between distance matrices\n- Bioenv: find environmental variables correlated with distances\n\n**Common patterns:**\n```python\nfrom skbio.stats.distance import permanova, anosim, mantel\n\n# Test if groups differ significantly\npermanova_results = permanova(distance_matrix, grouping, permutations=999)\nprint(f\"p-value: {permanova_results['p-value']}\")\n\n# ANOSIM test\nanosim_results = anosim(distance_matrix, grouping, permutations=999)\n\n# Mantel test between two distance matrices\nmantel_results = mantel(dm1, dm2, method='pearson', permutations=999)\nprint(f\"Correlation: {mantel_results[0]}, p-value: {mantel_results[1]}\")\n```\n\n**Important notes:**\n- Permutation tests provide non-parametric significance testing\n- Use 999+ permutations for robust p-values\n- PERMANOVA sensitive to dispersion differences; pair with PERMDISP\n- Mantel tests assess matrix correlation (e.g., geographic vs genetic distance)\n\n### 7. File I\u002FO and Format Conversion\n\nRead and write 19+ biological file formats with automatic format detection.\n\n**Supported formats:**\n- Sequences: FASTA, FASTQ, GenBank, EMBL, QSeq\n- Alignments: Clustal, PHYLIP, Stockholm\n- Trees: Newick\n- Tables: BIOM (HDF5 and JSON)\n- Distances: delimited square matrices\n- Analysis: BLAST+6\u002F7, GFF3, Ordination results\n- Metadata: TSV\u002FCSV with validation\n\n**Common patterns:**\n```python\nimport skbio\n\n# Read with automatic format detection\nseq = skbio.DNA.read('file.fasta', format='fasta')\ntree = skbio.TreeNode.read('tree.nwk')\n\n# Write to file\nseq.write('output.fasta', format='fasta')\n\n# Generator for large files (memory efficient)\nfor seq in skbio.io.read('large.fasta', format='fasta', constructor=skbio.DNA):\n    process(seq)\n\n# Convert formats\nseqs = list(skbio.io.read('input.fastq', format='fastq', constructor=skbio.DNA))\nskbio.io.write(seqs, format='fasta', into='output.fasta')\n```\n\n**Important notes:**\n- Use generators for large files to avoid memory issues\n- Format can be auto-detected when `into` parameter specified\n- Some objects can be written to multiple formats\n- Support for stdin\u002Fstdout piping with `verify=False`\n\n### 8. Distance Matrices\n\nCreate and manipulate distance\u002Fdissimilarity matrices with statistical methods.\n\n**Key capabilities:**\n- Store symmetric (DistanceMatrix) or asymmetric (DissimilarityMatrix) data\n- ID-based indexing and slicing\n- Integration with diversity, ordination, and statistical tests\n- Read\u002Fwrite delimited text format\n\n**Common patterns:**\n```python\nfrom skbio import DistanceMatrix\nimport numpy as np\n\n# Create from array\ndata = np.array([[0, 1, 2], [1, 0, 3], [2, 3, 0]])\ndm = DistanceMatrix(data, ids=['A', 'B', 'C'])\n\n# Access distances\ndist_ab = dm['A', 'B']\nrow_a = dm['A']\n\n# Read from file\ndm = DistanceMatrix.read('distances.txt')\n\n# Use in downstream analyses\npcoa_results = pcoa(dm)\npermanova_results = permanova(dm, grouping)\n```\n\n**Important notes:**\n- DistanceMatrix enforces symmetry and zero diagonal\n- DissimilarityMatrix allows asymmetric values\n- IDs enable integration with metadata and biological knowledge\n- Compatible with pandas, numpy, and scikit-learn\n\n### 9. Biological Tables\n\nWork with feature tables (OTU\u002FASV tables) common in microbiome research.\n\n**Key capabilities:**\n- BIOM format I\u002FO (HDF5 and JSON)\n- Integration with pandas, polars, AnnData, numpy\n- Data augmentation techniques (phylomix, mixup, compositional methods)\n- Sample\u002Ffeature filtering and normalization\n- Metadata integration\n\n**Common patterns:**\n```python\nfrom skbio import Table\n\n# Read BIOM table\ntable = Table.read('table.biom')\n\n# Access data\nsample_ids = table.ids(axis='sample')\nfeature_ids = table.ids(axis='observation')\ncounts = table.matrix_data\n\n# Filter\nfiltered = table.filter(sample_ids_to_keep, axis='sample')\n\n# Convert to\u002Ffrom pandas\ndf = table.to_dataframe()\ntable = Table.from_dataframe(df)\n```\n\n**Important notes:**\n- BIOM tables are standard in QIIME 2 workflows\n- Rows typically represent samples, columns represent features (OTUs\u002FASVs)\n- Supports sparse and dense representations\n- Output format configurable (pandas\u002Fpolars\u002Fnumpy)\n\n### 10. Protein Embeddings\n\nWork with protein language model embeddings for downstream analysis.\n\n**Key capabilities:**\n- Store embeddings from protein language models (ESM, ProtTrans, etc.)\n- Convert embeddings to distance matrices\n- Generate ordination objects for visualization\n- Export to numpy\u002Fpandas for ML workflows\n\n**Common patterns:**\n```python\nfrom skbio.embedding import ProteinEmbedding, ProteinVector\n\n# Create embedding from array\nembedding = ProteinEmbedding(embedding_array, sequence_ids)\n\n# Convert to distance matrix for analysis\ndm = embedding.to_distances(metric='euclidean')\n\n# PCoA visualization of embedding space\npcoa_results = embedding.to_ordination(metric='euclidean', method='pcoa')\n\n# Export for machine learning\narray = embedding.to_array()\ndf = embedding.to_dataframe()\n```\n\n**Important notes:**\n- Embeddings bridge protein language models with traditional bioinformatics\n- Compatible with scikit-bio's distance\u002Fordination\u002Fstatistics ecosystem\n- SequenceEmbedding and ProteinEmbedding provide specialized functionality\n- Useful for sequence clustering, classification, and visualization\n\n## Best Practices\n\n### Installation\n```bash\nuv pip install scikit-bio\n```\n\n### Performance Considerations\n- Use generators for large sequence files to minimize memory usage\n- For massive phylogenetic trees, prefer GME or BME over NJ\n- Beta diversity calculations can be parallelized with `partial_beta_diversity()`\n- BIOM format (HDF5) more efficient than JSON for large tables\n\n### Integration with Ecosystem\n- Sequences interoperate with Biopython via standard formats\n- Tables integrate with pandas, polars, and AnnData\n- Distance matrices compatible with scikit-learn\n- Ordination results visualizable with matplotlib\u002Fseaborn\u002Fplotly\n- Works seamlessly with QIIME 2 artifacts (BIOM, trees, distance matrices)\n\n### Common Workflows\n1. **Microbiome diversity analysis**: Read BIOM table → Calculate alpha\u002Fbeta diversity → Ordination (PCoA) → Statistical testing (PERMANOVA)\n2. **Phylogenetic analysis**: Read sequences → Align → Build distance matrix → Construct tree → Calculate phylogenetic distances\n3. **Sequence processing**: Read FASTQ → Quality filter → Trim\u002Fclean → Find motifs → Translate → Write FASTA\n4. **Comparative genomics**: Read sequences → Pairwise alignment → Calculate distances → Build tree → Analyze clades\n\n## Reference Documentation\n\nFor detailed API information, parameter specifications, and advanced usage examples, refer to `references\u002Fapi_reference.md` which contains comprehensive documentation on:\n- Complete method signatures and parameters for all capabilities\n- Extended code examples for complex workflows\n- Troubleshooting common issues\n- Performance optimization tips\n- Integration patterns with other libraries\n\n## Additional Resources\n\n- Official documentation: https:\u002F\u002Fscikit.bio\u002Fdocs\u002Flatest\u002F\n- GitHub repository: https:\u002F\u002Fgithub.com\u002Fscikit-bio\u002Fscikit-bio\n- Forum support: https:\u002F\u002Fforum.qiime2.org (scikit-bio is part of QIIME 2 ecosystem)\n",{"name":5,"description":7},"main","2b749c82b5d11fac39d9a6e021ce3f5b8a541bd1","cli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fscikit-bio",3931,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates","https:\u002F\u002Faitmpl.com","https:\u002F\u002Fgithub.com\u002Fdavila7","https:\u002F\u002Fdanielavila.me","Building AI dev tools with LLMs","2026-11-14 06:14:46",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add davila7\u002Fclaude-code-templates --skill scikit-bio",{"tool":54,"command":55},"bunx","bunx skills add davila7\u002Fclaude-code-templates --skill scikit-bio",{"tool":57,"command":58},"pnpm","pnpm dlx skills add davila7\u002Fclaude-code-templates --skill scikit-bio","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fscikit-bio\u002FSKILL.md",true,[62],{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Fapi_reference.md","REFERENCE","参考文档",18564,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fscikit-bio\u002Freferences\u002Fapi_reference.md",[69,100,127,160,195,218],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":80,"publishedAt":33},"01M70NHBTQ8BV0A2SCAZXEPHCX","wealthville-pool-scoring","Score DeFi liquidity pools before providing liquidity. Returns a 0-100 pool score and an Enter\u002FHold\u002FExit\u002FReduce\u002FAvoid verdict with calibrated confidence for ~68,800 Solana pools and 575 EVM pools, plus a public miss-inclusive track record. Use when asked whether a pool is worth LPing into, which pools look best right now, or how accurate the scores have actually been.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fweb-data\u002Fwealthville-pool-scoring\u002FSKILL.md",[75],{"categoryNo":76,"categoryName":77,"taxonomyType":78,"taxonomyTypeDesc":79},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[81,82,83,84,85,30,86,87,88,89,90,91,92,93,94,95,96,97,98,99],"scoring","pool","wealthville pool scoring","liquidity","which","exit","now","use","when","reduce","with","record","track","verdict","evm","solana","how","public","look",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":107,"publishedAt":33},"01M70MB6VR8ERJ4EM8D5KHBMEV","technical-debt-auditor","Scans a codebase and produces a quantified technical debt report with a prioritized remediation plan. Analyzes dead code, TODO\u002FFIXME\u002FHACK markers, dependency staleness, complexity hotspots, code duplication signals, test coverage gaps, unused exports, and outdated patterns. Use this skill when the user asks to audit their codebase for tech debt, wants a health check of their code quality, says things like \"where should I focus refactoring\", \"find code smells\", \"audit my codebase\", \"what technical debt do we have\", \"prioritize cleanup work\", or asks about code quality metrics. Also trigger when the user mentions \"code rot\", \"legacy cleanup\", \"refactoring priorities\", or wants to understand the overall health of a project before a major effort. Trigger even if the user doesn't say \"technical debt\" explicitly — any request to systematically assess code quality and identify improvement priorities belongs here.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Ftechnical-debt-auditor\u002FSKILL.md",[106],{"categoryNo":76,"categoryName":77,"taxonomyType":78,"taxonomyTypeDesc":79},[108,109,110,111,112,113,114,115,116,117,118,89,119,120,121,122,123,124,125,126],"technical debt","debt","technical","technical debt auditor","auditor","coverage","complexity","markers","project","cleanup","unused","code","todo","work","plan","focus","signals","audit","dependency",{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":142,"publishedAt":33},"01M70KPYH9QNHCNME5GJQGE22K","readonly-sql-guard","Make an agent's database access provably read-only. Use when an agent runs caller-supplied SQL against a production\u002FERP\u002Fanalytics database (a \"query\" MCP tool, text-to-SQL, an admin console), or when reviewing DB-access code for write\u002FDDL\u002Fside-effect\u002Ftransaction-escape risks. Checks what a statement CALLS, not just its shape.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdatabase\u002Freadonly-sql-guard\u002FSKILL.md",[133,136,137],{"categoryNo":134,"categoryName":135,"taxonomyType":78,"taxonomyTypeDesc":79},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":76,"categoryName":77,"taxonomyType":78,"taxonomyTypeDesc":79},{"categoryNo":138,"categoryName":139,"taxonomyType":140,"taxonomyTypeDesc":141},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[143,144,145,146,147,148,149,30,150,151,152,153,154,155,156,88,157,158,89,159],"readonly","guard","sql guard","sql","readonly sql guard","erp","effect","read-only","db","just","tool","calls","only","MCP","access","database","query",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":164,"licenseFileUrl":165,"sourceHtmlUrl":166,"categories":167,"keywords":171,"publishedAt":33},"01M6AFY6F7CC2BBZP1QD6VTNVC","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[168],{"categoryNo":169,"categoryName":170,"taxonomyType":78,"taxonomyTypeDesc":79},"01JBSEEDCAT000000000000009","前端开发",[172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,30,194],"artifacts builder","web","web artifacts builder","artifacts","builder","state","routing","state management","component","css","frontend","ui","Tools","file","components","shadcn","react","Tailwind","suite","jsx","html","single-file","ui components",{"skillNo":196,"name":197,"nameZh":6,"description":198,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":164,"licenseFileUrl":199,"sourceHtmlUrl":200,"categories":201,"keywords":206,"publishedAt":33},"01M6AFWF33SFV9Z3SF4PEEE4BF","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[202,205],{"categoryNo":203,"categoryName":204,"taxonomyType":78,"taxonomyTypeDesc":79},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":169,"categoryName":170,"taxonomyType":78,"taxonomyTypeDesc":79},[207,208,209,210,211,173,212,182,183,213,20,214,215,30,216,91,217],"webapp testing","testing","webapp","browser","playwright","applications","debugging","logs","screenshots","local","behavior",{"skillNo":219,"name":220,"nameZh":6,"description":221,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":164,"licenseFileUrl":222,"sourceHtmlUrl":223,"categories":224,"keywords":232,"publishedAt":33},"01M6AF67Q67JJJ5V51JR2P52KA","discernment-nudge","After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fdiscernment-nudge\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fdiscernment-nudge\u002FSKILL.md",[225,228,229],{"categoryNo":226,"categoryName":227,"taxonomyType":78,"taxonomyTypeDesc":79},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":76,"categoryName":77,"taxonomyType":78,"taxonomyTypeDesc":79},{"categoryNo":230,"categoryName":231,"taxonomyType":140,"taxonomyTypeDesc":141},"01JBSEEDCAT000000000000036","内容创作者",[233,234,235,236,237,238,24,239,175,240,185,119,241,242,243,244,245,155,246,89,247,25,248,249,250,97,251],"discernment nudge","nudge","interpretation","help","run","reasoning","writing","lookup","content","review","conversation","short","up","invoke","you","claims","argument","assemble","recommendations"]