Merge branch 'ismb/2015_demo' into develop
authorJim Procter <jprocter@issues.jalview.org>
Tue, 21 Jul 2015 13:53:27 +0000 (14:53 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 21 Jul 2015 13:53:27 +0000 (14:53 +0100)
help/html/calculations/columnFilterByAnnotation.html
help/html/features/bioJsonFormat.html [new file with mode: 0644]
help/html/features/clarguments.html
help/html/features/pdbsequencefetcher.html
help/html/features/seqfetch.html
help/html/features/structurechooser.html
help/html/io/fileformats.html
help/html/menus/alignmentMenu.html
src/jalview/bin/Jalview.java
src/jalview/renderer/AnnotationRenderer.java
test/jalview/bin/CommandLineOperations.java

index c5f42df..a69e234 100644 (file)
  * The Jalview Authors are detailed in the 'AUTHORS' file.
  -->
 <head>
-<title>Filter Columns by Annotation</title>
+<title>Select/Hide Columns by Annotation</title>
 </head>
 
 <body>
        <p>
-               <strong> Filter Columns by Annotation </strong>
+               <strong> Select/Hide Columns by Annotation </strong>
        </p>
-       <p>Jalview allows the columns of an alignment to be filtered using
+       <p>From Jalview-2.9 columns of an alignment can be filtered using
                any annotation rows added to that alignment.</p>
-       From &quot;Select&quot; menu
-       <strong>&#8594;</strong> &quot;Select by Annotation...&quot; to bring
-       up the Select by Annotation window. The filter options vary depending
+       To carry out this operation, navigate to &quot;Select&quot; menu
+       <strong>&#8594;</strong> &quot;Select/Hide Columns by Annotation...&quot; to bring
+       up the Select/Hide by Annotation window. The filter options vary depending
        on the type of annotation selected. If an annotation that has a numeric
        values is selected, the threshold filter option is activated as seen in the
-       figure on the right below.
+       figure on the right below, otherwise the dialog will exclude the threshold filter option as seen in the figure on the left.
        <br>
        <br> 
 
        <div>&nbsp</div>
 
        <ul>
-               <li>Select which annotation to base the filtering on using the
-                       top-most selection box.</li>
+               <li>The target annotation row can be selected using the drop-down option menu in the top-most part of the window.</li>
 
                <li><strong>Search Filter</strong>
                        <ul>
-                               <li>When a text is entered in the textfield on the search
-                                       filter section, the &quot;Display Label&quot; and &quot;Description&quot;
-                                       checkboxes becomes selectable.</li>
-                               <li>On selecting any of the checkboxes, a regular expresion
+                               <li>When a text is entered in the text box within the Search
+                                       Filter section, the &quot;Display Label&quot; and &quot;Description&quot;
+                                       options becomes enabled for selection. </li>
+                               <li>On selecting any of the options, a regular expression
                                        search (RegEx) is executed on the specified field of the current
                                        annotation row selected, and the matching columns will be highlighted
                                        in the alignment.</li>
@@ -63,7 +62,7 @@
                <li><strong>Structure Filter</strong>
                        <ul>
                                <li>Alignment columns can also be filtered by the type of
-                                       secondary structure present in a choosen annotation row.</li>
+                                       secondary structure present in a target annotation row.</li>
                                <li>This can be achieved by ticking the type of structure you
                                        wish to filter by under the structures filter section.</li>
                        </ul>
@@ -71,7 +70,7 @@
                        <ul>
                                <li>This filter is only activated for annotation which contain
                                        numeric values</li>
-                               <li>Select whether to Filter the alignment above or below an
+                               <li>Select whether to filter the alignment above or below an
                                        adjustable threshold with the selection box within the threshold
                                        filter section.</li>
                                <li>Change the threshold value with the slider, or enter the
@@ -87,7 +86,7 @@
                                <li>While the &quot;Hide&quot; option enables the matching columns to
                                        be hidden automatically during the filtering process.</li>
                                <li>The &quot;Ok&quot; button applies the filter when clicked.</li>
-                               <li>And finally, The &quot;Cancel&quot; button restores the alignment to its previous state before the filtering when clicked. 
+                               <li>And finally, the &quot;Cancel&quot; button restores the alignment to its previous state before any filtering was applied. 
                        </ul></li>
        </ul>
 
diff --git a/help/html/features/bioJsonFormat.html b/help/html/features/bioJsonFormat.html
new file mode 100644 (file)
index 0000000..a91955b
--- /dev/null
@@ -0,0 +1,52 @@
+<html>
+<!--
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ 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.
+ -->
+<head>
+<title>BioJSON-1.0</title>
+</head>
+<body>
+       <h1>BioJSON</h1>
+       BioJSON is a standardise JavaScript Object Notation (JSON) format for exchange of Bio-informatics Sequence Alignment data.      
+       BioJSON-1.0 schema/documentation is available at <a href="#">http://www.jalview.org/builds/develop/examples/biojson-doc/</a>.
+       You can keep up to date with BioJSON development and latest news at <a href="#">https://github.com/jalview/biojson/wiki</a>.
+       
+       <h2>Features supported</h2>
+       Export/Import of the following alignment elements are supported in BioJSON-1.0:
+       <ul>
+               <li>Alignment Annotations</li>
+               <li>Alignment Features</li>
+               <li>Alignment Sequences</li>
+               <li>Color Scheme</li>
+               <li>Hidden Columns</li>
+               <li>Hidden Sequences</li>
+               <li>Sequence Groups</li>
+       </ul>
+
+       <h2>Features not yet supported</h2>
+       Export/Import of the following alignment elements are not supported in BioJSON-1.0:
+       <ul>
+               <li>Reference sequence</li>
+               <li>Representative sequence</li>
+               <li>Trees</li>
+               <li>3D Structures</li>
+       </ul>
+</body>
+</html>
index 8a72d4d..16b0dc0 100644 (file)
  <td><div align="center">-blc FILE</div></td>
  <td><div align="left">Create alignment file FILE in BLC format.</div></td>
  </tr>
+  <tr> 
+ <td><div align="center">-json FILE</div></td>
+ <td><div align="left">Create alignment file FILE in JSON format.</div></td>
+ </tr>
  <tr> 
  <td><div align="center">-jalview FILE</div></td>
 
index 15dc2c6..990a1c9 100644 (file)
 <body>
 
        <strong>PDB Sequence Fetcher</strong>
-       <p>From Jalview 2.x.x a speciliased interface was introduced for
+       <p>From Jalview 2.9 a specialised interface was introduced for
                fast and efficient discovery/retrieval of sequence data from the PDB
                database. The introduced interface enables live querying of PDB data
                on-the-fly thereby eliminating the need to memorise database accession
-               or to cross-reference other bioinformatics websites before retrieving
-               a sequence data in jalview. The underlying technology is provided by
+               or to manually cross-reference other bioinformatics websites before retrieving
+               sequence data in Jalview. The underlying technology is provided by
                EBI and is based on Apache Solr which is a text based search engine.</p>
        <p>
                The PDB Sequence Fetcher interface can be opened by selecting <strong>PDB</strong>
        </p>
        <p>
                <img src="pdbseqfetcher.png" align="left"
-                       alt="PDB sequence fetcher (introduced in Jalview 2.x.x)">
+                       alt="PDB sequence fetcher (introduced in Jalview 2.9)">
        </p>
 
-       <strong>Searching the PDB Database</strong>
-       <br> Once the interface is opened, typing in the search text box
-       will execute a live query to the PDB database and display the results
-       on-the-fly as seen in the screen-shot above. Use the drop-down menu to
-       select a specific field to search by in the PDB database, the default
-       option is
-       <strong>'ALL'</strong>. Furthermore, the PDB search interface also
-       provides the following functionalities:
+       <p><strong>Searching the PDB Database</strong></p>
+       <p>When the interface is opened, a live query to the PDB database is 
+       executed every time a character is typed into the search text box, and 
+       a result is displayed on-the-fly as seen in the screenshot above.</p>
+       
+       <p>Use the drop-down menu to select a specific field to search by in the PDB database, the default
+       option is <strong>'ALL'</strong>.</p>
+       
+       <p> Furthermore, the PDB search interface also provides the following functionalities:</p>
        <ul>
                <li>Retrieving a unique chain for a PDB entry: <br>To
                        retrieve a specific chain for a PDB entry, append the PDB ID with a
        <p>
                <strong>Importing Sequence</strong><br> After querying the PDB
                database, to import the found data into Jalview, select the entries
-               you wish to import then click the ok button at the bottom of the
+               you wish to import then click the 'Ok' button at the bottom of the
                interface.
        </p>
        <p>
                <em>The PDB Sequence Fetcher interface was introduced in Jalview
-                       2.x.x.</em>
+                       2.9</em>
        </p>
 </body>
 </html>
\ No newline at end of file
index 68c5520..2516f3f 100755 (executable)
@@ -49,7 +49,7 @@ WSDBFetch service provided by the European Bioinformatics Institute, or, since J
   one or more accession ids (as a semi-colon separated list), or press the 
   &quot;Example&quot; button to paste the example accession for the currently selected database into the retrieval box.
    Finally, press &quot;OK&quot; to initiate the retrieval.</p>
-   <p>Since Jalview 2.x.x if  PDB is selected as the sequence database, a specialised interface - <a href="pdbsequencefetcher.html">PDB Sequence Fetcher</a>  is used for discovering and retrieving the sequenec data. </p>
+   <p>Since Jalview 2.9 if  PDB is selected as the sequence database, a specialised interface - <a href="pdbsequencefetcher.html">PDB Sequence Fetcher</a>  is used for discovering and retrieving the sequenec data. </p>
        <p><strong>Specifying chains for PDB IDs</strong>
   If you are retrieving sequences from the PDB, you can retrieve
   specific chains by appending a colon and the chain id to the PDB
index 7dd69c1..039fdb0 100644 (file)
        </ul>
 
        <p>
-               <em>The Structure Chooser interface was introduced in Jalview 2.x.x.
+               <em>The Structure Chooser interface was introduced in Jalview 2.9.
                </em>
        </p>
 </body>
index ae56945..b457adf 100755 (executable)
@@ -77,6 +77,11 @@ THISISASEQUENCE<br></td>
 <em>...</em><br>//</td>
 <td width="23%">.phy</td>
 </tr>
+<tr>
+<td width="17%">JSON</td>
+<td width="60%">Data starts with '{' <br>Data  ends with '}' <br><br>See <a href="../features/bioJsonFormat.html">BioJson</a> for more info about Jalview JSON format <br></td>
+<td width="23%">.json</td>
+</tr>
 </table>
 <p>The file extensions are used to associate jalview alignment icons
 with alignment files: <img src="file.png" width=12 height=12 >
index a2cb603..8b50d9e 100755 (executable)
@@ -72,6 +72,7 @@
                                                <li><strong>AMSA</strong></li>
                                                <li><strong>STH</strong></li>
                                                <li><strong>Phylip</strong></li>
+                                               <li><strong>JSON</strong></li>
                                        </ul></li>
                                <li><strong>Print (Control P)<br> </strong><em>Jalview
                                                will print the alignment using the current fonts and colours of
index 8ad4cbd..177d56f 100755 (executable)
@@ -693,6 +693,7 @@ public class Jalview
                     + "-pileup FILE\tCreate alignment file FILE in Pileup format\n"
                     + "-pir FILE\tCreate alignment file FILE in PIR format.\n"
                     + "-blc FILE\tCreate alignment file FILE in BLC format.\n"
+                    + "-json FILE\tCreate alignment file FILE in JSON format.\n"
                     + "-jalview FILE\tCreate alignment file FILE in Jalview format.\n"
                     + "-png FILE\tCreate PNG image FILE from alignment.\n"
                     + "-svg FILE\tCreate SVG image FILE from alignment.\n"
index 3359678..61194ce 100644 (file)
@@ -47,6 +47,12 @@ import com.stevesoft.pat.Regex;
 
 public class AnnotationRenderer
 {
+  private static final int UPPER_TO_LOWER = 'a' - 'A'; // 32
+
+  private static final int CHAR_A = 'A'; // 65
+
+  private static final int CHAR_Z = 'Z'; // 90
+
   /**
    * flag indicating if timing and redraw parameter info should be output
    */
@@ -715,14 +721,14 @@ public class AnnotationRenderer
 
               }
             }
-            if (ss >= 65)
+            if (isRNA && (ss >= CHAR_A) && (ss <= CHAR_Z))
             {
               // distinguish between forward/backward base-pairing
-              if (displayChar.indexOf(ss + 32) > -1)
+              int ssLowerCase = ss + UPPER_TO_LOWER;
+              // TODO would .equals() be safer here? or charAt(0)?
+              if (displayChar.indexOf(ssLowerCase) > -1)
               {
-
-                ss = (char) (ss + 32);
-
+                ss = (char) ssLowerCase;
               }
             }
 
index 991d856..8bd484a 100644 (file)
@@ -140,7 +140,7 @@ public class CommandLineOperations
   {
     String cmds = "nodisplay -open examples/uniref50.fa -sortbytree -props FILE -colour zappo "
             + "-jabaws http://www.compbio.dundee.ac.uk/jabaws -nosortbytree -dasserver nickname=www.test.com "
-            + "-features uniref50_test_features -annotations uniref50_test_annot -tree uniref50_test_tree";
+            + "-features examples/uniref50_test_features -annotations examples/uniref50_test_annot -tree examples/uniref50_test_tree";
     Worker worker = jalviewDesktopRunner(true, cmds, 9000);
     String ln = null;
     while ((ln = worker.getOutputReader().readLine()) != null)
@@ -231,12 +231,14 @@ public class CommandLineOperations
             "Failed command : -nosortbytree" },
         { "CMD [-dasserver nickname=www.test.com] executed successfully!",
             "Failed command : -dasserver nickname=www.test.com" },
-        { "CMD [-features uniref50_test_features]  executed successfully!",
-            "Failed command : -features uniref50_test_features" },
-        { "CMD [-annotations uniref50_test_annot] executed successfully!",
-            "Failed command : -annotations uniref50_test_annot" },
-        { "CMD [-tree uniref50_test_tree] executed successfully!",
-            "Failed command : -tree uniref50_test_tree" },
+        {
+            "CMD [-features examples/uniref50_test_features]  executed successfully!",
+            "Failed command : -features examples/uniref50_test_features" },
+        {
+            "CMD [-annotations examples/uniref50_test_annot] executed successfully!",
+            "Failed command : -annotations examples/uniref50_test_annot" },
+        { "CMD [-tree examples/uniref50_test_tree] executed successfully!",
+            "Failed command : -tree examples/uniref50_test_tree" },
         // non headless mode input operations
         { "CMD [-nousagestats] executed successfully!",
             "Failed command : -nousagestats" },