vimalinx/bio-agent / .claude/skills/feature-counts
feature-counts
UnverifiedUse when you need to assign aligned sequencing reads to genes or genomic features for expression quantification from SAM/BAM files
feature-counts
Quick Start
- Command:
featureCounts - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/featureCounts - Version: 2.1.1
- Full options: see references/help.md
When To Use This Tool
- Convert aligned RNA-seq BAM/SAM files into gene-level count matrices.
- Count reads at exon level with
-f, or junction-supporting reads with-J. - Handle stranded, paired-end, and multi-mapping policies explicitly.
- Prefer this after
STARorsubjuncwhen you need a simple, transparent counting step.
Common Patterns
# 1) Standard gene-level counting for paired-end, reversely stranded RNA-seq
featureCounts \
-a genes.gtf \
-o counts.txt \
-T 8 \
-p --countReadPairs \
-s 2 \
sample.bam
# 2) Exon-level counting instead of gene-level summarization
featureCounts \
-a genes.gtf \
-o exon_counts.txt \
-T 8 \
-f \
-t exon \
-g gene_id \
sample.bam
# 3) Count exon-exon junction support
featureCounts \
-a genes.gtf \
-G genome.fa \
-o counts.txt \
-J \
sample.bam
Recommended Workflow
- Start from coordinate-sorted BAM files aligned to the same assembly as the annotation.
- Decide gene-level vs feature-level summarization and set
-f,-t, and-gaccordingly. - Set library-specific flags explicitly:
-p,--countReadPairs,-s,-M,--fraction,-Q. - Review both
counts.txtandcounts.txt.summarybefore downstream DE analysis.
Guardrails
- Chromosome names must match between BAM and annotation; use
-Aalias mapping if they do not. - For paired-end libraries,
-palone assumes paired reads, but--countReadPairsis what switches counting from reads to fragments. - Strandness is easy to invert; verify whether the library is
0,1, or2before counting the whole cohort. -Muses theNHtag to detect multi-mappers; do not enable it blindly if aligner tags are inconsistent.- Annotation format defaults to
GTF; specify-F SAFwhen using SAF input.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |