Dna kmer counting

From XuShuwenn/RedAct · View interactive version

Dna kmer counting is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Count overlapping DNA k-mers using scikit-bio and output alphabetically sorted counts.

How to use this skill

Skill file

DNA k-mer Counting with scikit-bio

Reusable workflow for counting overlapping DNA k-mers with the scikit-bio library and writing alphabetically sorted counts. Use this when a task asks for k-mer frequency counts from a DNA sequence, requires overlapping windows, and specifies a strict output format (e.g., one line per observed k-mer like KMER: count).

When to Use

Activate this skill when the user asks you to:

Core Workflow

  1. Read input sequence
  1. Decide k and ambiguity handling
  1. Generate overlapping k-mers using scikit-bio
  1. Count and sort
  1. Output formatting

Verification

Before finalizing output, perform these checks:

Common Pitfalls and How to Avoid Them

Success Criteria

Optional Script Usage

A helper script is provided to perform robust k-mer counting and optional verification.

Example:

If scikit-bio is not installed, install it in your environment (e.g., pip install scikit-bio) before running.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.