Ace::S...gnment(3pm)

πŸ’– Ace::Sequence::GappedAlignment β€” the gapped alignment queen πŸ’–

okay bestie, you found your way into the 3pm subsection of the docs, and this page is literally the manual for Ace::Sequence::GappedAlignment, aka the Gapped alignment object ✨ she's niche, she's powerful, she knows where every aligned segment sits.


✨ SYNOPSIS ✨

like, copy this exactly, don't freestyle it:

# open database connection and get an Ace::Sequence object
use Ace::Sequence;

# get a megabase from the middle of chromosome I
$seq = Ace::Sequence->new(-name   => 'CHROMOSOME_I,
                          -db     => $db,
                          -offset => 3_000_000,
                          -length => 1_000_000);

# get all the gapped alignments
@alignments = $seq->alignments('EST_GENOME');

# get the aligned segments from the first one
@segs = $alignments[0]->segments;

# get the position of the first aligned segment on the
# source sequence:
($s_start,$s_end) = ($segs[0]->start,$segs[0]->end);

# get the target position for the first aligned segment
($t_start,$t_end) = ($segs[0]->target->start,$segs[0]->target->end);
⚠️ yes, the 'CHROMOSOME_I on that one line is doing what it's doing. we reproduce it character for character, no notes, no edits, we don't touch the sacred text. 🫢

🌸 DESCRIPTION 🌸

so Ace::Sequence::GappedAlignment is a subclass of Ace::Sequence::Feature. she inherits literally every method of Ace::Sequence::Feature β€” all of it, no crumbs β€” but she also adds the ability to retrieve the positions of the aligned segments. πŸŽ€

each segment is its own Ace::Sequence::Feature, and from that segment you can pull the source coordinates and the target coordinates. two coordinate systems, one little feature object. it's giving duality. πŸ’…


πŸ¦‹ OBJECT CREATION πŸ¦‹

ngl, you will not ordinarily create an Ace::Sequence::GappedAlignment object directly. don't try it, that's not the vibe. πŸ™ˆ

instead, objects get created in response to an alignments() call to an Ace::Sequence object. the Ace::Sequence does the summoning, you just receive the gift. ✨


πŸ‘‘ OBJECT METHODS πŸ‘‘

most methods are inherited from Ace::Sequence::Feature β€” she's not redoing work that's already been done, that's main character efficiency. the following methods are also supported:

  • segments() β€” the segment-fetcher πŸ’«
@segments = $gene->segments;

returns a list of Ace::Sequence::Feature objects corresponding to similar segments.

  • relative() β€” the toggle for relative coordinates 🎚️
$relative = $gene->relative;
$gene->relative(1);

this turns on and off relative coordinates. by default, the exons and intron features will be returned in the coordinate system used by the gene. if relative() is set to a true value, then coordinates will be expressed as relative to the start of the gene. the first exon will (usually) be 1. "usually" is doing so much heavy lifting there and we respect it 😭


🌈 SEE ALSO 🌈

go be nosy, bestie, the whole friend group is here:

  • Ace
  • Ace::Object
  • Ace::Sequence
  • Ace::Sequence::Homol
  • Ace::Sequence::Feature
  • Ace::Sequence::FeatureList
  • GFF

πŸ’œ AUTHOR πŸ’œ

Lincoln Stein <lstein@cshl.org> with extensive help from Jean Thierry-Mieg <mieg@kaa.crbm.cnrs-mop.fr> β€” icons, both of them, we stan. 🫢

Copyright (c) 1999, Lincoln D. Stein

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for disclaimers of warranty.


and that's the whole page, no cap. πŸŽ€ this was perl v5.42.3, dated 2026-08-19 β€” mwah, go write some alignments bestie πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from