-<html>\r
-<head><title>Sequence Features</title></head>\r
-<body>\r
-<p><strong>Sequence Features</strong></p>\r
-<p>Jalview can colour parts of a sequence based on the presence of\r
-sequence features - which may be retrieved from database records (such\r
-as Uniprot), the result of <a href="search.html">sequence motif\r
-searches</a> or simply read from a <a\r
-href="featuresFormat.html">sequence features file</a>.</p>\r
-<p><strong>Sequence Feature Groups</strong></p>\r
-<p>Since Jalview 2.08, sequence features assigned to a sequence can be\r
-organised into groups, which may indicate that the features were all retrieved\r
-from the same database (such as Uniprot features), or generated by the\r
-same analysis process (as might be specified in a <a\r
-href="featuresFormat.html">sequence features file</a>).</p>\r
-<p><strong>Sequence Feature Inheritance</strong></p>\r
-<p>Since Jalview 2.08, sequence features are <em>global</em> to a set of\r
-sequences appearing (independently or together) in many different\r
-alignments. Practically, this means features loaded onto one alignment\r
-can be viewed in any alignments involving the same sequences. The same\r
-sequence appears in different alignments when a new alignment is\r
-generated by submitting an existing set of sequences to one of the\r
-alignment or prediction web services, and when sequences are copied\r
-and pasted into other alignment windows.</p>\r
-<p><strong>View→Show Sequence Features</strong></p>\r
-<p>Toggle the display of sequence features in this alignment. If\r
-feature retrieval has not already been carried out, then Jalview will\r
-automatically try to fetch sequence features (as described below).</p>\r
-<p><strong>View→Sequence Feature Settings...</strong>\r
-<p>Once sequence features have been loaded, their display can be fully controlled \r
- using the alignment window's <a\r
- href="featuresettings.html">Sequence Feature Settings</a> dialog box. Feature \r
- colour schemes and display parameters are unique to a particular alignment, \r
- so it is possible to colour the same sequence features differently in different \r
- alignment views.<br>\r
- Since Jalview 2.1, it is possible to add <a href="dassettings.html">DAS features</a> \r
- to an alignment via the DAS tabbed pane of the feature settings window. </p>\r
-<p>Precalculated Sequence Features may be added to an alignment from the command\r
- line, drag and drop, or from the "File->Load Features / Annotations"\r
- menu item. See the <a href="featuresFormat.html">Features File Format</a> for\r
- more details.</p>\r
-</body>\r
-</html>\r
+<html>
+<head><title>Sequence Features</title></head>
+<body>
+<p><strong>Sequence Features</strong></p>
+<p>Jalview can colour parts of a sequence based on the presence of
+sequence features - which may be retrieved from database records (such
+as Uniprot), the result of <a href="search.html">sequence motif
+searches</a> or simply read from a <a
+href="featuresFormat.html">sequence features file</a>.</p>
+<p><strong>Sequence Feature Groups</strong></p>
+<p>Since Jalview 2.08, sequence features assigned to a sequence can be
+organised into groups, which may indicate that the features were all retrieved
+from the same database (such as Uniprot features), or generated by the
+same analysis process (as might be specified in a <a
+href="featuresFormat.html">sequence features file</a>).</p>
+<p><strong>Sequence Feature Inheritance</strong></p>
+<p>Since Jalview 2.08, sequence features are <em>global</em> to a set of
+sequences appearing (independently or together) in many different
+alignments. Practically, this means features loaded onto one alignment
+can be viewed in any alignments involving the same sequences. The same
+sequence appears in different alignments when a new alignment is
+generated by submitting an existing set of sequences to one of the
+alignment or prediction web services, and when sequences are copied
+and pasted into other alignment windows.</p>
+<p><strong>View→Show Sequence Features</strong></p>
+<p>Toggle the display of sequence features in this alignment. If
+feature retrieval has not already been carried out, then Jalview will
+automatically try to fetch sequence features (as described below).</p>
+<p><strong>View→Sequence Feature Settings...</strong></p>
+<p>Once sequence features have been loaded, their display can be fully controlled
+ using the alignment window's <a
+ href="featuresettings.html">Sequence Feature Settings</a> dialog box. Feature
+ colour schemes and display parameters are unique to a particular alignment,
+ so it is possible to colour the same sequence features differently in different
+ alignment views.<br>
+ Since Jalview 2.1, it is possible to add <a href="dassettings.html">DAS features</a>
+ to an alignment via the DAS tabbed pane of the feature settings window. </p>
+<p><strong>View→Sequence ID Tooltip→Show Non-Positional features</strong><br>
+ <em>Only available in application</em></br></p>
+<p>Toggles the display of non-positional features in the sequence ID tooltip,
+ and whether they will be included when sequence features are exported using
+ "File→Export Features".</p>
+<p>Precalculated Sequence Features may be added to an alignment from the command
+ line, drag and drop, or from the "File→Load Features / Annotations"
+ menu item. See the <a href="featuresFormat.html">Features File Format</a> for
+ more details.</p>
+</body>
+</html>
</td>
<td>
<ul>
- <li>Fetch DB References capabilities and UI expanded to support
- retrieval from DAS sequence sources</li>
- <li>Local DAS Sequence sources can be added via the command line
- or via the Add local source dialog box.</li>
- <li>Enable or disable non-positional feature and database
- references in sequence ID tooltip from View menu in application.</li>
- <li>Parsing of Dbref and DbxRef feature types as database
- references</li>
<li>URL links generated from description line for
regular-expression based URL links (applet and application)
<li>Non-positional feature URL links are shown in link menu</li>
<li>Linked viewing of nucleic acid sequences and structures</li>
<li>Automatic Scrolling option in View menu to display the
currently highlighted region of an alignment.</li>
- <li>Optionally scale multi-character column labels to fit within each column<!-- todo for applet --></li>
+ <li>Optionally scale multi-character column labels to fit within each column of annotation row<!-- todo for applet --></li>
<!-- introduced but not yet documented <li>Experimental blast report parser</li> -->
</ul>
<em>Vamsas Capabilities</em>
<ul>
- <li>
<li>Improved VAMSAS synchronization (jalview archive used to
preserve views, structures, and tree display settings)</li>
<li>Import of vamsas documents from disk or URL via command line</li>
</ul>
<em>Application</em>
<ul>
- <li>New hidden columns and rows and representatives capabilities
- in annotations file (in progress - not yet fully implemented)</li>
+ <li>Fetch DB References capabilities and UI expanded to support
+ retrieval from DAS sequence sources</li>
+ <li>Local DAS Sequence sources can be added via the command line
+ or via the Add local source dialog box.</li>
+ <li>DAS Dbref and DbxRef feature types are parsed as database
+ references and protein_name is parsed as description line (BioSapiens terms).</li>
+ <li>Enable or disable non-positional feature and database
+ references in sequence ID tooltip from View menu in application.</li>
+ <!-- <li>New hidden columns and rows and representatives capabilities
+ in annotations file (in progress - not yet fully implemented)</li> -->
<li>Order an alignment in order of average feature score or
total feature count</li>
<li>Shading features by score or associated description</li>
<ul>
<li>Source field in GFF files parsed as feature source rather
than description</li>
+ <li>Non-positional features are now included in sequence feature and gff files (controlled via non-positional feature visibility in tooltip).</li>
<li>URL links generated for all feature links (bugfix)</li>
<li>Added URL embedding instructions to features file
documentation.</li>
{\r
text = new FeaturesFile().printGFFFormat(ap.av.alignment\r
.getDataset().getSequencesArray(),\r
- getDisplayedFeatureCols());//ap.av.featuresDisplayed//);\r
+ getDisplayedFeatureCols(), true,ap.av.isShowNpFeats());//ap.av.featuresDisplayed//);\r
}\r
else\r
{\r
text = new FeaturesFile().printJalviewFormat(ap.av.alignment\r
.getDataset().getSequencesArray(),\r
- getDisplayedFeatureCols()); // ap.av.featuresDisplayed);\r
+ getDisplayedFeatureCols(), true,ap.av.isShowNpFeats()); // ap.av.featuresDisplayed);\r
}\r
}\r
else\r
if (GFFFormat.isSelected())\r
{\r
text = new FeaturesFile().printGFFFormat(ap.av.alignment\r
- .getDataset().getSequencesArray(), getDisplayedFeatureCols());\r
+ .getDataset().getSequencesArray(), getDisplayedFeatureCols(),true,ap.av.isShowNpFeats());\r
}\r
else\r
{\r
text = new FeaturesFile().printJalviewFormat(ap.av.alignment\r
- .getDataset().getSequencesArray(), getDisplayedFeatureCols());\r
+ .getDataset().getSequencesArray(), getDisplayedFeatureCols(),true,ap.av.isShowNpFeats());\r
}\r
}\r
else if (!features)\r
\r
/**\r
* generate a features file for seqs\r
- * \r
+ * includes non-pos features by default.\r
* @param seqs\r
* source of sequence features\r
* @param visible\r
*/\r
public String printJalviewFormat(SequenceI[] seqs, Hashtable visible)\r
{\r
- return printJalviewFormat(seqs, visible, true);\r
+ return printJalviewFormat(seqs, visible, true, true);\r
}\r
\r
/**\r
* hash of Colours for each feature type\r
* @param visOnly\r
* when true only feature types in 'visible' will be output\r
+ * @param nonpos\r
+ * indicates if non-positional features should be output (regardless of group or type)\r
* @return features file contents\r
*/\r
public String printJalviewFormat(SequenceI[] seqs, Hashtable visible,\r
- boolean visOnly)\r
+ boolean visOnly, boolean nonpos)\r
{\r
StringBuffer out = new StringBuffer();\r
SequenceFeature[] next;\r
-\r
- if (visOnly && (visible == null || visible.size() < 1))\r
+ boolean featuresGen=false;\r
+ if (visOnly && !nonpos && (visible==null || visible.size() < 1))\r
{\r
+ // no point continuing.\r
return "No Features Visible";\r
}\r
+\r
if (visible != null && visOnly)\r
{\r
// write feature colours only if we're given them and we are generating\r
// Work out which groups are both present and visible\r
Vector groups = new Vector();\r
int groupIndex = 0;\r
+ boolean isnonpos=false;\r
\r
for (int i = 0; i < seqs.length; i++)\r
{\r
{\r
for (int j = 0; j < next.length; j++)\r
{\r
- if (visOnly && !visible.containsKey(next[j].type))\r
+ isnonpos = next[j].begin==0 && next[j].end==0;\r
+ if ((!nonpos && isnonpos) || (!isnonpos && visOnly && !visible.containsKey(next[j].type)))\r
{\r
continue;\r
}\r
}\r
\r
String group = null;\r
-\r
do\r
{\r
\r
{\r
for (int j = 0; j < next.length; j++)\r
{\r
- if (visOnly && !visible.containsKey(next[j].type))\r
+ isnonpos = next[j].begin==0 && next[j].end==0;\r
+ if ((!nonpos && isnonpos) || (!isnonpos && visOnly && !visible.containsKey(next[j].type)))\r
{\r
+ // skip if feature is nonpos and we ignore them or if we only output visible and it isn't non-pos and it's not visible \r
continue;\r
}\r
\r
{\r
continue;\r
}\r
-\r
+ // we have features to output\r
+ featuresGen=true;\r
if (next[j].description == null\r
|| next[j].description.equals(""))\r
{\r
\r
} while (groupIndex < groups.size() + 1);\r
\r
+ if (!featuresGen)\r
+ {\r
+ return "No Features Visible";\r
+ }\r
+\r
return out.toString();\r
}\r
\r
+ /**\r
+ * generate a gff file for sequence features\r
+ * includes non-pos features by default.\r
+ * @param seqs\r
+ * @param visible\r
+ * @return\r
+ */\r
public String printGFFFormat(SequenceI[] seqs, Hashtable visible)\r
{\r
- return printGFFFormat(seqs, visible, true);\r
+ return printGFFFormat(seqs, visible, true, true);\r
}\r
\r
public String printGFFFormat(SequenceI[] seqs, Hashtable visible,\r
- boolean visOnly)\r
+ boolean visOnly, boolean nonpos)\r
{\r
StringBuffer out = new StringBuffer();\r
SequenceFeature[] next;\r
String source;\r
-\r
+ boolean isnonpos;\r
for (int i = 0; i < seqs.length; i++)\r
{\r
if (seqs[i].getSequenceFeatures() != null)\r
next = seqs[i].getSequenceFeatures();\r
for (int j = 0; j < next.length; j++)\r
{\r
- if (visOnly && visible != null\r
- && !visible.containsKey(next[j].type))\r
+ isnonpos = next[j].begin==0 && next[j].end==0;\r
+ if ((!nonpos && isnonpos) || (!isnonpos && visOnly && !visible.containsKey(next[j].type)))\r
{\r
continue;\r
}\r