Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recompute R-scape images using the latest R-scape #112

Open
AntonPetrov opened this issue Mar 2, 2022 · 0 comments
Open

Recompute R-scape images using the latest R-scape #112

AntonPetrov opened this issue Mar 2, 2022 · 0 comments
Assignees

Comments

@AntonPetrov
Copy link
Member

We need to re-compute all 2D diagrams using the latest version of R-scape for the next release (14.8) because the current images are generated using one or more old versions of R-scape and the users are confused when they can't reproduce the images they see on the Rfam website using R-scape and the SEED alignments.

This requires implementing a new pipeline post-processing step to remove the title as well as the following interactions from the SVG images generated by R-scape: sc, xc, and tr.

Screenshot 2022-03-02 at 11 05 48

Currently there is some JS code that removes the title on the secondary structure tab. This was probably done as a quick fix to avoid recomputing loads of images:
https://github.com/Rfam/rfam-website/blob/101fc67ead688aee0fec31e7e48d2b6a199aecd6/RfamWeb/root/static/javascripts/rscape.js#L84

However, the images are also served in the API, and the API has no JS, so the title is also removed in Perl on server side 🤔
https://github.com/Rfam/rfam-website/blob/101fc67ead688aee0fec31e7e48d2b6a199aecd6/RfamWeb/lib/RfamWeb/Roles/Family/Methods.pm#L291

Clearly there is some duplication here, and the way to go seems to be to write a Perl/Python step to process R-scape SVG images and strip out the title and the interactions you don’t want (if it’s possible). Alternatively, we may need to ask Elena to add a special flag to R-scape to generate R2R images without certain elements like tr etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants