Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VFs to locus and orthogroup views. #71

Merged
merged 24 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8e02207
Correct text on home page.
njohner Mar 12, 2024
f301afe
Pass result object to result templates in result_tabs template.
njohner Mar 12, 2024
ffded80
Make result_table template configurable in python.
njohner Mar 13, 2024
fca3449
Add virulence factors to orthogroup and locus views.
njohner Mar 13, 2024
1d6f846
Make result_table template useable several times in the same view.
njohner Mar 13, 2024
1da0dfd
Use result_table template for swissprot in locus and og views.
njohner Mar 13, 2024
79417b0
Use result_table template for AMR data in locus and og views.
njohner Mar 13, 2024
7de68b1
Use result_table template for COG data in locus and og views.
njohner Mar 14, 2024
8646980
Use result_table template for Pfam data in og view.
njohner Mar 14, 2024
221e605
Make sure to initialize DataTable for table in result_table template.
njohner Mar 14, 2024
1aea1fa
Include fetching modules and pathways in KoViewMixin.
njohner Mar 14, 2024
741ddbc
Use result_table template for Ko data in og view.
njohner Mar 14, 2024
012970f
Some cosmetics in orthogroup and locus views.
njohner Mar 14, 2024
73fda22
Move locus and orthogroup views to their own module.
njohner Mar 15, 2024
8addbae
Add is_enabled property to view mixins.
njohner Mar 15, 2024
2d7bd26
Refactor functions to get annotation data as Classes.
njohner Mar 15, 2024
6f928f4
Diminish code repetition to get annotation data in locus and og views.
njohner Mar 15, 2024
6138556
Remove unused code path from locus template.
njohner Mar 15, 2024
3212a48
Cleanup locus.html template.
njohner Mar 15, 2024
043cb17
Cleanup og.html template.
njohner Mar 15, 2024
c0f84f6
Use a for loop to display result tables in locus and og views.
njohner Mar 15, 2024
085d8ba
Refactor locus and orthogroup as class-based views.
njohner Mar 18, 2024
1a34ba7
Add changelog entry.
njohner Mar 18, 2024
d80e4ae
Fix PlotHeatmap view.
njohner Mar 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ to [Common Changelog](https://common-changelog.org)

### Added

- Add VFs to locus and orthogroup views. ([#71](https://github.com/metagenlab/zDB/pull/71)) (Niklaus Jo
- Add new statistics to home view. ([#70](https://github.com/metagenlab/zDB/pull/70)) (Niklaus Johner)
- Add GWAS views. The associations are calculated using Scoary2. ([#62](https://github.com/metagenlab/zDB/pull/62)) (Niklaus Johner)
- Add VF details view. ([#58](https://github.com/metagenlab/zDB/pull/58)) (Niklaus Johner)
Expand Down
4 changes: 4 additions & 0 deletions webapp/assets/css/style_FILE_zDB.css
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@
margin: 10px 10px 10px 10px
}

.panel > div > .table {
margin-bottom: 0;
}

.jumbotron {
padding-top: 10px;
padding-bottom: 10px;
Expand Down
5 changes: 5 additions & 0 deletions webapp/chlamdb/templatetags/custom_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
register = template.Library()


@register.filter
def attrvalue(obj, key):
return getattr(obj, key, "")


@register.filter
def keyvalue(dict, key):
return dict.get(key)
Expand Down
12 changes: 6 additions & 6 deletions webapp/chlamdb/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from django.urls import re_path
from django.views.generic import TemplateView
from django.views.generic.base import RedirectView
from views import (entry_lists, fam, gwas, hits_extraction, tabular_comparison,
venn, views)
from views import (entry_lists, fam, gwas, hits_extraction, locus,
tabular_comparison, venn, views)

favicon_view = RedirectView.as_view(url='/assets/favicon.ico', permanent=True)

Expand All @@ -25,12 +25,12 @@
re_path(r'^pfam_comparison', tabular_comparison.PfamComparisonView.as_view(), name="pfam_comparison"), # noqa
re_path(r'^pan_genome/([a-zA-Z0-9_]+)', views.PanGenome.as_view(), name="pan_genome"), # noqa
re_path(r'^orthogroup_comparison', tabular_comparison.OrthogroupComparisonView.as_view(), name="orthogroup_comparison"), # noqa
re_path(r'^orthogroup/([a-zA-Z0-9_\.\-]+)', views.orthogroup, name="orthogroup"), # noqa
re_path(r'^orthogroup/([a-zA-Z0-9_\.\-]+)', locus.Orthogroup.as_view(), name="orthogroup"), # noqa
re_path(r'^module_comparison/$', views.module_comparison, name="module_comparison"), # noqa
re_path(r'^module_cat_info/([a-zA-Z0-9_\.]+)/([a-zA-Z0-9_\.\+-]+)$', views.module_cat_info, name="module_cat_info"), # noqa
re_path(r'^locusx/([a-zA-Z0-9_\.\-]+)/([a-zA-Z0-9_\.\-]+)', views.locusx, name="locusx"), # noqa
re_path(r'^locusx/([a-zA-Z0-9_\.\-]+)', views.locusx, name="locusx"),
re_path(r'^locusx$', views.locusx, name="locusx"),
re_path(r'^locusx/([a-zA-Z0-9_\.\-]+)/([a-zA-Z0-9_\.\-]+)', locus.LocusX.as_view(), name="locusx"), # noqa
re_path(r'^locusx/([a-zA-Z0-9_\.\-]+)', locus.LocusX.as_view(), name="locusx"),
re_path(r'^locusx$', locus.LocusX.as_view(), name="locusx"),
re_path(r'^ko_venn_subset/([a-zA-Z0-9_\.\+-]+)$', venn.VennKoSubsetView.as_view(), name="ko_venn_subset"), # noqa
re_path(r'^ko_comparison', tabular_comparison.KoComparisonView.as_view(), name="ko_comparison"), # noqa
re_path(r'^ko_barchart/$', views.KoBarchart.as_view(), name="ko_barchart"),
Expand Down
6 changes: 3 additions & 3 deletions webapp/templates/chlamdb/entry_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
{% include "chlamdb/menu.html" %}
{% include "chlamdb/extract_nav_tabs_template.html" with active_tab="index" %}
<br><br><br>
<table id="pfam_table">
<table id="pfam_table" class="table table-striped">
<thead>
<tr>
<td></td>
<th></th>
{% for header in table_headers %}
<td>{{ header }}</td>
<th>{{ header }}</th>
{% endfor %}
</tr>
</thead>
Expand Down
2 changes: 1 addition & 1 deletion webapp/templates/chlamdb/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h3 class="title">The database contains:</h3>
{% endif %}
{% if optional2status|keyvalue:"BLAST_swissprot" == 1 %}
<li class="summary_data">
<b>{{number_swissprot}} </b>VF genes
<b>{{number_swissprot}} </b>Swissprot homologs
</li>
{% endif %}
<br>
Expand Down
Loading