Commit 2a998449 authored by Remi  PLANEL's avatar Remi PLANEL

Add blast button

parent 35710974
......@@ -139,3 +139,5 @@ genomicRegionSearch.exportChromosomeSegment = true
# </form-bean>
genomicRegionSearch.enableStrandSpecificSearch = true
# sequenceserver
sequenceserver.url = https://sequenceserver-legiolist.pasteur.cloud/
\ No newline at end of file
......@@ -74,12 +74,12 @@
<class className="org.intermine.model.bio.SequenceFeature">
<fields>
<fieldconfig fieldExpr="primaryIdentifier"/>
<fieldconfig fieldExpr="length" displayer="/model/sequenceShortDisplayerWithField.jsp" />
<fieldconfig fieldExpr="length" displayer="/model/sequenceShortDisplayerWithField.jsp" showInInlineCollection="true" showInSummary="true" />
<fieldconfig fieldExpr="chromosomeLocation" displayer="/model/chromosomeLocDisplayer.jsp" showInResults="false" />
<fieldconfig fieldExpr="chromosome.primaryIdentifier" showInInlineCollection="false" showInSummary="false" />
<fieldconfig fieldExpr="chromosomeLocation.start" showInInlineCollection="false" showInSummary="false" />
<fieldconfig fieldExpr="chromosomeLocation.end" showInInlineCollection="false" showInSummary="false" />
<fieldconfig fieldExpr="organism.name"/>
<fieldconfig fieldExpr="organism.name" label="Organism"/>
</fields>
</class>
......
<%@ page import="org.biojava.nbio.core.sequence.io.FastaWriterHelper" %>
<%@ page import="org.ncgr.intermine.web.logic.SequenceBlastUtil" %>
<%
// Display the BLAST button to send the sequence to the SequenceServer
Integer objectId = Integer.parseInt(request.getParameter("id"));
SequenceBlastUtil sequenceBlastUtil = new SequenceBlastUtil(request, objectId);
if (sequenceBlastUtil.getBioSequence()!=null) {
String fasta = ">"+sequenceBlastUtil.getIdentifier()+"\n"+sequenceBlastUtil.getBioSequence().toString();
%>
<form action="${WEB_PROPERTIES['sequenceserver.url']}" method="post" style="display:inline;border:0;margin:0;padding:0;" target="_blank">
<input type="hidden" name="input_sequence" value="<%=fasta%>" />
<button type="submit" style="border:0;margin:0;padding:0;"><img class="fasta" src="model/images/blast.png" title="BLAST"/></button>
</form>
<%
}
%>
\ No newline at end of file
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="im" %>
<!-- sequenceShortDisplayerWithField.jsp -->
<tiles:importAttribute name="expr" ignore="false"/>
<im:eval evalExpression="interMineObject.${expr}" evalVariable="outVal"/>
<c:choose>
<c:when test="${empty outVal}">
&nbsp;
</c:when>
<c:otherwise>
<c:choose>
<c:when test="${!empty interMineObject.sequence}">
<im:value>${outVal}</im:value>&nbsp;
<html:link action="sequenceExporter?object=${interMineObject.id}" target="_blank"><html:img styleClass="fasta" src="model/images/fasta.gif" title="FASTA"/></html:link>
<c:if test="${!empty WEB_PROPERTIES['sequenceserver.url']}">
<jsp:include page="sequenceServerBlastButton.jsp"/>
</c:if>
</c:when>
<c:otherwise>
<im:value>${outVal}</im:value>
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
<!-- /sequenceShortDisplayerWithField.jsp -->
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment