-
Notifications
You must be signed in to change notification settings - Fork 0
Creating JSON file for Website pages
The script requires a JSON (JavaScript Object Notation) file to be used to feed a SQLite database with texts that can be used in Website(more information about the database). You can found an example here.
In example.json the content is defined as a paired key-values(something like { "key" : "value" }), where keys respect the following standards sections and values are composed by HTML values that gonna be used in Website:
Header and footer can be used like a layout wrapper, in other words, all pages have header and footer content. Home, Help, About and Downloads are content pages; and finally files tag can be used to define another files to be used in Downloads page.
Header section is composed by two keys:
- header-email
- header-support

"header-email" : "<strong>Email:</strong> example@example.com",
"header-support" : "<strong>Support:</strong> +55 (11) 9999-9999"Footer section is composed just by the footer key, you can change HTML value as you want

"footer": "<div class='row'><div class='col-md-6'>The <i>Photorhabdus luminescens</i> MN7 Genome Database<br />v. 1.1 - October 2017<br /> © 2017 C. E. Winter & A. Gruber</div><div class='col-md-6'><a href='http://www.icb.usp.br/~cewinter/nmbl_i.html'>Nematode Molecular Biology Laboratory</a><br /><a href='http://www.icb.usp.br/~bmpsite/'>Department of Parasitology</a>, <a href='https://ww2.icb.usp.br/icb/'>Institute of Biomedial Sciences</a>, <a href='http://www.usp.br/'>USP</a><br /> Av. Prof Lineu Prestes, 1374, São Paulo, SP, Brazil, 05508-000</div></div>"

"footer": "© 2017 University of São Paulo | By : Welington Luiz de Araujo"Home section is composed by:
- home-title
- home-value
- home-sub

"home-title" : "<i>Photorhabdus luminescens</i> MN7 Genome Database",
"home-value" : "The <i>Photorhabdus luminescens</i> MN7 genome database (PhotoBase) is an integrated resource of genome sequencing and annotation data of the entomopathogenic enterobacterium Photorhabdus luminescens MN7. In addition to sequencing data, PhotoBase provides an organized catalog of functionally annotated predicted protein-coding and RNA genes, in addition to several DNA-based analysis results. The PhotoBase is maintained by the Laboratory of Bioinformatics and Viral Genomics and the Nematode Molecular Biology Lab at the Institute of Biomedical Sciences, University of São Paulo, Brazil.<br>If you use PhotoBase, please cite this page",
"home-sub" : "<sub>Photos: Micrograph of <i>Photorhabdus luminescens</i> (notice crystalline protein inclusions in the cytosol) (upper photo); Differential interference contrast (Nomarski) microscopy of <i>Photorhabdus</i> in the anterior gut of <i>Heterorhabditis indica</i> LPP1, infective junvenile phase (lower photo). See the <b>About</b> section for details.</sub>"Help section is composed by one key help-questions-feedback that defines a panel title, but you can add values to this panel following the example:

"help-questions-feedback": "Questions and feedback",
"help-questions-feedback-1-paragraph": "If you have any question or would like to communicate any error, please contact us: ",
"help-questions-feedback-2-list-1": "Carlos E. Winter - <a href='mailto:cewinter@usp.br'>cewinter@usp.br</a>",
"help-questions-feedback-2-list-2": "Arthur Gruber - <a href='mailto:argruber@usp.br'>argruber@usp.br</a>"There is a little difference about this keys, when you're setting the content of the page, you need to add a "-" and enumerate sorting by the order that you want to show. In example, firstly we define the panel title; in next value, we set a paragraph; the next values demonstrate a list that you can use, also sorting as you want to show. Website application need this tags to facilitate how he's going to show those values and apply some CSS classes.
All content of about page is composed using the keys cited above(in Help section). See the following example to understand.

"about-table-content-4": "Funding",
"about_4-0-title": "Funding",
"about_4-1-paragraph": "<b>PhotoBase</b> has been developed with support from <a href='http://www.fapesp.br/en/'>FAPESP</a> (São Paulo Research Foundation, grants <b>#2010/51973-0</b> and <b>#2012/20945-7</b>) and <a href='http://www.cnpq.br/english/cnpq/index.htm'>CNPq</a> (National Council for Scientific and Technological Development).",
"about_4-2-paragraph": "The opinions, hypotheses, and conclusions or recommendations present in this website are the sole responsibility of its authors and do not necessarily reflect the views of FAPESP.",
"about_4-3-title": "How to Cite",
"about_4-4-paragraph": "If you use this database, please cite this page as follows:",
"about_4-5-list-1": "Winter, C.E. & Gruber, A. (2013) The <i>Photorhabdus luminescens</i> MN7 genome database, version 1.1: http://www.coccidia.icb.usp.br/PMN."As you can see in JSON example considering the image, the key "about-table-content-n" is used to define panel titles, and next values reference the "n" which is the index of your order, so, the content of the panel should be something like "about_n-m" which "m" is the index inside the panel; finally there is a special tag after the "m" index, as you can see comparing with image, tag "title" apply a class and element h1 to those who use the tag, tag paragraph add content inside a p tag and list is followed by a index number sorting by this index.
Global analyses page is composed by panels which you will set here, if you just set in config file the website will'nt have content to show

The link value shoud by REQUIRE TO START WITH "/reports/" if you didn't set, will have some problems to access
"global-analyses-panel-1-title": "GO term mapping",
"global-analyses-panel-1-1-paragraph": "Table of ontologies",
"global-analyses-panel-1-1-link": "/reports/go_report/go_mapping.html",
"global-analyses-panel-2-title": "eggNOG",
"global-analyses-panel-2-1-paragraph": "Orthology analysis by evolutionary genealogy of genes: Non-supervised Orthologous Groups",
"global-analyses-panel-2-1-link": "/reports/eggnog_report/classes.html",
"global-analyses-panel-3-title": "KEGG Pathways",
"global-analyses-panel-3-1-paragraph": "Enzyme by enzyme report of KEGG results",
"global-analyses-panel-3-1-link": "/reports/kegg_report/classes.html",
"global-analyses-panel-3-2-paragraph": "Map by map report of KEGG results",
"global-analyses-panel-3-2-link": "/reports/kegg_organism_report/html_page/classes.html",
"global-analyses-panel-4-title": "Comparative Metabolic Reconstruction",
"global-analyses-panel-4-1-paragraph": "<i>P. luminescens</i> MN7 versus <i>P. asymbiotica</i> ATCC43949<br />(in yellow or red, enzymes found only in either MN7 or <i>P. asymbiotica</i>, respectively; in green, those found in both)",
"global-analyses-panel-4-1-link": "/reports/MN7_X_Pasym/html_page/classes.html",
"global-analyses-panel-4-2-paragraph": "<i>P. luminescens</i> MN7 versus <i>P. luminescens</i> TT01<br />(in yellow or dark blue, enzymes found only in either MN7 or TT01, respectively; in green, those found in both)",
"global-analyses-panel-4-2-link": "/reports/MN7_X_TT01/html_page/classes.html"Downloads and Search Database page are constructed autommatically, so there is no keys that you can use.

The content generated in "Annotations" panel have links to access reports from GFF, artemis and genbank results (See more in creation of config file to to set those variables).

-
Getting started
1.1 Setup
1.2 Running
- Configuration files
2.1 Creating config file
2.2 Creating JSON file for Website pages
-
Developers Documentation
3.1 Services API
3.2 Website
3.3 Report_HTML_DB -
Deploy
4.1 Considerations
4.2 Apache
4.3 Docker
-
Questions and feedback