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

Tripal Field: JBrowse Link on Organism and Genome Assembly Pages #9

Open
laceysanderson opened this issue Dec 2, 2018 · 1 comment

Comments

@laceysanderson
Copy link
Member

It would be nice to have a field that creates a jbrowse link on specific organism and genome assembly (project-based or analysis-based). It would need to point to a different JBrowse for each page.

Perhaps we can collaborate with Staton Lab on https://github.com/statonlab/tripal_jbrowse_instance which can be used to add a JBrowse Link on a Tripal3 page?

@laceysanderson
Copy link
Member Author

laceysanderson commented Feb 25, 2022

To provide good integration with this module, you would likely want to add this field in the tripal_jbrowse_page sub-module. This allows you to use a similar approach to that used on the main listing page.

Specifically, here is the code that pulls the list of jbrowse instances, removed private instances and builds the URL. I would put this in the field class for the new field.

Then this code in the page template formats that into links using the Drupal API.

For your case, you'll want to filter the instances by either organism or analysis id to determine which to show on a given page. Here is an example of how to filter by organism_id.

You'll likely want some extra methods in the field class to determine the organism_id or analysis_id based on the given page. Personally, I would do this by looking at the base chado table associated with the Tripal content type the field is attached to. Then you can set up rules based on that table and use the Chado Schema Documentation to determine what information is available to you.

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

1 participant