Tweak intraspecies alignment packing code#1171
Open
twalsh-ebi wants to merge 1 commit into
Open
Conversation
sgiorgetti
reviewed
Jul 13, 2026
| having count = 1 | ||
| /; | ||
|
|
||
| my $intra_species_constraints_aref = $dbh->selectall_arrayref($intraspecies_constraints_sql); |
Contributor
There was a problem hiding this comment.
This query might take a while to run, as it seems there is hardly any constraint.
Would it be possible - if straightforward - to include this dataset to packed / json, and essentially cache its results?
Contributor
Author
There was a problem hiding this comment.
Thanks for having a look at this, @sgiorgetti.
Actually the results of this intraspecies query are only used in the generation of the Compara alignment summary, so we wouldn't need to cache the former if we cache the latter.
If we cache the Compara intraspecies alignment data in a JSON file ( as implemented in eg-web-plants PR 110 ), then this query could be skipped during packing of the Ensembl Plants MULTI.db.packed file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
eg-web-common PR 133 removed the
EnsEMBL::Web::ConfigPacker::_summarise_compara_alignmentsstub method fromeg-web-commoncode and restored the packing of intraspecies alignments in NV sites. This had two main effects:Wheat polyploidy-aware self-alignment) to Ensembl Plants;MULTI.db.packedfile.The increased
MULTI.db.packedpacking time has been posing something of a challenge. This has perhaps been highlighted by recent web code changes to reduce database access by usingMULTI.db.packed( e.g. eg-web-common PR 175 ).This pull request would tweak the code for identifying intraspecies alignment datasets and summarising Compara alignments, with a view to reducing
MULTI.db.packedpacking time in Ensembl Plants.Changes include:
EnsEMBL::Web::ConfigPacker::_summarise_compara_alignmentstoEnsEMBL::Web::Utils::Compara::_summarise_compara_alignment_data, and calling the latter from the former.ensembl_compara_plants_63_116, the new query returned its 774 rows in 2 min 31.70 sec, with each row containing an alignment endpoint pair. By contrast, the existing query took 4 min 21.58 sec to return its 21,322,846 rows, which require further processing to obtain the alignment endpoint pairs.EnsEMBL::Web::Utils::Compara::_fetch_intraspecies_constraintswhich uses one database query instead of two.ConfigPackermethods_get_regionsand_comp_seto indicate they are not in use (as far as we know).Refactoring alignment summary code would also make it possible to implement pre-packing of intraspecies alignments as in eg-web-plants PR 110.
Views affected
Because this change is intended to help with repacking
MULTI.db.packed, it should not result in a change to any web view.It should ideally not even affect the contents of
MULTI.db.packed. During testing, changes were observed in the Vertebrates intraspecies alignment region summary. However, a spot-check of one such change confirmed that the new database query provided a more accurate alignment endpoint pair.Possible complications
None expected.
Merge conflicts
None detected.
Related JIRA Issues (EBI developers only)