SUBSTITCH(1)
β¨ SUBSTITCH β¨
okay bestie, come SIT. we're talking about substitch.pl, a lil script from the User Contributed Perl Documentation corner of the universe, and she is lowkey a whole workhorse π΄π
π NAME π
substitch.pl β split/merge stitch files into/out of stitch files. that's it, that's the gig π
πΈ SYNOPSIS πΈ
literally the two moods:
substitch.pl --split 5 allchromosomes.stitch #split big stitch into 5 roughly equal chunks
substitch.pl --project allspecies.seqs sub.anchors #project some anchors into a different coordinate space (as long as the stitch component sequences match)
first one: big stitch file in, 5 roughly-equal chunks out π° second one: take some anchors and project them into a different coordinate space β and yes, this only works as long as the stitch component sequences match, no cap π«Ά
π OPTIONS π
one bullet per option, as the ancestors intended:
--verboseβ makes it more verbose. more yapping. more β¨detailsβ¨.--faketfidfβ fake tfidf scores based on the score stat in the file. it is literally in the name, she is faking it π
π Note on split (read this one, fr fr)
okay so this program does not claim to produce an optimal splitting. she tries a couple heuristics, refines the results, and picks the best arrangement she's found so far. that's the vibe. best-effort queen π
technically this is a variation on the traditional "trunk packing problem," which is β at least in the abstract case β NP-hard, if the author remembers 15-251 correctly π (respect for the algorithm class callback, ngl).
but this particular variety of trunk packing seems like it should be solvable faster β worst case, some n^k dynamic programming, they think. but the author is betting this way is faster and tons easier to write for 90% of the cases out there πβ¨
and then, the most iconic invitation in all of Unix documentation:
if anyone reading this goes "You moron, this has been solved a thousand times already," please let them know how: krisp@dna.bio.keio.ac.jp π§
no gatekeeping, just vibes and a request for peer review. we love to see it π₯Ήπ
and that's the whole page, bestie!! this beauty ships as part of perl v5.40.1, dated 2026-08-12 β so go forth, split your stitches, project your anchors, and remember: not optimal, but she's doing her best π¦πΈπ
π¦ where this page comes from
- ubuntu stonking: murasaki-common 1.68.6-18 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms