File: biojsmsa-templates.html

package info (click to toggle)
jalview 2.11.4.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 445,392 kB
  • sloc: java: 365,549; xml: 2,989; sh: 1,511; perl: 336; lisp: 139; python: 116; makefile: 81; haskell: 60
file content (101 lines) | stat: -rw-r--r-- 4,737 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<html>
<!--
 *Jalview - A Sequence Alignment Editor and Viewer (2.11.4.1)
 *Copyright (C) 2024 The Jalview Authors
 *
 *This file is part of Jalview.
 *
 *Jalview is free software: you can redistribute it and/or
 *modify it under the terms of the GNU General Public License 
 *as published by the Free Software Foundation, either version 3
 *of the License, or (at your option) any later version.
 * 
 *Jalview is distributed in the hope that it will be useful, but 
 *WITHOUT ANY WARRANTY; without even the implied warranty 
 *of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
 *PURPOSE.  See the GNU General Public License for more details.
 *
 *You should have received a copy of the GNU General Public License
 *along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
 *The Jalview Authors are detailed in the 'AUTHORS' file.
-->
<title>The BioJS MSA Templating System</title>
<body>
  <h2>BioJS MSA Templates</h2>
  <p>The Jalview Desktop uses a template file to embed data when
    exporting an alignment as a BioJS MSA HTML page. This means it is
    possible to update Jalview's template with different versions of the
    BioJS MSA viewer, or even customise the page for your own needs.</p>
  <p>NOTE: This is an experimental feature new in jalview 2.9 -
    please get in contact with the developers if you're interested in
    creating your own templates so we can improve this documentation !</p>
  <h3>The components of a BioJS template file</h3>
  <ul>
    <li>All JavaScripts necessary to render and visualise BioJS
      data</li>
    <li>JavaScripts to transform BioJSON data to BioJS MSA data</li>
    <li>Place holder for BioJSON data (this can be a div or input
      element as show below): <pre>
        <code>&lt;div name="seqData" id="seqData" style="display: none;"&gt;#valid BioJSON data#&lt;/div&gt;  OR
&lt;input type="hidden" id="seqData" name="seqData" value='#valid BioJSON data#'/&gt;
</code>
      </pre>
    </li>
  </ul>

  The externalised BioJS MSA templates are available in the Github
  repository
  <a
    href="https://github.com/jalview/exporter-templates/tree/master/biojs">https://github.com/jalview/exporter-templates/tree/master/biojs</a>.
  <br />Jalview processes the
  <b>package.json</b> file at
  <a
    href="https://github.com/jalview/exporter-templates/blob/master/biojs/package.json">https://github.com/jalview/exporter-templates/blob/master/biojs/package.json</a>
  to work out the available versions of BioJS MSA Viewer templates and
  the latest release version to use for its exports.


  <h2>Creating/Updating a new BioJS MSA Template</h2>
  The following steps can be taken to create or update a BioJS MSA
  template
  <ol>
    <li>Add/update all BioJS MSA scripts to the template file</li>
    <li>Add/update codes for transforming BioJSON data to BioJS MSA
      data (this requires knowledge of both data models)</li>
    <li>Ensure that the new template created can be employed by
      Jalview to generate valid BioJS MSA files. This can be achieved by
      following the steps below to deploy the new export template to a
      test repository and subsequently configure Jalview to use the test
      repository for testing the template:
      <ol type="i">
        <li>Publish the template along with a valid package.json
          file to an online repository</li>
        <li>Configure Jalview preferences to point to the raw URL
          of package.json in your test repository. This is done by
          creating/changing the property <b>'biojs_template_git_repo'</b>
          in the <b>jalview_properties</b> file <br />e.g. <b>biojs_template_git_repo=https://raw.githubusercontent.com/gituser/biojs-templates/package.json</b>
        </li>
        <li>Restart Jalview and ensure that the new templates are
          downloaded</li>
        <li>Export an alignment to BioJS MSA</li>
        <li>Check that the exported file is valid and reflects all
          the incorporated changes</li>
      </ol>
    </li>
    <li>Commit the new template to the official Jalview-BioJS
      Github template repository <a
      href="https://github.com/jalview/exporter-templates/tree/master/biojs">https://github.com/jalview/exporter-templates/tree/master/biojs</a>
    </li>
    <li>Update the package.json of the official template repository
      at <a
      href="https://github.com/jalview/exporter-templates/blob/master/biojs/package.json">https://github.com/jalview/exporter-templates/blob/master/biojs/package.json</a>
      accordingly
    </li>
    <li>Restore value for <b>'biojs_template_git_repo'</b> in
      jalview_properties to point to the official template repository
    </li>
    <li>Repeat steps 3iii to 3v above</li>
  </ol>

</body>
</html>