Use when converting UCSC PSL alignments into SAM and controlling the simple alignment score calculation.
psl2sam.pl [-a INT] [-b INT] [-q INT] [-r INT] input.psl > output.sam/home/vimalinx/miniforge3/envs/bio/bin/psl2sam.plAS:i alignment score from PSL match, mismatch, and gap counts.# 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
-a, -b, -q, and -r values.-a, -b, -q, and -r only change the computed AS:i score; they do not alter the underlying alignment coordinates.N operators in CIGAR strings, so intron-like PSL gaps are represented as insertions/deletions instead of splice skips.Getopt::Std, so --help works generically but -help is the wrong pattern for this script family.