vimalinx/bio-agent / .claude/skills/psl2sam-pl
psl2sam-pl
VerifiedUse when converting UCSC PSL alignments into SAM and controlling the simple alignment score calculation.
psl2sam-pl
Quick Start
- Command:
psl2sam.pl [-a INT] [-b INT] [-q INT] [-r INT] input.psl > output.sam - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/psl2sam.pl - Reference: See references/help.md
When To Use This Tool
- Convert UCSC PSL alignments into SAM.
- Recalculate an
AS:ialignment score from PSL match, mismatch, and gap counts. - Preserve clipped alignment structure when translating PSL block coordinates into SAM CIGAR strings.
- Use simple PSL-to-SAM conversion when you do not need a full splice-aware aligner rerun.
Common Patterns
# 1) Convert PSL to SAM with default scoring
psl2sam.pl \
alignments.psl > alignments.sam
# 2) Use custom score weights for matches, mismatches, gap opens, and extensions
psl2sam.pl \
-a 2 -b 4 -q 5 -r 1 \
alignments.psl > rescored.sam
# 3) Stream PSL from stdin
cat alignments.psl | psl2sam.pl > alignments.sam
Recommended Workflow
- Confirm the input is ordinary PSL and not PSLX or some downstream PSL-derived report.
- Decide whether the default score weights are acceptable or whether you need explicit
-a,-b,-q, and-rvalues. - Convert to SAM, then inspect a few long-gap records to confirm the CIGAR output is acceptable for your downstream use.
- If the PSL represents spliced transcript alignments, verify whether this simple converter is sufficient before using the result in splice-aware analyses.
Guardrails
-a,-b,-q, and-ronly change the computedAS:iscore; they do not alter the underlying alignment coordinates.- The script does not emit reference-skip
Noperators in CIGAR strings, so intron-like PSL gaps are represented as insertions/deletions instead of splice skips. - Help comes from Perl
Getopt::Std, so--helpworks generically but-helpis the wrong pattern for this script family. - Output is plain SAM records without a SAM header.
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 |