[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JM45A2GEPQB1GQDJMZQYAF":3,"skill-same:01M6JM45A2GEPQB1GQDJMZQYAF":65},{"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":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":6,"ownerDescription":43,"updatedAt":44,"install":45,"resources":58},"01M6JM45A2GEPQB1GQDJMZQYAF","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.","transaurus\u002Fstaging-davila7-claude-code-templates","transaurus","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F210882017?v=4","01M6JH1R6ZCRXGJCTDP5ZKZBE6","Page Turner Agent","01M6JH1RBBR2P6Y0XWDGM4B0G7",0,"MIT","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-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],"scikit bio","toolkit","metrics","alpha","beta","data","analysis","diversity","sequence analysis","microbiome","trees","for","sequence","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","34fa6acf794b9a6310d298cbb8fb8c9420a5edcf","cli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fscikit-bio",2,"https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates","https:\u002F\u002Fgithub.com\u002Ftransaurus","Automated works of Page Turner","2026-03-28 10:12:59",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add transaurus\u002Fstaging-davila7-claude-code-templates --skill scikit-bio",{"tool":51,"command":52},"bunx","bunx skills add transaurus\u002Fstaging-davila7-claude-code-templates --skill scikit-bio",{"tool":54,"command":55},"pnpm","pnpm dlx skills add transaurus\u002Fstaging-davila7-claude-code-templates --skill scikit-bio","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fscikit-bio\u002FSKILL.md",true,[59],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fapi_reference.md","REFERENCE","参考文档",18564,"https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fscikit-bio\u002Freferences\u002Fapi_reference.md",[66,92,113,136,156,179],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":32},"01M6JMRJR3BE0HGWFWDZSB853S","zapier-make-patterns","No-code automation democratizes workflow building. Zapier and Make (formerly Integromat) let non-developers automate business processes without writing code. But no-code doesn't mean no-complexity - these platforms have their own patterns, pitfalls, and breaking points.  This skill covers when to use which platform, how to build reliable automations, and when to graduate to code-based solutions. Key insight: Zapier optimizes for simplicity and integrations (7000+ apps), Make optimizes for power","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fzapier-make-patterns\u002FSKILL.md",[],[73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,30,91],"zapier make patterns","patterns","make","zapier","writing","workflow","automation","code","integrations","business","use","power","complexity","platform","apps","how to","No-Code","which","spawner",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":32},"01M6JMR8YK6SWPCTG1MCQTMN9S","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fyeet\u002FSKILL.md",[],[94,99,100,101,102,103,104,105,106,107,108,109,83,110,111,112],"cli","github","commit","pull request","openai","pull","push","flow","open","gh","user","only","stage","github cli",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":32},"01M6JMQNFE64ZASQK90HARRXW8","workflow-automation","Workflow automation is the infrastructure that makes AI agents reliable. Without durable execution, a network hiccup during a 10-step payment flow means lost money and angry customers. With it, workflows resume exactly where they left off.  This skill covers the platforms (n8n, Temporal, Inngest) and patterns (sequential, parallel, orchestrator-worker) that turn brittle scripts into production-grade automation.  Key insight: The platforms make different tradeoffs. n8n optimizes for accessibility","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fworkflow-automation\u002FSKILL.md",[],[78,79,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,30,91],"Workflow Automation","ai agents","accessibility","workflows","apache","execution","inngest","parallel","orchestrator","resume","n8n","payment","worker","scripts","temporal","with",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":32},"01M6JMQDYJ0XETERPHGDR3EVGN","trigger-dev","Trigger.dev expert for background jobs, AI workflows, and reliable async execution with excellent developer experience and TypeScript-first design. Use when: trigger.dev, trigger dev, background task, ai background job, long running task.","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Ftrigger-dev\u002FSKILL.md",[],[143,144,145,146,147,123,148,124,125,149,83,150,151,152,153,154,155,135,30,91],"dev","trigger dev","trigger","design","typescript","async execution","first","async","developer experience","expert","task","background jobs","long",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":32},"01M6JMQ5J6KK3GSX9FJCWWK6G6","planning-with-files","Transforms workflow to use Manus-style persistent markdown files for planning, progress tracking, and knowledge storage. Use when starting complex tasks, multi-step projects, research tasks, or when the user mentions planning, organizing work, tracking progress, or wants structured output.","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fplanning-with-files\u002FSKILL.md",[],[163,164,165,135,166,78,167,168,169,170,171,172,83,173,174,175,176,177,178,30],"planning with files","planning","files","with files","storage","tasks","markdown","knowledge","projects","work","manus","structured output","progress","transforms","multi","output",{"skillNo":180,"name":181,"nameZh":6,"description":182,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":183,"categories":184,"keywords":185,"publishedAt":32},"01M6JMPWAT60RXXNEC4V9TRBRS","n8n-workflow-patterns","Proven workflow architectural patterns from real n8n workflows. Use when building new workflows, designing workflow structure, choosing workflow patterns, planning workflow architecture, or asking about webhook processing, HTTP API integration, database operations, AI agent workflows, or scheduled tasks.","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fn8n\u002Fn8n-workflow-patterns\u002FSKILL.md",[],[78,186,130,187,74,188,189,123,190,168,164,191,192,193,194,195,196,197,198,199],"n8n workflow patterns","workflow patterns","n8n workflow","ai agent","architecture","database","api","planning workflow","structure","database operations","webhook","processing","http api","scheduled"]