JAL-1701 added links to example files. will probably remove them later
[jalview.git] / help / html / features / splitView.html
1 <html>
2 <!--
3  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
4  * Copyright (C) $$Year-Rel$$ The Jalview Authors
5  * 
6  * This file is part of Jalview.
7  * 
8  * Jalview is free software: you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License 
10  * as published by the Free Software Foundation, either version 3
11  * of the License, or (at your option) any later version.
12  *  
13  * Jalview is distributed in the hope that it will be useful, but 
14  * WITHOUT ANY WARRANTY; without even the implied warranty 
15  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
16  * PURPOSE.  See the GNU General Public License for more details.
17  * 
18  * You should have received a copy of the GNU General Public License
19  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
20  * The Jalview Authors are detailed in the 'AUTHORS' file.
21  -->
22 <head>
23 <title>Split Frame Views</title>
24 </head>
25 <body>
26 <p><strong>Split Frame Views</strong></p>
27 <p/></p>Coding DNA (cDNA) and its protein product can be displayed in a split view, with cDNA above and protein below. The two alignments are
28 linked, with these features supported:
29 <ul>
30 <li>mouseover or scrolling of either alignment is followed by the other (unless you turn off <strong><a href="../menus/alwview.html">"View&#8594;Automatic Scrolling"</a></strong>)</li>
31 <li>on selecting rows, columns or regions in one alignment, the corresponding selection is made in the other</li>
32 <li>sequence ordering in one alignment (using the cursor, or <strong><a href="../calculate/sorting.html">"Calculate&#8594;Sort")</a></strong> is also applied to the other</li>
33 <li>editing (gap insertion / deletion) in the protein alignment is reflected in the cDNA (but not vice versa)</li>
34 <li>on <strong><a href="../calculations/tree.html">"Calculate Tree"</a></strong> in either alignment, grouping, colouring and sorting by tree are applied to both</li>
35 <li>the <strong><a href="../menus/alwformat.html">"Format&#8594;Font"</a></strong> menu option has an option 'Scale protein residues to codons'; select this option to make each protein residue
36 the same width as a DNA codon (so the alignments 'line up' vertically)</li>
37 <li>menu option <strong>"View&#8594;Protein"</strong> (in the cDNA panel) or <strong>"View&#8594;Nucleotide"</strong> (in the protein panel) allows you to show or hide the complementary alignment</li>
38 <li>you can adjust panel heights by dragging the divider between them using the mouse</li>
39 <li>menu options <a href="menus/alwview.html"><strong>"View&#8594;New View / Expand Views / Gather Views"</strong></a> behave as for a normal alignment window, but always create new views
40 as split frames</li> 
41 </ul>
42 <p>An alignment annotation row on the protein alignment shows the <strong><a href="../calculations/consensus.html">cDNA consensus</a></strong> for each peptide column.<br/>
43 This consensus may reveal variation in nucleotides coding for conserved protein residues.</p>
44
45 <p><strong>Opening a Split Frame View</strong></p>
46 <p>A Split Frame View can be opened in one of the following ways:</p>
47 <p><strong><em>Add Sequences</em></strong></p>
48 <p>If you add (coding) DNA sequences to an open peptide alignment, or vice versa, <em>and</em> at least one DNA sequence translates to one of the
49 peptide sequences, then the option to open in a split window is offered. The DNA may include start and/or stop codons, but no non-coding (intron)
50 sequence.<br>
51 If more than one cDNA variant is present in the alignment, Jalview will first try to match these to protein sequences based on any retrieved cross-references, and failing that, pairwise as they are ordered in the alignments. 
52
53 <p>This option is available in Jalview Desktop (when adding sequences by any supported method), and Jalview applet (adding from textbox).
54 The additional options below apply to Jalview Desktop only.</p>
55
56 <p><strong><em>Translate as cDNA</em></strong></p>
57 <p>Menu option <strong><a href="../menus/alwcalculate.html">"Calculate&#8594;Translate as cDNA"</a></strong> is available for a nucleotide alignment. Selecting this option shows the DNA and its 
58 calculated protein product in a Split Frame view.</p>
59
60 <p><strong><em>Get Cross-References</em></strong></p>
61 <p>Menu option <strong><a href="../menus/alwcalculate.html">"Calculate&#8594;Get Cross-References"</a></strong> is available for fetched sequences which have cross-references to other databases.
62 On selecting protein cross-references (for a cDNA alignment), or DNA xrefs (for peptide), a Split Frame view is opened showing cDNA and peptide.</p>
63
64 <p><strong><em>Realign a Split View</em></strong></p>
65 <p>If you invoke a web service to realign either half of a Split Frame, then the resulting realignment is displayed in a new
66 Split Frame.</p> 
67 <ul>
68 <li>the alignment you chose to realign (for example, peptide) is displayed as aligned by the external web service</li>
69 <li>Jalview 'aligns' its complement (in this case, cDNA) similarly, by inserting corresponding gaps
70     <ul>
71     <li>NB this is <em>not</em> the same as aligning the complement using the external service, which may give different results</li> 
72     </ul>
73 </li>
74 </ul> 
75
76 <p><strong><em>Applet</em></strong></p>
77 <p>To see a split frame view in the Jalview applet, provide these applet parameters:
78 <table border="1">
79 <tr><th>Parameter</th><th>Value</th><th>Description</th>
80 <tr><td>file</td><td>path to an alignment file</td><td>a cDNA (or protein) alignment</td>
81 <tr><td>file</td><td>path to an alignment file</td><td>a protein (or cDNA) alignment</td>
82 <tr><td>enableSplitFrame</td><td>true</td><td>to enable the Split Frame feature</td>
83 </table>
84 <p/>If compatible sequences are present in the input alignments, Jalview will open a Split Frame view.<br/>
85 If not, only the first alignment will be opened (an error message is written to the Java console).
86
87         <p>
88                 <em>Split Frame Views were introduced in Jalview 2.9</em>
89         </p>
90         <p>
91                 Example files for cDNA/Protein: <a
92                         href="http://www.jalview.org/builds/nextrel/examples/estrogenReceptorProtein.fa">estrogenReceptorProtein.fa</a>
93                 and <a
94                         href="http://www.jalview.org/builds/nextrel/examples/estrogenReceptorCdna.fa">estrogenReceptorCdna.fa</a>
95                 taken from xxx.
96         </p>
97 </body>
98 </html>