JSP button to send a sequence over to SequenceServer for BLASTing

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

JSP button to send a sequence over to SequenceServer for BLASTing

Sam Hokin-3
Hi, devs. I've implemented a very simple BLAST button on my SequenceFeature and Protein report pages that sends the sequence over to
a SequenceServer, pre-filling the textarea that holds the FASTA. This required a very minor bug fix in SequenceServer that has been
merged into the master branch (and will appear in the next release). Because it's not yet in a release, you have to run
SequenceServer in dev mode for now to pick up the local code. But I expect a new release will be rolled out in the
not-too-distant-future.

https://github.com/LegumeFederation/legfed-webapp-model/blob/master/sequenceServerBlastButton.jsp

It requires an image, here called model/images/blast.png for the button itself. There is a web.properties property to provide the
SequenceServer URI. You also have to modify the sequence displayers to include the button where you want it, IF the web.properties
is present:

https://github.com/LegumeFederation/legfed-webapp-model/blob/master/sequenceShortDisplayerWithField.jsp

                 <c:if test="${!empty WEB_PROPERTIES['sequenceserver.url']}">
                     <jsp:include page="sequenceServerBlastButton.jsp"/>
                 </c:if>

That's it, just use the sequence displayer in your webconfig.xml:

   <class className="org.intermine.model.bio.SequenceFeature">
     <fields>
       <fieldconfig fieldExpr="primaryIdentifier" label="LIS identifier"/>
       <fieldconfig fieldExpr="secondaryIdentifier" label="ALT identifier"/>
       <fieldconfig fieldExpr="name" label="Name"/>
       <fieldconfig fieldExpr="organism.name" label="Organism" />
       <fieldconfig fieldExpr="strain.identifier" label="Strain" />
       <fieldconfig fieldExpr="assemblyVersion" label="Assembly" />
       <fieldconfig fieldExpr="annotationVersion" label="Annotation" />
       <fieldconfig fieldExpr="length" displayer="/model/sequenceShortDisplayerWithField.jsp" showInInlineCollection="true"
showInSummary="true" />
     </fields>
   </class>

Note that this is very different from the PlanMine implementation, which is a form that allows you to enter a sequence, choose a
BLAST database, and submit it to SequenceServer for direct BLASTing. It's essentially a copy of the SequenceServer default page. I
don't want to keep track of the BLAST databases on my mine, and it's too much work to write a JS routine to pull the list from
SequenceServer and build the form; I'd rather send just the sequence over to SequenceServer, where you can then choose the
database(s) to BLAST against. You just press a button.

So, I just thought I'd post this up so folks know it exists. Feel free to try it out, say, on this page:

https://mines.legumeinfo.org/beanmine/gene:phavu.G19833.gnm1.ann1.Phvul.002G040500

Be patient, it takes a while for all the SequenceServer page to fully load. :)

_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev

Screenshot_2020-11-11 BeanMine Gene Phvul 002G040500 P vulgaris G19833.png (332K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: JSP button to send a sequence over to SequenceServer for BLASTing

sergio contrino-2
great sam, thanks for sharing!
sergio

On 2020-11-11 15:11, Sam Hokin wrote:

> Hi, devs. I've implemented a very simple BLAST button on my
> SequenceFeature and Protein report pages that sends the sequence over
> to a SequenceServer, pre-filling the textarea that holds the FASTA.
> This required a very minor bug fix in SequenceServer that has been
> merged into the master branch (and will appear in the next release).
> Because it's not yet in a release, you have to run SequenceServer in
> dev mode for now to pick up the local code. But I expect a new release
> will be rolled out in the not-too-distant-future.
>
> https://github.com/LegumeFederation/legfed-webapp-model/blob/master/sequenceServerBlastButton.jsp
>
> It requires an image, here called model/images/blast.png for the
> button itself. There is a web.properties property to provide the
> SequenceServer URI. You also have to modify the sequence displayers to
> include the button where you want it, IF the web.properties is
> present:
>
> https://github.com/LegumeFederation/legfed-webapp-model/blob/master/sequenceShortDisplayerWithField.jsp
>
>                 <c:if test="${!empty
> WEB_PROPERTIES['sequenceserver.url']}">
>                     <jsp:include page="sequenceServerBlastButton.jsp"/>
>                 </c:if>
>
> That's it, just use the sequence displayer in your webconfig.xml:
>
>   <class className="org.intermine.model.bio.SequenceFeature">
>     <fields>
>       <fieldconfig fieldExpr="primaryIdentifier" label="LIS
> identifier"/>
>       <fieldconfig fieldExpr="secondaryIdentifier" label="ALT
> identifier"/>
>       <fieldconfig fieldExpr="name" label="Name"/>
>       <fieldconfig fieldExpr="organism.name" label="Organism" />
>       <fieldconfig fieldExpr="strain.identifier" label="Strain" />
>       <fieldconfig fieldExpr="assemblyVersion" label="Assembly" />
>       <fieldconfig fieldExpr="annotationVersion" label="Annotation" />
>       <fieldconfig fieldExpr="length"
> displayer="/model/sequenceShortDisplayerWithField.jsp"
> showInInlineCollection="true" showInSummary="true" />
>     </fields>
>   </class>
>
> Note that this is very different from the PlanMine implementation,
> which is a form that allows you to enter a sequence, choose a BLAST
> database, and submit it to SequenceServer for direct BLASTing. It's
> essentially a copy of the SequenceServer default page. I don't want to
> keep track of the BLAST databases on my mine, and it's too much work
> to write a JS routine to pull the list from SequenceServer and build
> the form; I'd rather send just the sequence over to SequenceServer,
> where you can then choose the database(s) to BLAST against. You just
> press a button.
>
> So, I just thought I'd post this up so folks know it exists. Feel free
> to try it out, say, on this page:
>
> https://mines.legumeinfo.org/beanmine/gene:phavu.G19833.gnm1.ann1.Phvul.002G040500
>
> Be patient, it takes a while for all the SequenceServer page to fully
> load. :)
>
> _______________________________________________
> dev mailing list
> [hidden email]
> https://lists.intermine.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev