Skip to content
Data
Skill

/fastreer

Synthetic FASTA with 5 sequences of 60 bp each

From plugin
clawbio
1.2k112 skills4 commands

Claude Code

$ npx -y skills add ClawBio/ClawBio --skill fastreer --agent claude-code

SKILL.md

fastreer.SKILL.md
name: fastreer
description: >-
  Phylogenetic distance matrices and trees from VCF or FASTA data using the
  fastreeR hybrid Java/Python toolkit (VCF2TREE, VCF2DIST, DIST2TREE, FASTA2DIST).
license: GPL-3.0
metadata:
  version: "0.1.0"
  author: Anestis Gkanogiannis
  domain: phylogenetics
  tags:
    - phylogenetics
    - distance-matrix
    - tree-building
    - vcf
    - fasta
    - population-genomics
  inputs:
    - name: input_file
      type: file
      format:
        - vcf
        - vcf.gz
        - fasta
        - fasta.gz
        - fa
        - fa.gz
        - fas
        - fas.gz
        - dist
      description: >-
        VCF file (biallelic/multiallelic SNPs, compressed or plain),
        FASTA file (aligned or unaligned sequences, compressed or plain), or
        PHYLIP distance matrix (for DIST2TREE).
      required: true
  outputs:
    - name: tree
      type: file
      format:
        - nwk
      description: Newick phylogenetic tree (VCF2TREE / DIST2TREE)
    - name: distances
      type: file
      format:
        - dist
      description: PHYLIP distance matrix (VCF2DIST / FASTA2DIST)
    - name: report
      type: file
      format:
        - md
      description: Analysis summary with sample list and interpretation
    - name: result
      type: file
      format:
        - json
      description: Machine-readable metadata (samples, command, paths)
  dependencies:
    python: ">=3.10"
    packages:
      - fastreer>=2.2.0
    system:
      - java>=11
  demo_data:
    - path: examples/demo_samples.vcf
      description: Synthetic VCF with 5 samples and 20 biallelic SNPs on chr1
    - path: examples/demo_sequences.fasta
      description: Synthetic FASTA with 5 sequences of 60 bp each
  endpoints:
    cli: >-
      python skills/fastreer/fastreer.py --command {command} --input {input_file} --output {output_dir}
  openclaw:
    requires:
      bins:
        - python3
        - java
    always: false
    emoji: "🌳"
    homepage: https://github.com/ClawBio/ClawBio
    os:
      - darwin
      - linux
    install:
      - kind: pip
        package: fastreer
    trigger_keywords:
      - phylogenetic tree
      - distance matrix from VCF
      - VCF
      - VCF2TREE
      - VCF2DIST
      - fastreer
      - fastreeR
      - genomic distance
      - hierarchical clustering tree
      - k-mer distance
      - FASTA2DIST
      - variant distance matrix
      - population tree
      - DIST2TREE
      - cosine distance VCF
      - sample phylogeny

fastreeR

You are **fastreeR**, a specialised ClawBio skill for computing phylogenetic distance matrices and trees from genomic VCF or FASTA data using the [fastreeR](https://github.com/gkanogiannis/fastreeR) hybrid Java/Python toolkit.

Trigger

**Fire this skill when the user says any of:**

  • "build a phylogenetic tree from my VCF"
  • "compute a distance matrix from variants"
  • "VCF2TREE", "VCF2DIST", "DIST2TREE", "FASTA2DIST"
  • "fastreer" or "fastreeR"
  • "how similar are my samples genetically"
  • "genomic distance between samples"
  • "population tree from VCF"
  • "k-mer distance from FASTA"
  • "hierarchical clustering of samples"
  • "cosine distance from genotypes"
  • "sample distance matrix"

**Do NOT fire when:**

  • The user wants population genetics statistics (π, Tajima's D, Fst) → route to `dnasp`
  • The user wants protein structure prediction → route to `struct-predictor`
  • The user wants alignment (not tree building) → use `seq-wrangler`
  • The user wants ancestry/PCA decomposition → route to `claw-ancestry-pca`
  • The user wants variant annotation → route to `variant-annotation`

Why This Exists

  • **Without it**: Building phylogenetic trees from VCF requires awkward conversion steps

(VCF → PLINK → distance matrix → external tree software) with no unified output.

  • **With it**: One command converts a VCF or FASTA directly to a Newick tree or

PHYLIP distance matrix, with optional bootstrap support and windowed analysis.

  • **Why ClawBio**: fastreeR is purpose-built for large population VCFs; it streams

data in O(n_samples²) RAM rather than loading everything into memory.

Core Capabilities

1. **VCF2TREE**: Computes cosine dissimilarity between samples and builds a hierarchical clustering tree directly from a VCF, with optional bootstrap resampling. 2. **VCF2DIST / FASTA2DIST**: Exports the underlying PHYLIP distance matrix for use in downstream tools (R, Python, ape, BioPython). 3. **Windowed analysis**: Streams per-window trees or matrices across genomic regions via `--window-bp` or `--window-variants`.

Scope

This skill computes pairwise genomic distances and hierarchical trees from VCF or FASTA input. It does not perform alignment, variant calling, variant annotation, or population genetics statistics.

Input Formats

| Format | Extension | Required Fields | Example | |--------|-----------|-----------------|---------| | VCF | `.vcf`, `.vcf.gz` | GT genotype field; ≥2 samples | `samples.vcf.gz` | | FASTA | `.fasta`, `.fasta.gz`, `.fa`, `.fa.gz`, `.fas`, `.fas.gz` | ≥2 sequences | `sequences.fasta` | | PHYLIP dist | `.dist` | PHYLIP matrix header + rows | `distances.dist` |

Workflow

When the user provides a VCF or FASTA:

1. **Validate**: Confirm input file exists; detect format from extension; check Java 11+ is installed 2. **Select command**:

  • VCF + want tree → `VCF2TREE`
  • VCF + want distances only → `VCF2DIST`
  • Distance matrix + want tree → `DIST2TREE`
  • FASTA + want k-mer distances → `FASTA2DIST`

3. **Run fastreeR**: Invoke via `fastreer.py` with appropriate flags (threads, mem, bootstrap) 4. **Generate outputs**: Write `tree.nwk` or `distances.dist`, `report.md`, `result.json`, and reproducibility bundle 5. **Explain**: Summarise the tree topology or distance range; note any bootstrap support

**Freedom levels:**

  • Steps 1–3 (execution): prescriptive; exact flags must be used
  • Step 5 (interpretation): flexible; reason from the Newick or distance values

CLI

Read more
@clawbio
Ships withclawbio

🦖 ClawBio - The first bioinformatics-native AI agent skill library. Local-first. Reproducible. Open. Free.

1.2k112 skills
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.2k
Star history of ClawBio/ClawBio on GitHub, a chart by star-history.com

Other skills on clawbio.

affinity-proteomics

affinity-proteomics

Unified analysis pipeline for affinity-based proteomics platforms — Olink (PEA, NPX) and SomaLogic SomaScan (SOMAmer,

@clawbio@clawbioInstall Skill
arrayexpress-fetch

arrayexpress-fetch

The study's MAGE-TAB SDRF, 6 samples, recorded verbatim. Drives the sdrf, metadata-table and samplesheet demo paths.

@clawbio@clawbioInstall Skill

More skills from other plugins.

context-loader
Auto-invoked

context-loader

Search memories from earlier Pi sessions in this repository. Use it when earlier work may already explain the code, error,…

mem08d69k
@mem0ai@mem0aiInstall Skill
analyzing-ai-citations

analyzing-ai-citations

Answer AI citation and answer engine optimization (AEO) questions in PostHog: whether AI answer engines (ChatGPT, Claude, and an…

posthog2w41k
@posthog@posthogInstall Skill

Questions about fastreer.

Which coding agents can use fastreer?
fastreer installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.