vimalinx/bio-agent / .claude/skills/run-roh-pl
run-roh-pl
VerifiedUse when batch-running `bcftools roh` across a directory of VCF, VCF.GZ, or BCF files and merging the resulting ROH calls across samples.
run-roh-pl
Perl convenience wrapper around bcftools roh. It scans an input directory of variant files, normalizes chromosome names, optionally injects allele-frequency annotations, runs bcftools roh per sample file, appends genotype rows with bcftools query, and finally merges surviving ROH regions into one summary table.
Quick Start
- Command:
run-roh.pl -i <indir> -o <outdir> - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/run-roh.pl - Downstream visualizer:
plot-roh.py
When To Use This Tool
- Running the same ROH-calling workflow across many per-sample VCF, VCF.GZ, or BCF files in one directory
- Producing merged cross-sample ROH presence/absence summaries without hand-writing bcftools loops
- Applying consistent ROH length, marker-count, and quality filters before cross-sample merging
- Augmenting the batch run with allele-frequency annotations or IMPUTE2-style genetic maps
Common Patterns
# Basic batch ROH run
run-roh.pl -i cohort-vcfs -o roh-out
# Add allele frequencies and a genetic map directory
run-roh.pl -i cohort-vcfs -o roh-out -a af-tags.bcf -m genetic-maps
# Forward extra options directly to bcftools roh
run-roh.pl -i cohort-vcfs -o roh-out --roh-args '--buffer-size 200000,200000'
Recommended Workflow
- Put only
.vcf,.vcf.gz, or.bcfsample files in the input directory. - If using
-a, make sure the annotation file exists alongside both its.tbiindex and.hdrheader sidecar. - Run the wrapper and inspect the output directory for per-sample
.bcf,.txt.gz, and.logfiles plus the finalmerged.txt. - Use
plot-roh.pyor your own downstream logic on the generated*.txt.gzandmerged.txtoutputs.
Guardrails
--helpprints real usage text, but--versionis not implemented; locally it failed withUnknown parameter "--version". Run -h for help.-i/--indirand-o/--outdirare mandatory.- The wrapper enforces extra sidecars for
-a/--af-annots: it refuses to run unless<file>,<file>.tbi, and<file>.hdrall exist. - Source inspection shows the output directory also gets
chr-names.txt, and the merge phase writesmerged.txtwith one row per merged region and one indicator column per sample. - Existing per-sample
.bcfor.txt.gzoutputs are skipped on rerun, so the wrapper is partially restart-friendly. - The ROH phase always appends
bcftools query -f 'GT\t%CHROM\t%POS[\t%SAMPLE\t%GT]\n'output to each.txt.gz, which is whyplot-roh.pycan later consume the files.
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: 193k | 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: 193k | 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: 193k | Updated | Claude CodeCodex | Verified | Install |