Re: Editing Apollo

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Editing Apollo

nathandunn

Greg,

Glad the initial changes worked out.  

Could you send us screen shots of what / where you plan to change? 

I “think” what you want is “main.js”, for example here:   https://github.com/GMOD/Apollo/blob/master/client/apollo/js/main.js#L376

Just run “ant watchman" to copy the files over there for testing automatically, or  "gradle copy-resources-dev” to force them.  

JBrowse has very “sticky” cache, so you’ll need to make sure you disable cache while testing. 

Let us know if you need anything further.

I’m copying this to the Apollo list as I think this might be useful to a wider audience.  

Nathan


On Nov 3, 2017, at 7:07 AM, Warren, Gregory S. <[hidden email]> wrote:

Hi Nathan,

Now that Apollo is working properly my next task is to add the features I told you about. However I am finding it difficult to figure out the structure. I was hoping I could tell you what I'm trying to do and you can point me to which files I should edit. 

Essentially I need to add a new search bar to the top menu. A user should be able to write a gene in this search bar, for example MB or COL1A1. Once this is done I want to create a new temporary Reference Sequence Track which starts around 4000 bases downstream of the gene and extends through the sequence to past 5000 bases upstream of the gene. 

At the same time all the NM_ transcripts associated with that gene are automatically placed into the User-Created Annotation track. Finally I need to number all the bases in the transcripts according to HGVS nomenclature. That is for later though. Most of this needs to be automated to speed up usage from potential users as they will likely not be tech-savvy. 

What are the paths of files where these kinds of operations are covered or methods which perform these kinds of tasks which I can reuse? 

I really appreciate all the time you have given. Your help on the issue I opened was used as the basis for us troubleshooting our instance and recreating the apollo.conf file to suit our needs. 

Many thanks,

Greg





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|

Re: Editing Apollo

nathandunn

Just to follow-up / clarify my previous answer.   

On Nov 3, 2017, at 7:07 AM, Warren, Gregory S. <[hidden email]> wrote:

Hi Nathan,

Now that Apollo is working properly my next task is to add the features I told you about. However I am finding it difficult to figure out the structure. I was hoping I could tell you what I'm trying to do and you can point me to which files I should edit. 

Essentially I need to add a new search bar to the top menu. A user should be able to write a gene in this search bar, for example MB or COL1A1. Once this is done I want to create a new temporary Reference Sequence Track which starts around 4000 bases downstream of the gene and extends through the sequence to past 5000 bases upstream of the gene. 

I think this is do-able, but I wanted to know the purpose of the temporary Reference Sequence Track as the reference sequence is already there (you have to zoom in to see it, though).

WRT to making a searchable gene (I’m assuming for the evidence area), I don’t think that would be bad.   The TAMU-CPT group I *think* did something similar (can’t remember where the code was) with this plugin:  https://github.com/TAMU-CPT/cacao-apollo-plugin  , https://github.com/TAMU-CPT/cacao-frontend  

While I think you could embed it in the evidence area, creating a popup will probably be better:


You can then just link it up to search evidence and create an annotation (below).   I  have a branch that sort of wires this in:


But in this case I’m replacing the evidence search box at the top with different functionality (maybe that would work for you as well). 

At the same time all the NM_ transcripts associated with that gene are automatically placed into the User-Created Annotation track. Finally I need to number all the bases in the transcripts according to HGVS nomenclature. That is for later though. Most of this needs to be automated to speed up usage from potential users as they will likely not be tech-savvy. 

You should be able to do this. 

This is the code that creates annotations from features now:



Nathan

What are the paths of files where these kinds of operations are covered or methods which perform these kinds of tasks which I can reuse? 

I really appreciate all the time you have given. Your help on the issue I opened was used as the basis for us troubleshooting our instance and recreating the apollo.conf file to suit our needs. 

Many thanks,

Greg





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|

Re: Editing Apollo

nathandunn
In reply to this post by nathandunn

Okay, 

I think we have a few possible solutions for you.  I think, that in every case, doing the right-click on the feature to show the temporary sequence track (which I now understand) makes the most sense and it looks like you are well on your way to implementing that.   Also, in all cases, the Apollo client has access to the current JBrowse Browser object so you can call “addTrack” with whatever config makes sense, so temporarily adding a track should work.  You can look in the JBrowse code to see how different features, like the trackList or File Menu add tracks.

In terms of populating temporary track, you have a few of options:

1 - create a completely separate popup / overview using the existing track services (http://demo.genomearchitect.org/Apollo-staging/WebServices/)  (plus a quick method we could add to get specific sequences as well).  

We use this within the AGR to paint overviews, but with D3 you can do pretty much anything with these services: http://www.alliancegenome.org/gene/ZFIN:ZDB-GENE-990415-200   using this code here: https://github.com/alliance-genome/agr_ui/blob/develop/src/components/genomeFeature/GenomeFeature.js   

2 - A custom REST-track with a custom view.    You can write a custom REST server either within Apollo to deliver the features directly (we are using Grails 2.5).   You could add a separate controller method or add your own.




Again, we should add a method for returning sequences for a given range. 

You may need to create a custom JBrowse track for this to get exactly what you want.  Extending Canvas or SVG (experimental) is probably you’re best bet.   There are more than a few examples of this in here.   You could add it directly to JBrowse / Apollo or as a plugin (https://gmod.github.io/jbrowse-registry/).

3 - You could create a custom inline track (again probably the Canvas Track) that can combine track info from the AnnotTrack and the SequenceTrack.   I would just add this as another Apollo track, which should have visibility to both the Sequence and Annotation tracks and shouldn’t have to hit the server an additional time, though you’ll have to wait for AnnotTrack to populate properly.

Either way, I think that all of these are very do-able depending on what makes the most sense to you.

Nathan

On Nov 6, 2017, at 8:08 AM, Warren, Gregory S. <[hidden email]> wrote:

Hi Nathan, 

So in Current.png we have the standard Apollo Window with the reference sequence window visible and there is a transcript in the User-Created Annotation Track. 

The ultimate goal of my project is to have a third integral track called numbering, or something along this line (Perhaps maybe instead of another track it is included within the User-Created Annotation Track?), where the bases are numbered according to the HGVS system directly underneath in alignment to the two tracks above. The standard layout is that numbering begins at the A in the first exon ATG. This number then increments until you reach an intron. At this point the numbering changes as is seen in Potential.png where it takes the last number of the exon and increments upwards to the midpoint of the intron. If there are an odd number of bases in an intron as shown in Potential.png the extra base is added to the first half of the numbering. 

From there it is the next exon base number incrementing downwards until you reach the next exon.This repeats until the full transcript is numbered. I wrote a basic Javascript Method as proof of concept in Potential.png. However the input is hard coded there.

The ideal solution probably has a new track which is populated at the same time as when an Annotation is created from a feature. 

Does this make sense?

Also I tried subscribing as you suggested and here was the response:
Command has failed:

> subscribe now
  List 'now' does not exist.

Greg 

From: Nathan Dunn <[hidden email]>
Sent: 06 November 2017 15:38:55
To: Warren, Gregory S.
Subject: Fwd: Editing Apollo
 

Sorry, forgot to send it to the author!



you can subscribe to the mailing list here by sending an email to:   [hidden email]  with the subject “subscribe now”

This is a really good question that would benefit others.  

I’ll look at your follow-up email as well.

Nathan

Begin forwarded message:

From: Nathan Dunn <[hidden email]>
Subject: Re: Editing Apollo
Date: November 3, 2017 at 8:58:28 AM PDT
To: Apollo List <[hidden email]>


Greg,

Glad the initial changes worked out.  

Could you send us screen shots of what / where you plan to change? 

I “think” what you want is “main.js”, for example here:   https://github.com/GMOD/Apollo/blob/master/client/apollo/js/main.js#L376

Just run “ant watchman" to copy the files over there for testing automatically, or  "gradle copy-resources-dev” to force them.  

JBrowse has very “sticky” cache, so you’ll need to make sure you disable cache while testing. 

Let us know if you need anything further.

I’m copying this to the Apollo list as I think this might be useful to a wider audience.  

Nathan


On Nov 3, 2017, at 7:07 AM, Warren, Gregory S. <[hidden email]> wrote:

Hi Nathan,

Now that Apollo is working properly my next task is to add the features I told you about. However I am finding it difficult to figure out the structure. I was hoping I could tell you what I'm trying to do and you can point me to which files I should edit. 

Essentially I need to add a new search bar to the top menu. A user should be able to write a gene in this search bar, for example MB or COL1A1. Once this is done I want to create a new temporary Reference Sequence Track which starts around 4000 bases downstream of the gene and extends through the sequence to past 5000 bases upstream of the gene. 

At the same time all the NM_ transcripts associated with that gene are automatically placed into the User-Created Annotation track. Finally I need to number all the bases in the transcripts according to HGVS nomenclature. That is for later though. Most of this needs to be automated to speed up usage from potential users as they will likely not be tech-savvy. 

What are the paths of files where these kinds of operations are covered or methods which perform these kinds of tasks which I can reuse? 

I really appreciate all the time you have given. Your help on the issue I opened was used as the basis for us troubleshooting our instance and recreating the apollo.conf file to suit our needs. 

Many thanks,

Greg


<Current.png><Potential.png>





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|

Re: Editing Apollo

Wozzerv

Hi Nathan,


I have been spending some time writing a couple methods to return features. I must apologize though for all these emails for advice and help. As a student I have not had much experience with working with large programs. This being my first one. I really appreciate your correspondence and patience. 


Essentially I saw a method in the API in track features featuresByName. Which seems like another way to access the information of the feature. So I wrote a couple methods based on your getSequence and getSequenceForSelectedFeatures methods in AnnotTrack.js


It's at the point where it fails as it cant locate AnnotationEditorService. I tried it with var operation being = features_by_name also


Could I achieve something from this route? If so what am I missing?


I'm doing things one step at a time and being able to return the feature is the first one. It seemed most logical to me to do it within JavaScript rather than Groovy as I have a bit more experience with JavaScript. 


Many thanks,


Greg


From: Nathan Dunn <[hidden email]>
Sent: 07 November 2017 00:28:55
To: Warren, Gregory S.
Cc: [hidden email]
Subject: Re: Editing Apollo
 

Okay, 

I think we have a few possible solutions for you.  I think, that in every case, doing the right-click on the feature to show the temporary sequence track (which I now understand) makes the most sense and it looks like you are well on your way to implementing that.   Also, in all cases, the Apollo client has access to the current JBrowse Browser object so you can call “addTrack” with whatever config makes sense, so temporarily adding a track should work.  You can look in the JBrowse code to see how different features, like the trackList or File Menu add tracks.

In terms of populating temporary track, you have a few of options:

1 - create a completely separate popup / overview using the existing track services (http://demo.genomearchitect.org/Apollo-staging/WebServices/)  (plus a quick method we could add to get specific sequences as well).  

We use this within the AGR to paint overviews, but with D3 you can do pretty much anything with these services: http://www.alliancegenome.org/gene/ZFIN:ZDB-GENE-990415-200   using this code here: https://github.com/alliance-genome/agr_ui/blob/develop/src/components/genomeFeature/GenomeFeature.js   
github.com
Contribute to agr_ui development by creating an account on GitHub.


2 - A custom REST-track with a custom view.    You can write a custom REST server either within Apollo to deliver the features directly (we are using Grails 2.5).   You could add a separate controller method or add your own.

gmod.org
This page provides a comprehensive reference guide for configuring JBrowse. If you find something that is missing or inaccurate, please feel very free to edit it!


github.com
Apollo - Genome annotation editor with a Java Server backend and a Javascript client that runs in a web browser as a JBrowse plugin.



Again, we should add a method for returning sequences for a given range. 

You may need to create a custom JBrowse track for this to get exactly what you want.  Extending Canvas or SVG (experimental) is probably you’re best bet.   There are more than a few examples of this in here.   You could add it directly to JBrowse / Apollo or as a plugin (https://gmod.github.io/jbrowse-registry/).
gmod.github.io
This project is licensed under the BSD-2-Clause license, and is avilable on GitHub. Portions of this project was supported ...


3 - You could create a custom inline track (again probably the Canvas Track) that can combine track info from the AnnotTrack and the SequenceTrack.   I would just add this as another Apollo track, which should have visibility to both the Sequence and Annotation tracks and shouldn’t have to hit the server an additional time, though you’ll have to wait for AnnotTrack to populate properly.

Either way, I think that all of these are very do-able depending on what makes the most sense to you.

Nathan

On Nov 6, 2017, at 8:08 AM, Warren, Gregory S. <[hidden email]> wrote:

Hi Nathan, 

So in Current.png we have the standard Apollo Window with the reference sequence window visible and there is a transcript in the User-Created Annotation Track. 

The ultimate goal of my project is to have a third integral track called numbering, or something along this line (Perhaps maybe instead of another track it is included within the User-Created Annotation Track?), where the bases are numbered according to the HGVS system directly underneath in alignment to the two tracks above. The standard layout is that numbering begins at the A in the first exon ATG. This number then increments until you reach an intron. At this point the numbering changes as is seen in Potential.png where it takes the last number of the exon and increments upwards to the midpoint of the intron. If there are an odd number of bases in an intron as shown in Potential.png the extra base is added to the first half of the numbering. 

From there it is the next exon base number incrementing downwards until you reach the next exon.This repeats until the full transcript is numbered. I wrote a basic Javascript Method as proof of concept in Potential.png. However the input is hard coded there.

The ideal solution probably has a new track which is populated at the same time as when an Annotation is created from a feature. 

Does this make sense?

Also I tried subscribing as you suggested and here was the response:
Command has failed:

> subscribe now
  List 'now' does not exist.

Greg 

From: Nathan Dunn <[hidden email]>
Sent: 06 November 2017 15:38:55
To: Warren, Gregory S.
Subject: Fwd: Editing Apollo
 

Sorry, forgot to send it to the author!

Documentation for the Apollo web-based manual biocuration tool.


you can subscribe to the mailing list here by sending an email to:   [hidden email]  with the subject “subscribe now”

This is a really good question that would benefit others.  

I’ll look at your follow-up email as well.

Nathan

Begin forwarded message:

From: Nathan Dunn <[hidden email]>
Subject: Re: Editing Apollo
Date: November 3, 2017 at 8:58:28 AM PDT
To: Apollo List <[hidden email]>


Greg,

Glad the initial changes worked out.  

Could you send us screen shots of what / where you plan to change? 

I “think” what you want is “main.js”, for example here:   https://github.com/GMOD/Apollo/blob/master/client/apollo/js/main.js#L376

Just run “ant watchman" to copy the files over there for testing automatically, or  "gradle copy-resources-dev” to force them.  

JBrowse has very “sticky” cache, so you’ll need to make sure you disable cache while testing. 

Let us know if you need anything further.

I’m copying this to the Apollo list as I think this might be useful to a wider audience.  

Nathan


On Nov 3, 2017, at 7:07 AM, Warren, Gregory S. <[hidden email]> wrote:

Hi Nathan,

Now that Apollo is working properly my next task is to add the features I told you about. However I am finding it difficult to figure out the structure. I was hoping I could tell you what I'm trying to do and you can point me to which files I should edit. 

Essentially I need to add a new search bar to the top menu. A user should be able to write a gene in this search bar, for example MB or COL1A1. Once this is done I want to create a new temporary Reference Sequence Track which starts around 4000 bases downstream of the gene and extends through the sequence to past 5000 bases upstream of the gene. 

At the same time all the NM_ transcripts associated with that gene are automatically placed into the User-Created Annotation track. Finally I need to number all the bases in the transcripts according to HGVS nomenclature. That is for later though. Most of this needs to be automated to speed up usage from potential users as they will likely not be tech-savvy. 

What are the paths of files where these kinds of operations are covered or methods which perform these kinds of tasks which I can reuse? 

I really appreciate all the time you have given. Your help on the issue I opened was used as the basis for us troubleshooting our instance and recreating the apollo.conf file to suit our needs. 

Many thanks,

Greg


<Current.png><Potential.png>





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.


Screenshot at 2017-11-08 17-00-26.png (288K) Download Attachment
AnnotTrack.js.txt (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Editing Apollo

nathandunn

I think that (the JS) approach makes a lot of sense.    If you have a fork of the Apollo code that you could point to, that would be easiest.

Nathan

On Nov 8, 2017, at 12:21 PM, Warren, Gregory S. <[hidden email]> wrote:

Hi Nathan,

I have been spending some time writing a couple methods to return features. I must apologize though for all these emails for advice and help. As a student I have not had much experience with working with large programs. This being my first one. I really appreciate your correspondence and patience. 

Essentially I saw a method in the API in track features featuresByName. Which seems like another way to access the information of the feature. So I wrote a couple methods based on your getSequence and getSequenceForSelectedFeatures methods in AnnotTrack.js

It's at the point where it fails as it cant locate AnnotationEditorService. I tried it with var operation being = features_by_name also

Could I achieve something from this route? If so what am I missing?

I'm doing things one step at a time and being able to return the feature is the first one. It seemed most logical to me to do it within JavaScript rather than Groovy as I have a bit more experience with JavaScript. 

Many thanks,

Greg

From: Nathan Dunn <[hidden email]>
Sent: 07 November 2017 00:28:55
To: Warren, Gregory S.
Cc: [hidden email]
Subject: Re: Editing Apollo
 

Okay, 

I think we have a few possible solutions for you.  I think, that in every case, doing the right-click on the feature to show the temporary sequence track (which I now understand) makes the most sense and it looks like you are well on your way to implementing that.   Also, in all cases, the Apollo client has access to the current JBrowse Browser object so you can call “addTrack” with whatever config makes sense, so temporarily adding a track should work.  You can look in the JBrowse code to see how different features, like the trackList or File Menu add tracks.

In terms of populating temporary track, you have a few of options:

1 - create a completely separate popup / overview using the existing track services (http://demo.genomearchitect.org/Apollo-staging/WebServices/)  (plus a quick method we could add to get specific sequences as well).  

We use this within the AGR to paint overviews, but with D3 you can do pretty much anything with these services: http://www.alliancegenome.org/gene/ZFIN:ZDB-GENE-990415-200   using this code here: https://github.com/alliance-genome/agr_ui/blob/develop/src/components/genomeFeature/GenomeFeature.js   
Contribute to agr_ui development by creating an account on GitHub.


2 - A custom REST-track with a custom view.    You can write a custom REST server either within Apollo to deliver the features directly (we are using Grails 2.5).   You could add a separate controller method or add your own.

This page provides a comprehensive reference guide for configuring JBrowse. If you find something that is missing or inaccurate, please feel very free to edit it!


Apollo - Genome annotation editor with a Java Server backend and a Javascript client that runs in a web browser as a JBrowse plugin.



Again, we should add a method for returning sequences for a given range. 

You may need to create a custom JBrowse track for this to get exactly what you want.  Extending Canvas or SVG (experimental) is probably you’re best bet.   There are more than a few examples of this in here.   You could add it directly to JBrowse / Apollo or as a plugin (https://gmod.github.io/jbrowse-registry/).
This project is licensed under the BSD-2-Clause license, and is avilable on GitHub. Portions of this project was supported ...


3 - You could create a custom inline track (again probably the Canvas Track) that can combine track info from the AnnotTrack and the SequenceTrack.   I would just add this as another Apollo track, which should have visibility to both the Sequence and Annotation tracks and shouldn’t have to hit the server an additional time, though you’ll have to wait for AnnotTrack to populate properly.

Either way, I think that all of these are very do-able depending on what makes the most sense to you.

Nathan

On Nov 6, 2017, at 8:08 AM, Warren, Gregory S. <[hidden email]> wrote:

Hi Nathan, 

So in Current.png we have the standard Apollo Window with the reference sequence window visible and there is a transcript in the User-Created Annotation Track. 

The ultimate goal of my project is to have a third integral track called numbering, or something along this line (Perhaps maybe instead of another track it is included within the User-Created Annotation Track?), where the bases are numbered according to the HGVS system directly underneath in alignment to the two tracks above. The standard layout is that numbering begins at the A in the first exon ATG. This number then increments until you reach an intron. At this point the numbering changes as is seen in Potential.png where it takes the last number of the exon and increments upwards to the midpoint of the intron. If there are an odd number of bases in an intron as shown in Potential.png the extra base is added to the first half of the numbering. 

From there it is the next exon base number incrementing downwards until you reach the next exon.This repeats until the full transcript is numbered. I wrote a basic Javascript Method as proof of concept in Potential.png. However the input is hard coded there.

The ideal solution probably has a new track which is populated at the same time as when an Annotation is created from a feature. 

Does this make sense?

Also I tried subscribing as you suggested and here was the response:
Command has failed:

> subscribe now
  List 'now' does not exist.

Greg 

From: Nathan Dunn <[hidden email]>
Sent: 06 November 2017 15:38:55
To: Warren, Gregory S.
Subject: Fwd: Editing Apollo
 

Sorry, forgot to send it to the author!

Documentation for the Apollo web-based manual biocuration tool.


you can subscribe to the mailing list here by sending an email to:   [hidden email]  with the subject “subscribe now”

This is a really good question that would benefit others.  

I’ll look at your follow-up email as well.

Nathan

Begin forwarded message:

From: Nathan Dunn <[hidden email]>
Subject: Re: Editing Apollo
Date: November 3, 2017 at 8:58:28 AM PDT
To: Apollo List <[hidden email]>


Greg,

Glad the initial changes worked out.  

Could you send us screen shots of what / where you plan to change? 

I “think” what you want is “main.js”, for example here:   https://github.com/GMOD/Apollo/blob/master/client/apollo/js/main.js#L376

Just run “ant watchman" to copy the files over there for testing automatically, or  "gradle copy-resources-dev” to force them.  

JBrowse has very “sticky” cache, so you’ll need to make sure you disable cache while testing. 

Let us know if you need anything further.

I’m copying this to the Apollo list as I think this might be useful to a wider audience.  

Nathan


On Nov 3, 2017, at 7:07 AM, Warren, Gregory S. <[hidden email]> wrote:

Hi Nathan,

Now that Apollo is working properly my next task is to add the features I told you about. However I am finding it difficult to figure out the structure. I was hoping I could tell you what I'm trying to do and you can point me to which files I should edit. 

Essentially I need to add a new search bar to the top menu. A user should be able to write a gene in this search bar, for example MB or COL1A1. Once this is done I want to create a new temporary Reference Sequence Track which starts around 4000 bases downstream of the gene and extends through the sequence to past 5000 bases upstream of the gene. 

At the same time all the NM_ transcripts associated with that gene are automatically placed into the User-Created Annotation track. Finally I need to number all the bases in the transcripts according to HGVS nomenclature. That is for later though. Most of this needs to be automated to speed up usage from potential users as they will likely not be tech-savvy. 

What are the paths of files where these kinds of operations are covered or methods which perform these kinds of tasks which I can reuse? 

I really appreciate all the time you have given. Your help on the issue I opened was used as the basis for us troubleshooting our instance and recreating the apollo.conf file to suit our needs. 

Many thanks,

Greg


<Current.png><Potential.png>

<Screenshot at 2017-11-08 17-00-26.png><AnnotTrack.js.txt>





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.