<commit_before><%= javascript_include_tag "resource" -%>
<% truncate_length_for_boxes = 22 -%>
<% bio_samples = @display_data_file.bio_samples_population false
   sample_names = bio_samples.instance_values["sample_names"]
%>
<ul class="sectionIcons">
<%= asset_buttons @data_file,@display_data_file.version -%>
</ul>

<%= render :partial=>"assets/upload_new_version_form", :locals=>{:resource=>@data_file} -%>

<%= render :partial => "layouts/item_title",:locals=>{:item=>@data_file} %>

<%= render :partial => "layouts/usage_info", :locals => { :resource => @data_file } -%>


<div class="show_basic">
  <div class="main_content_left_box_narrower">
    <%= render :partial=>"assets/resource_version_details", :locals=>{:displayed_resource=>@display_data_file, :resource=>@data_file} -%>
    <div class="box_about_actor">
      <%= render :partial => 'projects/show_project_relationship', :locals => {:resource => @data_file}  %>
      <p>
        <label>File name:</label>
        <%=h @display_data_file.original_filename -%>
      </p>

      <p>
        <label>Format:</label>
        <%=h mime_nice_name(@display_data_file.content_type) -%>
      </p>
      <br/>

      <p>
        <b>Description:</b>
        <% unless @display_data_file.description.blank? -%>
          <div class="box_standout" id="description">
            <%= simple_format(auto_link(white_list(@display_data_file.description),:all,:rel=>'nofollow')) -%>
          </div>
        <% else -%>
          <p class="none_text">
            No description.
          </p>
        <% end -%>
      </p>

    </div>
  </div>
  <%= render :partial=>"assets/resource_main_content_right",:locals => { :resource => @data_file } %>
  
  <div style="clear:both;">
    <p>
        <%= embedded_isa_svg(@data_file, true, @data_file) -%>
      </p>
    <p>
      <h2>Factors studied:</h2>
      <%= render :partial=>"data_files/studied_factors" %>
    </p>

    <div class="fold">

      <div class="foldTitle">
        Treatments
      </div>

      <div class="foldContent" style="display:none;" >
        <% if @data_file.can_download? -%>
                <% treatments = @display_data_file.treatments -%>
                <% if treatments.values.keys.empty? -%>
                    <span class="none_text">No treatments were found in the data file, or it does not match a known template.</span>
                <% else -%>
                    <%= render :partial => "treatment_table", :locals => {:treatments => treatments} -%>
                <% end -%>
        <% else -%>
            <span id="treatments" class="none_text">You do not have permission to view the treatments for this file.</span>
        <% end -%>
      </div>
    </div>

    <div class="fold">
          <div class="foldTitle">
            Populated Treatments with Parser
          </div>

          <div class="foldContent" style="display:none;" >
            <% if @data_file.can_download? -%>
                    <% treatments = bio_samples.instance_values["treatments"]
                       if treatments.empty? %>
                        <span class="none_text">No treatments were found in the data file, or it does not match a known template.</span>
                    <% else %>
                        <%= render :partial => "extractions_table", :locals => {:extractions => treatments, :sample_names => sample_names} %>
                    <% end %>
            <% else -%>
                <span id="treatments" class="none_text">You do not have permission to view the treatments for this file.</span>
            <% end -%>
          </div>
    </div>



    <div class="fold">
      <div class="foldTitle">
        RNA Extractions
      </div>
      <div class="foldContent" style="display:none;" >
        <% if @data_file.can_download? -%>
            <% rna_extractions = bio_samples.instance_values["rna_extractions"]-%>
           <% if rna_extractions.empty? %>
                <span class="none_text">No RNA extractions were found in the data file, or it does not match a known template.</span>
           <% else %>
            <%= render :partial => "extractions_table",:locals => {:extractions=> rna_extractions,:sample_names => sample_names} %>
           <% end %>
        <% else -%>
            <span id="rna_extractions" class="none_text">You do not have permission to view the RNA extractions for this file.</span>
        <% end -%>
      </div>
    </div>

    <div class="fold">
          <div class="foldTitle">
            Sequencing
          </div>
          <div class="foldContent" style="display:none;" >
            <% if @data_file.can_download? -%>
               <% sequencing = bio_samples.instance_values["sequencing"]-%>
               <% if sequencing.empty? %>
                    <span class="none_text">No sequencing were found in the data file, or it does not match a known template.</span>
               <% else %>
                <%= render :partial => "extractions_table",:locals => {:extractions=> sequencing,:sample_names => sample_names} %>
               <% end %>
            <% else -%>
                <span id="sequencing" class="none_text">You do not have permission to view the sequencing for this file.</span>
            <% end -%>
          </div>
    </div>

  </div>

  <%= render :partial=>"layouts/items_related_to",:object => @data_file %>

</div><commit_msg>hide empty tabs on data file page<commit_after><%= javascript_include_tag "resource" -%>
<% truncate_length_for_boxes = 22 -%>
<% bio_samples = @display_data_file.bio_samples_population false
   sample_names = bio_samples.instance_values["sample_names"]
%>
<ul class="sectionIcons">
<%= asset_buttons @data_file,@display_data_file.version -%>
</ul>

<%= render :partial=>"assets/upload_new_version_form", :locals=>{:resource=>@data_file} -%>

<%= render :partial => "layouts/item_title",:locals=>{:item=>@data_file} %>

<%= render :partial => "layouts/usage_info", :locals => { :resource => @data_file } -%>


<div class="show_basic">
  <div class="main_content_left_box_narrower">
    <%= render :partial=>"assets/resource_version_details", :locals=>{:displayed_resource=>@display_data_file, :resource=>@data_file} -%>
    <div class="box_about_actor">
      <%= render :partial => 'projects/show_project_relationship', :locals => {:resource => @data_file}  %>
      <p>
        <label>File name:</label>
        <%=h @display_data_file.original_filename -%>
      </p>

      <p>
        <label>Format:</label>
        <%=h mime_nice_name(@display_data_file.content_type) -%>
      </p>
      <br/>

      <p>
        <b>Description:</b>
        <% unless @display_data_file.description.blank? -%>
          <div class="box_standout" id="description">
            <%= simple_format(auto_link(white_list(@display_data_file.description),:all,:rel=>'nofollow')) -%>
          </div>
        <% else -%>
          <p class="none_text">
            No description.
          </p>
        <% end -%>
      </p>

    </div>
  </div>
  <%= render :partial=>"assets/resource_main_content_right",:locals => { :resource => @data_file } %>
  
  <div style="clear:both;">
    <p>
        <%= embedded_isa_svg(@data_file, true, @data_file) -%>
      </p>
    <p>
      <h2>Factors studied:</h2>
      <%= render :partial=>"data_files/studied_factors" %>
    </p>

    <div class="fold">

      <div class="foldTitle">
        Treatments
      </div>

      <div class="foldContent" style="display:none;" >
        <% if @data_file.can_download? -%>
                <% if Seek::Config.is_virtualliver
                     treatments = bio_samples.instance_values["treatments"]
                     is_empty = treatments.empty?
                     treatment_table = render :partial => "extractions_table", :locals => {:extractions => treatments, :sample_names => sample_names} unless is_empty
                   else
                     treatments = @display_data_file.treatments
                     is_empty = treatments.values.keys.empty?
                     treatment_table = render :partial => "treatment_table", :locals => {:treatments => treatments} unless is_empty
                   end
                 -%>
                <% if is_empty -%>
                    <span class="none_text">No treatments were found in the data file, or it does not match a known template.</span>
                <% else -%>
                    <%= treatment_table -%>
                <% end -%>
        <% else -%>
            <span id="treatments" class="none_text">You do not have permission to view the treatments for this file.</span>
        <% end -%>
      </div>
    </div>

    <% rna_extractions = bio_samples.instance_values["rna_extractions"] -%>
    <% unless rna_extractions.empty? %>
        <div class="fold">
          <div class="foldTitle">
            RNA Extractions
          </div>
          <div class="foldContent" style="display:none;">
            <% if @data_file.can_download? -%>
                <%= render :partial => "extractions_table", :locals => {:extractions => rna_extractions, :sample_names => sample_names} %>
            <% else -%>
                <span id="rna_extractions" class="none_text">You do not have permission to view the RNA extractions for this file.</span>
            <% end -%>
          </div>
        </div>
    <% end %>
    <% sequencing = bio_samples.instance_values["sequencing"] -%>
    <% unless sequencing.empty? %>
        <div class="fold">
          <div class="foldTitle">
            Sequencing
          </div>
          <div class="foldContent" style="display:none;">
            <% if @data_file.can_download? -%>

                <%= render :partial => "extractions_table", :locals => {:extractions => sequencing, :sample_names => sample_names} %>

            <% else -%>
                <span id="sequencing" class="none_text">You do not have permission to view the sequencing for this file.</span>
            <% end -%>
          </div>
        </div>
    <% end %>
  </div>

  <%= render :partial=>"layouts/items_related_to",:object => @data_file %>

</div>
{'fraction_non_alphanumeric': 0.15757635858786195, 'fraction_numerical': 0.0007933359777865926, 'mean_word_length': 2.3349867724867726, 'pattern_counts': {'":': 0, '<': 226, '<?xml version=': 0, '>': 302, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7038833', 'n_tokens_mistral': 3233, 'n_tokens_neox': 2998, 'n_words': 606}