<commit_before>%ol.breadcrumb
  %li
    %a{ href: '/' } Home
  %li
    %a{ href: '/genomes' } Genomes
  %li.active
    #{@genome.organism}

%div.row
  %div.col-xs-2
    = image_tag @genome.avatar.url, class: 'img-circle img-avatar'
  %div.col-sm-10
    %h2 #{@genome.organism}
    %ul
      %li
        %a{ href: "/genome_relationships?genome_id=#{@genome.id}" } View Graph
      %li
        NCBI Assembly:
        %a{ href: "http://www.ncbi.nlm.nih.gov/assembly/#{@genome.assembly_id}"}
          #{@genome.assembly_id}
      - unless @genome[:ncbi_metadata].nil?
        %li Submitted by: #{@genome['ncbi_metadata']['submitterorganization'] rescue 'Unknown'}
      - unless @genome[:stats].nil?
        %li #{@genome[:stats]['total_scaffolds']} Scaffolds (#{'%.2f' % (@genome[:stats]['genome_size'].to_f/1e6)} Mb)
        %li
          #{number_with_delimiter @genome[:stats]['total_features']} Features /
          #{number_with_delimiter @genome[:stats]['total_proteins']} Proteins
          (#{number_with_delimiter @genome[:stats]['shared_proteins']} Shared)
      %li Last Updated: #{time_ago_in_words(@genome.updated_at)} ago
      %li Created: #{time_ago_in_words(@genome.created_at)} ago

%hr

%div.row
  %div.col-md-12
    %h3 Similar Organisms
  %div.col-md-12
    %table.table.table-bordered.table-striped.table-condensed
      %thead
        %tr
          %th #
          %th Organism
          %th Genes Shared
      %tbody
        - @genome_relationships.each do |genome_relationship|
          %tr
            %td= genome_relationship.id
            %td
              = link_to genome_relationship.related_genome.organism, genome_path(genome_relationship.related_genome)
              - if genome_relationship.autophilic?
                %span.label.label-info self
            - n_shared = genome_relationship.related_features_count
            %td #{'%0.2f' % (100 *n_shared / @genome[:stats]['total_proteins'].to_f)} %

  %div.col-md-12
    = will_paginate @genome_relationships, param_name: 'genomes_page'

%div.row
  %div.col-md-12
    %h3 Protein Coding Genes
    %table.table.table-bordered.table-striped.table-condensed
      %thead
        %tr
          %th
            Start - Stop
          %th
            Gene Product
          %th Related Features
      %tbody
        - @features.each do |feature|
          %tr
            %td
              %code
                #{feature[:start]} - #{feature[:stop]}
            %td
              = link_to feature.product, genome_feature_path(@genome, feature)
              - if feature.weird?
                %span.label.label-warning weird
            %td
              = feature[:stats]['related_features'] rescue 'Unknown'
  %div.col-md-12
    = will_paginate @features, param_name: 'features_page'<commit_msg>skip if related genomes count is unknown<commit_after>%ol.breadcrumb
  %li
    %a{ href: '/' } Home
  %li
    %a{ href: '/genomes' } Genomes
  %li.active
    #{@genome.organism}

%div.row
  %div.col-xs-2
    = image_tag @genome.avatar.url, class: 'img-circle img-avatar'
  %div.col-sm-10
    %h2 #{@genome.organism}
    %ul
      %li
        %a{ href: "/genome_relationships?genome_id=#{@genome.id}" } View Graph
      %li
        NCBI Assembly:
        %a{ href: "http://www.ncbi.nlm.nih.gov/assembly/#{@genome.assembly_id}"}
          #{@genome.assembly_id}
      - unless @genome[:ncbi_metadata].nil?
        %li Submitted by: #{@genome['ncbi_metadata']['submitterorganization'] rescue 'Unknown'}
      - unless @genome[:stats].nil?
        %li #{@genome[:stats]['total_scaffolds']} Scaffolds (#{'%.2f' % (@genome[:stats]['genome_size'].to_f/1e6)} Mb)
        %li
          #{number_with_delimiter @genome[:stats]['total_features']} Features /
          #{number_with_delimiter @genome[:stats]['total_proteins']} Proteins
          (#{number_with_delimiter @genome[:stats]['shared_proteins']} Shared)
      %li Last Updated: #{time_ago_in_words(@genome.updated_at)} ago
      %li Created: #{time_ago_in_words(@genome.created_at)} ago

%hr

%div.row
  %div.col-md-12
    %h3 Similar Organisms
  %div.col-md-12
    %table.table.table-bordered.table-striped.table-condensed
      %thead
        %tr
          %th #
          %th Organism
          %th Genes Shared
      %tbody
        - @genome_relationships.each do |genome_relationship|
          %tr
            %td= genome_relationship.id
            %td
              = link_to genome_relationship.related_genome.organism, genome_path(genome_relationship.related_genome)
              - if genome_relationship.autophilic?
                %span.label.label-info self
            - n_shared = genome_relationship.related_features_count
            %td #{'%0.2f' % (100 *n_shared / @genome[:stats]['total_proteins'].to_f)} %

  %div.col-md-12
    = will_paginate @genome_relationships, param_name: 'genomes_page'

%div.row
  %div.col-md-12
    %h3 Protein Coding Genes
    %table.table.table-bordered.table-striped.table-condensed
      %thead
        %tr
          %th
            Start - Stop
          %th
            Gene Product
          %th Related Features
      %tbody
        - @features.each do |feature|
          %tr
            %td
              %code
                #{feature[:start]} - #{feature[:stop]}
            %td
              = link_to feature.product, genome_feature_path(@genome, feature)
              - if feature.weird?
                %span.label.label-warning weird
            %td
              = feature.protein_relationships.count # ['related_features'] rescue 'Unknown'
  %div.col-md-12
    = will_paginate @features, param_name: 'features_page'
{'fraction_non_alphanumeric': 0.13599145603417587, 'fraction_numerical': 0.008543965824136704, 'mean_word_length': 2.2725684333139196, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3691030', 'n_tokens_mistral': 1930, 'n_tokens_neox': 1788, 'n_words': 324}