Skip to content

vimalinx/bio-agent / .claude/skills/feature-counts

feature-counts

Unverified

Use 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 STAR or subjunc when 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

  1. Start from coordinate-sorted BAM files aligned to the same assembly as the annotation.
  2. Decide gene-level vs feature-level summarization and set -f, -t, and -g accordingly.
  3. Set library-specific flags explicitly: -p, --countReadPairs, -s, -M, --fraction, -Q.
  4. Review both counts.txt and counts.txt.summary before downstream DE analysis.

Guardrails

  • Chromosome names must match between BAM and annotation; use -A alias mapping if they do not.
  • For paired-end libraries, -p alone assumes paired reads, but --countReadPairs is what switches counting from reads to fragments.
  • Strandness is easy to invert; verify whether the library is 0, 1, or 2 before counting the whole cohort.
  • -M uses the NH tag to detect multi-mappers; do not enable it blindly if aligner tags are inconsistent.
  • Annotation format defaults to GTF; specify -F SAF when using SAF input.
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: 196kUpdated Claude CodeCodexVerifiedInstall
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: 192kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 192kUpdated Claude CodeCodexVerifiedInstall
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: 192kUpdated Claude CodeCodexVerifiedInstall