claude/skills/barplot-long-labels/SKILL.md
This skill creates publication-quality horizontal barplots with long categorical y-axis labels. Use when user asks to "create a GO enrichment barplot", "make a barplot with pathway names", "plot KEGG results as horizontal bars", "barplot with long y-axis labels", "enrichment figure with proper dimensions", "horizontal barplot that fits all labels", or needs help sizing figures with long text on the y-axis. Automatically calculates optimal width and height based on label length and number of categories. Supports GO, KEGG, Reactome pathway visualization.
npx skillsauth add sahuno/llm_configs barplot-long-labelsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create horizontal barplots with automatically calculated dimensions for long categorical labels (GO pathways, KEGG terms, etc.).
source("/data1/greenbab/users/ahunos/apps/llm_configs/claude/skills/barplot-long-labels/calc_barplot_dimensions.R")
dims <- calc_barplot_dimensions(data, y_col = "Description", base_size = 20)
# ... create ggplot ...
ggsave(p, width = dims$width_mm, height = dims$height_mm, units = "mm")
Gather from user before creating the plot:
Data frame with:
Description)p.adjust, count)Direction)Parameters (defaults in parentheses):
base_size: Font size (20)base_bar_width_mm: Bar area width (180mm)wrap_width: Text wrap limit (50 chars)top_n: Number of items (10)source("/data1/greenbab/users/ahunos/apps/llm_configs/claude/skills/barplot-long-labels/calc_barplot_dimensions.R")
plot_data <- data %>%
slice_min(p.adjust, n = 10) %>%
mutate(label = str_wrap(Description, width = 50),
label = factor(label, levels = rev(unique(label))))
dims <- calc_barplot_dimensions(plot_data, y_col = "label", base_size = 20)
p <- ggplot(plot_data, aes(x = -log10(p.adjust), y = label, fill = Direction)) +
geom_bar(stat = "identity", width = 0.7) +
theme_bw(base_size = 20)
ggsave(p, width = dims$width_mm, height = dims$height_mm, units = "mm")
| Function | Purpose |
|----------|---------|
| calc_barplot_dimensions(data, y_col) | Calculate width & height from data |
| calc_barplot_width(n_chars) | Calculate width from character count |
| calc_barplot_height(n_items) | Calculate height from item count |
| create_barplot_long_labels() | Convenience function for complete plot |
| save_barplot_multiformat() | Save to pdf/png/svg |
| Problem | Solution |
|---------|----------|
| Labels cut off | Use calculated dimensions, increase base_bar_width_mm |
| Bars too thin | Increase height or reduce top_n |
| Font issues (Linux) | Don't specify font family, use system default |
references/dimension-tables.mdreferences/color-palettes.mdexamples/go_enrichment_barplot.R/data1/greenbab/users/ahunos/apps/workflows/RNA-seq_DiffExpr/docs/barplot_width_calculation_guide.mddevelopment
Decide whether and how to scatter genomics workloads across chromosomes or region tiles, then gather the per-shard outputs back together correctly. Use proactively whenever the user mentions parallelizing per-chromosome, sharding by chrom, tiling the genome, splitting a BAM/VCF/BED by region, merging per-chrom outputs, or has a workflow with obvious per-chromosome parallelism (variant calling, methylation pileup/DMR, coverage, liftover, peak calling, SV calling). Also triggers on /scatter-gather, "scatter X across chromosomes", "shard this", "chunked variant calling", "merge per-chrom VCFs", "gather these bedmethyl files", "concat these bigwigs", or any per-region parallelism question. **Trigger even when the user is also using Snakemake or Nextflow** — those skills handle DAG plumbing while this one defines *what* to scatter, *whether* it's even safe to scatter (some computations like DSS DMLtest pool globally and break under naive sharding), and *how* to gather each output format without silent corruption. Especially trigger on questions about merging per-chromosome BAM / VCF / BED / bedMethyl / bigwig outputs, or whether a scatter-gather is equivalent to running on the whole genome.
tools
Build self-contained, offline HTML genomic-region reports with igv-reports (create_report). Each HTML bundles igv.js viewers per region with embedded BAM/VCF data slices and default tracks (CpG islands, gencode, RepeatMasker); a reviewer clicks the variant table to inspect read-level evidence with no internet, no server, no IGV install. USE this skill whenever the user wants an HTML, clickable, or browseable viewer of genomic data — phrases like "HTML IGV report", "offline IGV", "self-contained HTML", "clickable viewer", "create_report", "igv-reports", "email this viewer", or any browseable HTML of reads at variants, fusion breakpoints, SV junctions, viral integrations, ChIP peaks, or ROIs. Trigger even when the user doesn't say "igv-reports" — giveaway is HTML/clickable/offline plus genomic regions. Also fire on /igv-reports. DO NOT use for static PNG/PDF/SVG IGV screenshots — use the igv-screenshots skill. Supports hg38, mm10, mm39, T2T. Defaults: --flanking 300, --standalone, genome-tagged output.
development
Verify that structural-variant / breakpoint calls are actually real by checking the chimeric reads that support them. Use whenever the user has caller output (Severus, Manta, Sniffles2, Delly, GRIDSS, MELT, Arriba, SvABA) and wants to validate / audit / QC / double-check their calls — viral integrations (HTLV-1, HBV, HPV, EBV), gene fusions (BCR-ABL, IGH translocations), mobile element insertions (L1, Alu, SVA), translocations. Trigger on phrasings like "is this integration real?", "should I trust this fusion call?", "are these false positives?", "are these PASS calls actually supported by reads?", "QC my SV calls", or any per-call chimeric-read / contamination / bimodality / T-vs-N read overlap question. Also fires on BAM @PG -Y / SA-tag questions on chimeric BAMs, and on /chimeric-read-validation. Output is a per-call TSV with pass / needs_review / fail verdicts. Do not use for calling SVs (use the caller), IGV screenshots (use igv-reports), or RNA-level fusion FDR (use Arriba).
tools
Run a stage-gated runtime/resource optimization study for any bioinformatics tool or command-line program on a SLURM HPC cluster. Walks through preflight, OFAT factor scan, 2^k confirmation factorial, build-mode + alternative-implementation comparison, input-size scan, out-of-sample validation, and produces a fitted predictive resource model (wall_s and peak_rss as functions of input size), a machine-readable model.yaml with caveats, a full REPORT.md, and a one-page exec summary PDF. Trigger PROACTIVELY whenever the user asks to "benchmark", "optimize", "tune", "characterize runtime/memory", "find best config", "build a resource model", "how does X scale", or "what should I put in my Snakemake resources directive for tool Y" — for any compute-bound bioinformatics step (sort, dedup, alignment, variant calling, methylation calling, basecalling, indexing, pileup, liftover). Also triggers on /runtime-resource-study or /benchmark-tool. Skip only for one-off quick timing where a single number suffices and no model is needed.