<commit_before><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib tagdir="/WEB-INF/tags" prefix="im"%>
<%@ taglib uri="http://flymine.org/imutil" prefix="imutil"%>
<%@ taglib uri="http://jakarta.apache.org/taglibs/string-1.1"
    prefix="str"%>


            
            
<style type="text/css">

.dbsources table.features {
  clear:left;
  font-size: small;
  border: none;
  background-color: green;
}

.dbsources table.features td {
  white-space:nowrap;
  padding: 3px; 
  border-left:1px solid;
  border-right: none;
  border-bottom: none;
  border-top:none;
  background-color: #DFA;
}

.dbsources table.features .firstrow {
  white-space:nowrap;
  padding: 3px; 
  border-top:none;
}

.dbsources table.features .firstcolumn {
  white-space: nowrap;
  padding: 3px;
  border-left: none;
}

div#experimentFeatures {
  color: black;
  margin: 20px;
  border: 1px;
  border-style: solid;
  border-color: green;
  background-color: #DFA;
  padding: 5px;
}

.submissionFeatures {
  color: black;
  margin-bottom: 20px;
  border: 1px;
  border-style: solid;
  border-color: green;
  background-color: #DFA;
  padding: 5px;
}

.submissions div {
  clear: both;
}

</style>


<tiles:importAttribute />


<html:xhtml />


<div class="body">

<c:forEach items="${experiments}" var="exp"  varStatus="status">

  <im:boxarea title="${exp.name}" stylename="gradientbox">

  <table cellpadding="0" cellspacing="0" border="0" class="dbsources">
  <tr><td>
    <c:forEach items="${exp.organisms}" var="organism" varStatus="orgStatus">
      <c:if test="${organism eq 'D. melanogaster'}"> 
        <img border="0" class="arrow" src="model/images/f_vvs.png" title="fly"/><br>
      </c:if>
      <c:if test="${organism eq 'C. elegans'}"> 
        <img border="0" class="arrow" src="model/images/w_vvs.png" title="worm"/><br>
      </c:if>
    </c:forEach> 
  </td>
  
  <td>experiment: <b><c:out value="${exp.name}"/></b></td>
  <td>project: <b><c:out value="${exp.projectName}"></c:out></b></td>
  <td>PI: <b><c:out value="${exp.pi}"></c:out></b></td>
  </tr>
  
  
  <tr>
  <td colspan="4"><c:out value="${exp.description}"></c:out></td>
  </tr>
  </table>


  <c:if test="${! empty exp.featureCounts || !empty tracks[exp.name]}">
  <div id="experimentFeatures">
  
  <br/>
     <table>
     <tr>
     <td style="width: 45%" align="top">
      <c:choose>
      <c:when test="${!empty exp.featureCounts}">
      
      ALL FEATURES GENERATED BY THIS EXPERIMENT:
      <table cellpadding="0" cellspacing="0" border="0" class="dbsources">
      <tr>
        <th>Feature type</th>
        <th>Count</th>
        <th>View data</th>
        <th colspan="4">Export</th>
      </tr>
      <c:forEach items="${exp.featureCounts}" var="fc" varStatus="status">
          <tr>
            <td>${fc.key}</td>
            <td>${fc.value}</td>                     
            <td align="center">
              <html:link
        href="/${WEB_PROPERTIES['webapp.path']}/features.do?type=experiment&action=results&experiment=${exp.name}&feature=${fc.key}">VIEW RESULTS</html:link>
            </td>
            <td align="center">
               <html:link
        href="/${WEB_PROPERTIES['webapp.path']}/features.do?type=experiment&action=export&experiment=${exp.name}&feature=${fc.key}&format=tab">TAB
        <script type="text/javascript" charset="utf-8">
                jQuery(document).ready(function(){
                    jQuery('#header_${status.count}').qtip({
                       content: 'export as tab delimited file',
                       show: 'mouseover',
                       hide: 'mouseout',
                       position: {
                           corner: {
                              target: 'topLeft',
                              tooltip: 'bottomLeft'
                           }
                       },
                       style: {
                          tip: 'bottomLeft',
                          fontSize: '12px',
                          name: 'cream',
                          whiteSpace: 'nowrap'
                       }
                    });
                });
</script></html:link>
            
            </td>
            <td align="center">
              <html:link
        href="/${WEB_PROPERTIES['webapp.path']}/features.do?type=experiment&action=export&experiment=${exp.name}&feature=${fc.key}&format=csv">CSV</html:link>
           
            </td>
            <td align="center">
             <html:link
        href="/${WEB_PROPERTIES['webapp.path']}/features.do?type=experiment&action=export&experiment=${exp.name}&feature=${fc.key}&format=gff3">GFF3</html:link>
           
            </td>
          </tr>
      </c:forEach>
      <!-- end submission loop -->
    </table>
    </c:when>
    <c:otherwise>
     NO FEATURES GENERATED FOR THIS SUBMISSION
    </c:otherwise>
    </c:choose>
   </td>
   <td style="width: 40%; align: top;">
     <c:choose>
     <c:when test="${!empty tracks[exp.name]}">
       <c:choose>
         <c:when test="${fn:length(tracks[exp.name]) == 1}">
           <c:out value="${fn:length(tracks[exp.name])}"/> GBrowse track
         </c:when>
         <c:otherwise>
           <c:out value="${fn:length(tracks[exp.name])}"/> GBrowse tracks
         </c:otherwise>
       </c:choose>
     
     <br/>
     TRACK LINKS...  
     </c:when>
     <c:otherwise>
        NO GBROWSE TRACKS FOR THIS SUBMISSION
     </c:otherwise>
     </c:choose>
   </td>
   </tr>
</table>
    </div>
    </c:if>

<div class="submissions">
  <em>
  <c:choose>
    <c:when test="${exp.submissionCount == 0}">
      There are no submissions for this experiment:
    </c:when>
    <c:when test="${exp.submissionCount == 1}">
      There is <c:out value="${exp.submissionCount}"></c:out> <b><c:out value="${exp.experimentType}"></c:out></b> submission for this experiment:
    </c:when>
    <c:otherwise>
      There are <c:out value="${exp.submissionCount}"></c:out> <b><c:out value="${exp.experimentType}"></c:out></b> submissions for this experiment:   
    </c:otherwise>
    
  </c:choose>
  </em><commit_msg>modmine webapp: added gbrowse tracks links to experiment page <commit_after><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib tagdir="/WEB-INF/tags" prefix="im"%>
<%@ taglib uri="http://flymine.org/imutil" prefix="imutil"%>
<%@ taglib uri="http://jakarta.apache.org/taglibs/string-1.1"
    prefix="str"%>


            
            
<style type="text/css">

.dbsources table.features {
  clear:left;
  font-size: small;
  border: none;
  background-color: green;
}

.dbsources table.features td {
  white-space:nowrap;
  padding: 3px; 
  border-left:1px solid;
  border-right: none;
  border-bottom: none;
  border-top:none;
  background-color: #DFA;
}

.dbsources table.features .firstrow {
  white-space:nowrap;
  padding: 3px; 
  border-top:none;
}

.dbsources table.features .firstcolumn {
  white-space: nowrap;
  padding: 3px;
  border-left: none;
}

div#experimentFeatures {
  color: black;
  margin: 20px;
  border: 1px;
  border-style: solid;
  border-color: green;
  background-color: #DFA;
  padding: 5px;
}

.submissionFeatures {
  color: black;
  margin-bottom: 20px;
  border: 1px;
  border-style: solid;
  border-color: green;
  background-color: #DFA;
  padding: 5px;
}

.submissions div {
  clear: both;
}

</style>


<tiles:importAttribute />


<html:xhtml />


<div class="body">

<c:forEach items="${experiments}" var="exp"  varStatus="status">

  <im:boxarea title="${exp.name}" stylename="gradientbox">

  <table cellpadding="0" cellspacing="0" border="0" class="dbsources">
  <tr><td>
    <c:forEach items="${exp.organisms}" var="organism" varStatus="orgStatus">
      <c:if test="${organism eq 'D. melanogaster'}"> 
        <img border="0" class="arrow" src="model/images/f_vvs.png" title="fly"/><br>
      </c:if>
      <c:if test="${organism eq 'C. elegans'}"> 
        <img border="0" class="arrow" src="model/images/w_vvs.png" title="worm"/><br>
      </c:if>
    </c:forEach> 
  </td>
  
  <td>experiment: <b><c:out value="${exp.name}"/></b></td>
  <td>project: <b><c:out value="${exp.projectName}"></c:out></b></td>
  <td>PI: <b><c:out value="${exp.pi}"></c:out></b></td>
  </tr>
  
  
  <tr>
  <td colspan="4"><c:out value="${exp.description}"></c:out></td>
  </tr>
  </table>


  <c:if test="${! empty exp.featureCounts || !empty tracks[exp.name]}">
  <div id="experimentFeatures">
  
  <br/>
     <table>
     <tr>
     <td style="width: 45%" align="top">
      <c:choose>
      <c:when test="${!empty exp.featureCounts}">
      
      ALL FEATURES GENERATED BY THIS EXPERIMENT:
      <table cellpadding="0" cellspacing="0" border="0" class="dbsources">
      <tr>
        <th>Feature type</th>
        <th>Count</th>
        <th>View data</th>
        <th colspan="4">Export</th>
      </tr>
      <c:forEach items="${exp.featureCounts}" var="fc" varStatus="status">
          <tr>
            <td>${fc.key}</td>
            <td>${fc.value}</td>                     
            <td align="center">
              <html:link
        href="/${WEB_PROPERTIES['webapp.path']}/features.do?type=experiment&action=results&experiment=${exp.name}&feature=${fc.key}">VIEW RESULTS</html:link>
            </td>
            <td align="center">
               <html:link
        href="/${WEB_PROPERTIES['webapp.path']}/features.do?type=experiment&action=export&experiment=${exp.name}&feature=${fc.key}&format=tab">TAB
        <script type="text/javascript" charset="utf-8">
                jQuery(document).ready(function(){
                    jQuery('#header_${status.count}').qtip({
                       content: 'export as tab delimited file',
                       show: 'mouseover',
                       hide: 'mouseout',
                       position: {
                           corner: {
                              target: 'topLeft',
                              tooltip: 'bottomLeft'
                           }
                       },
                       style: {
                          tip: 'bottomLeft',
                          fontSize: '12px',
                          name: 'cream',
                          whiteSpace: 'nowrap'
                       }
                    });
                });
</script></html:link>
            
            </td>
            <td align="center">
              <html:link
        href="/${WEB_PROPERTIES['webapp.path']}/features.do?type=experiment&action=export&experiment=${exp.name}&feature=${fc.key}&format=csv">CSV</html:link>
           
            </td>
            <td align="center">
             <html:link
        href="/${WEB_PROPERTIES['webapp.path']}/features.do?type=experiment&action=export&experiment=${exp.name}&feature=${fc.key}&format=gff3">GFF3</html:link>
           
            </td>
          </tr>
      </c:forEach>
      <!-- end submission loop -->
    </table>
    </c:when>
    <c:otherwise>
     NO FEATURES GENERATED FOR THIS SUBMISSION
    </c:otherwise>
    </c:choose>
   </td>
   <td style="width: 40%; align: top;">
     <c:choose>
     <c:when test="${!empty tracks[exp.name]}">
       <c:choose>
         <c:when test="${fn:length(tracks[exp.name]) == 1}">
           <c:out value="${fn:length(tracks[exp.name])}"/> GBrowse track:
         </c:when>
         <c:otherwise>
           <c:out value="${fn:length(tracks[exp.name])}"/> GBrowse tracks:
         </c:otherwise>
       </c:choose>
     
     <br/>
     <c:forEach items="${tracks[exp.name]}" var="etrack"  varStatus="status">
<html:link
     href="http://modencode.oicr.on.ca/cgi-bin/gb2/gbrowse/${etrack.organism}/?label=${etrack.track}" target="_blank">${etrack.track}
</html:link>
        <c:if test="${fn:length(tracks[exp.name]) > 1}"> | </c:if>
    </c:forEach>
    
     </c:when>
     <c:otherwise>
        NO GBROWSE TRACKS FOR THIS SUBMISSION
     </c:otherwise>
     </c:choose>
   </td>
   </tr>
</table>
    </div>
    </c:if>

<div class="submissions">
  <em>
  <c:choose>
    <c:when test="${exp.submissionCount == 0}">
      There are no submissions for this experiment:
    </c:when>
    <c:when test="${exp.submissionCount == 1}">
      There is <c:out value="${exp.submissionCount}"></c:out> <b><c:out value="${exp.experimentType}"></c:out></b> submission for this experiment:
    </c:when>
    <c:otherwise>
      There are <c:out value="${exp.submissionCount}"></c:out> <b><c:out value="${exp.experimentType}"></c:out></b> submissions for this experiment:   
    </c:otherwise>
    
  </c:choose>
  </em>
{'fraction_non_alphanumeric': 0.1922133660331085, 'fraction_numerical': 0.005671367259350092, 'mean_word_length': 2.3596807415036047, 'pattern_counts': {'":': 0, '<': 309, '<?xml version=': 0, '>': 310, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4934657', 'n_tokens_mistral': 4621, 'n_tokens_neox': 4435, 'n_words': 747}