2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
\r
3 * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
\r
5 * This file is part of Jalview.
\r
7 * Jalview is free software: you can redistribute it and/or
\r
8 * modify it under the terms of the GNU General Public License
\r
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
\r
11 * Jalview is distributed in the hope that it will be useful, but
\r
12 * WITHOUT ANY WARRANTY; without even the implied warranty
\r
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
\r
14 * PURPOSE. See the GNU General Public License for more details.
\r
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
\r
23 import javax.xml.parsers.ParserConfigurationException;
\r
25 import org.xml.sax.SAXException;
\r
27 import fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax;
\r
28 import fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed;
\r
29 import fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied;
\r
31 import jalview.analysis.SequenceIdMatcher;
\r
32 import jalview.datamodel.*;
\r
33 import jalview.schemes.*;
\r
34 import jalview.util.Format;
\r
37 * Parse and create Jalview Features files Detects GFF format features files and
\r
38 * parses. Does not implement standard print() - call specific printFeatures or
\r
39 * printGFF. Uses AlignmentI.findSequence(String id) to find the sequence object
\r
40 * for the features annotation - this normally works on an exact match.
\r
43 * @version $Revision$
\r
45 public class FeaturesFile extends AlignFile
\r
48 * work around for GFF interpretation bug where source string becomes
\r
49 * description rather than a group
\r
51 private boolean doGffSource = true;
\r
54 * Creates a new FeaturesFile object.
\r
56 public FeaturesFile()
\r
61 * Creates a new FeaturesFile object.
\r
68 * @throws IOException
\r
70 * @throws SAXException
\r
71 * @throws ParserConfigurationException
\r
72 * @throws ExceptionFileFormatOrSyntax
\r
73 * @throws ExceptionLoadingFailed
\r
74 * @throws ExceptionPermissionDenied
\r
76 public FeaturesFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
\r
78 super(inFile, type);
\r
81 public FeaturesFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
\r
87 * Parse GFF or sequence features file using case-independent matching, discarding URLs
\r
88 * @param align - alignment/dataset containing sequences that are to be annotated
\r
89 * @param colours - hashtable to store feature colour definitions
\r
90 * @param removeHTML - process html strings into plain text
\r
91 * @return true if features were added
\r
93 public boolean parse(AlignmentI align, Hashtable colours,
\r
96 return parse(align, colours, null, removeHTML, false);
\r
100 * Parse GFF or sequence features file optionally using case-independent matching, discarding URLs
\r
101 * @param align - alignment/dataset containing sequences that are to be annotated
\r
102 * @param colours - hashtable to store feature colour definitions
\r
103 * @param removeHTML - process html strings into plain text
\r
104 * @param relaxedIdmatching - when true, ID matches to compound sequence IDs are allowed
\r
105 * @return true if features were added
\r
107 public boolean parse(AlignmentI align,
\r
108 Hashtable colours, boolean removeHTML, boolean relaxedIdMatching)
\r
110 return parse(align, colours, null, removeHTML, relaxedIdMatching);
\r
114 * Parse GFF or sequence features file optionally using case-independent matching
\r
115 * @param align - alignment/dataset containing sequences that are to be annotated
\r
116 * @param colours - hashtable to store feature colour definitions
\r
117 * @param featureLink - hashtable to store associated URLs
\r
118 * @param removeHTML - process html strings into plain text
\r
119 * @return true if features were added
\r
121 public boolean parse(AlignmentI align, Hashtable colours,
\r
122 Hashtable featureLink, boolean removeHTML)
\r
124 return parse(align, colours, featureLink, removeHTML, false);
\r
129 * Parse GFF or sequence features file
\r
130 * @param align - alignment/dataset containing sequences that are to be annotated
\r
131 * @param colours - hashtable to store feature colour definitions
\r
132 * @param featureLink - hashtable to store associated URLs
\r
133 * @param removeHTML - process html strings into plain text
\r
134 * @param relaxedIdmatching - when true, ID matches to compound sequence IDs are allowed
\r
135 * @return true if features were added
\r
137 public boolean parse(AlignmentI align,
\r
138 Hashtable colours, Hashtable featureLink, boolean removeHTML, boolean relaxedIdmatching)
\r
141 String line = null;
\r
144 SequenceI seq = null;
\r
145 String type, desc, token = null;
\r
147 int index, start, end;
\r
149 StringTokenizer st;
\r
150 SequenceFeature sf;
\r
151 String featureGroup = null, groupLink = null;
\r
152 Hashtable typeLink = new Hashtable();
\r
154 * when true, assume GFF style features rather than Jalview style.
\r
156 boolean GFFFile = true;
\r
157 while ((line = nextLine()) != null)
\r
159 if (line.startsWith("#"))
\r
164 st = new StringTokenizer(line, "\t");
\r
165 if (st.countTokens() == 1)
\r
167 if (line.trim().equalsIgnoreCase("GFF"))
\r
169 // Start parsing file as if it might be GFF again.
\r
174 if (st.countTokens() > 1 && st.countTokens() < 4)
\r
177 type = st.nextToken();
\r
178 if (type.equalsIgnoreCase("startgroup"))
\r
180 featureGroup = st.nextToken();
\r
181 if (st.hasMoreElements())
\r
183 groupLink = st.nextToken();
\r
184 featureLink.put(featureGroup, groupLink);
\r
187 else if (type.equalsIgnoreCase("endgroup"))
\r
189 // We should check whether this is the current group,
\r
190 // but at present theres no way of showing more than 1 group
\r
192 featureGroup = null;
\r
197 Object colour = null;
\r
198 String colscheme = st.nextToken();
\r
199 if (colscheme.indexOf("|") > -1
\r
200 || colscheme.trim().equalsIgnoreCase("label"))
\r
202 // Parse '|' separated graduated colourscheme fields:
\r
203 // [label|][mincolour|maxcolour|[absolute|]minvalue|maxvalue|thresholdtype|thresholdvalue]
\r
204 // can either provide 'label' only, first is optional, next two
\r
205 // colors are required (but may be
\r
206 // left blank), next is optional, nxt two min/max are required.
\r
207 // first is either 'label'
\r
208 // first/second and third are both hexadecimal or word equivalent
\r
210 // next two are values parsed as floats.
\r
211 // fifth is either 'above','below', or 'none'.
\r
212 // sixth is a float value and only required when fifth is either
\r
213 // 'above' or 'below'.
\r
214 StringTokenizer gcol = new StringTokenizer(colscheme, "|",
\r
217 int threshtype = AnnotationColourGradient.NO_THRESHOLD;
\r
218 float min = Float.MIN_VALUE, max = Float.MAX_VALUE, threshval = Float.NaN;
\r
219 boolean labelCol = false;
\r
221 String mincol = gcol.nextToken();
\r
225 .println("Expected either 'label' or a colour specification in the line: "
\r
229 String maxcol = null;
\r
230 if (mincol.toLowerCase().indexOf("label") == 0)
\r
233 mincol = (gcol.hasMoreTokens() ? gcol.nextToken() : null); // skip
\r
235 mincol = (gcol.hasMoreTokens() ? gcol.nextToken() : null);
\r
237 String abso = null, minval, maxval;
\r
238 if (mincol != null)
\r
240 // at least four more tokens
\r
241 if (mincol.equals("|"))
\r
247 gcol.nextToken(); // skip next '|'
\r
249 // continue parsing rest of line
\r
250 maxcol = gcol.nextToken();
\r
251 if (maxcol.equals("|"))
\r
257 gcol.nextToken(); // skip next '|'
\r
259 abso = gcol.nextToken();
\r
260 gcol.nextToken(); // skip next '|'
\r
261 if (abso.toLowerCase().indexOf("abso") != 0)
\r
268 minval = gcol.nextToken();
\r
269 gcol.nextToken(); // skip next '|'
\r
271 maxval = gcol.nextToken();
\r
272 if (gcol.hasMoreTokens())
\r
274 gcol.nextToken(); // skip next '|'
\r
278 if (minval.length() > 0)
\r
280 min = new Float(minval).floatValue();
\r
282 } catch (Exception e)
\r
285 .println("Couldn't parse the minimum value for graduated colour for type ("
\r
287 + ") - did you misspell 'auto' for the optional automatic colour switch ?");
\r
288 e.printStackTrace();
\r
292 if (maxval.length() > 0)
\r
294 max = new Float(maxval).floatValue();
\r
296 } catch (Exception e)
\r
299 .println("Couldn't parse the maximum value for graduated colour for type ("
\r
300 + colscheme + ")");
\r
301 e.printStackTrace();
\r
306 // add in some dummy min/max colours for the label-only
\r
313 colour = new jalview.schemes.GraduatedColor(
\r
314 new UserColourScheme(mincol).findColour('A'),
\r
315 new UserColourScheme(maxcol).findColour('A'), min,
\r
317 } catch (Exception e)
\r
320 .println("Couldn't parse the graduated colour scheme ("
\r
321 + colscheme + ")");
\r
322 e.printStackTrace();
\r
324 if (colour != null)
\r
326 ((jalview.schemes.GraduatedColor) colour)
\r
327 .setColourByLabel(labelCol);
\r
328 ((jalview.schemes.GraduatedColor) colour)
\r
329 .setAutoScaled(abso == null);
\r
330 // add in any additional parameters
\r
331 String ttype = null, tval = null;
\r
332 if (gcol.hasMoreTokens())
\r
334 // threshold type and possibly a threshold value
\r
335 ttype = gcol.nextToken();
\r
336 if (ttype.toLowerCase().startsWith("below"))
\r
338 ((jalview.schemes.GraduatedColor) colour)
\r
339 .setThreshType(AnnotationColourGradient.BELOW_THRESHOLD);
\r
341 else if (ttype.toLowerCase().startsWith("above"))
\r
343 ((jalview.schemes.GraduatedColor) colour)
\r
344 .setThreshType(AnnotationColourGradient.ABOVE_THRESHOLD);
\r
348 ((jalview.schemes.GraduatedColor) colour)
\r
349 .setThreshType(AnnotationColourGradient.NO_THRESHOLD);
\r
350 if (!ttype.toLowerCase().startsWith("no"))
\r
353 .println("Ignoring unrecognised threshold type : "
\r
358 if (((GraduatedColor) colour).getThreshType() != AnnotationColourGradient.NO_THRESHOLD)
\r
363 tval = gcol.nextToken();
\r
364 ((jalview.schemes.GraduatedColor) colour)
\r
365 .setThresh(new Float(tval).floatValue());
\r
366 } catch (Exception e)
\r
369 .println("Couldn't parse threshold value as a float: ("
\r
371 e.printStackTrace();
\r
374 // parse the thresh-is-min token ?
\r
375 if (gcol.hasMoreTokens())
\r
378 .println("Ignoring additional tokens in parameters in graduated colour specification\n");
\r
379 while (gcol.hasMoreTokens())
\r
381 System.err.println("|" + gcol.nextToken());
\r
383 System.err.println("\n");
\r
389 UserColourScheme ucs = new UserColourScheme(colscheme);
\r
390 colour = ucs.findColour('A');
\r
392 if (colour != null)
\r
394 colours.put(type, colour);
\r
396 if (st.hasMoreElements())
\r
398 String link = st.nextToken();
\r
399 typeLink.put(type, link);
\r
400 if (featureLink == null)
\r
402 featureLink = new Hashtable();
\r
404 featureLink.put(type, link);
\r
410 while (st.hasMoreElements())
\r
415 // Still possible this is an old Jalview file,
\r
416 // which does not have type colours at the beginning
\r
417 seqId = token = st.nextToken();
\r
418 seq = findName(align, seqId, relaxedIdmatching);
\r
421 desc = st.nextToken();
\r
422 String group = null;
\r
423 if (doGffSource && desc.indexOf(' ') == -1)
\r
425 // could also be a source term rather than description line
\r
426 group = new String(desc);
\r
428 type = st.nextToken();
\r
431 String stt = st.nextToken();
\r
432 if (stt.length() == 0 || stt.equals("-"))
\r
438 start = Integer.parseInt(stt);
\r
440 } catch (NumberFormatException ex)
\r
446 String stt = st.nextToken();
\r
447 if (stt.length() == 0 || stt.equals("-"))
\r
453 end = Integer.parseInt(stt);
\r
455 } catch (NumberFormatException ex)
\r
459 // TODO: decide if non positional feature assertion for input data
\r
460 // where end==0 is generally valid
\r
463 // treat as non-positional feature, regardless.
\r
468 score = new Float(st.nextToken()).floatValue();
\r
469 } catch (NumberFormatException ex)
\r
474 sf = new SequenceFeature(type, desc, start, end, score, group);
\r
478 sf.setValue("STRAND", st.nextToken());
\r
479 sf.setValue("FRAME", st.nextToken());
\r
480 } catch (Exception ex)
\r
484 if (st.hasMoreTokens())
\r
486 StringBuffer attributes = new StringBuffer();
\r
487 while (st.hasMoreTokens())
\r
489 attributes.append("\t" + st.nextElement());
\r
491 // TODO validate and split GFF2 attributes field ? parse out
\r
492 // ([A-Za-z][A-Za-z0-9_]*) <value> ; and add as
\r
493 // sf.setValue(attrib, val);
\r
494 sf.setValue("ATTRIBUTES", attributes.toString());
\r
497 seq.addSequenceFeature(sf);
\r
498 while ((seq = align.findName(seq, seqId, true)) != null)
\r
500 seq.addSequenceFeature(new SequenceFeature(sf));
\r
506 if (GFFFile && seq == null)
\r
512 desc = st.nextToken();
\r
514 if (!st.hasMoreTokens())
\r
517 .println("DEBUG: Run out of tokens when trying to identify the destination for the feature.. giving up.");
\r
518 // in all probability, this isn't a file we understand, so bail
\r
523 token = st.nextToken();
\r
525 if (!token.equals("ID_NOT_SPECIFIED"))
\r
527 seq = findName(align, seqId = token, relaxedIdmatching);
\r
535 index = Integer.parseInt(st.nextToken());
\r
536 seq = align.getSequenceAt(index);
\r
537 } catch (NumberFormatException ex)
\r
545 System.out.println("Sequence not found: " + line);
\r
549 start = Integer.parseInt(st.nextToken());
\r
550 end = Integer.parseInt(st.nextToken());
\r
552 type = st.nextToken();
\r
554 if (!colours.containsKey(type))
\r
556 // Probably the old style groups file
\r
557 UserColourScheme ucs = new UserColourScheme(type);
\r
558 colours.put(type, ucs.findColour('A'));
\r
560 sf = new SequenceFeature(type, desc, "", start, end, featureGroup);
\r
561 if (st.hasMoreTokens())
\r
565 score = new Float(st.nextToken()).floatValue();
\r
566 // update colourgradient bounds if allowed to
\r
567 } catch (NumberFormatException ex)
\r
571 sf.setScore(score);
\r
573 if (groupLink != null && removeHTML)
\r
575 sf.addLink(groupLink);
\r
576 sf.description += "%LINK%";
\r
578 if (typeLink.containsKey(type) && removeHTML)
\r
580 sf.addLink(typeLink.get(type).toString());
\r
581 sf.description += "%LINK%";
\r
584 parseDescriptionHTML(sf, removeHTML);
\r
586 seq.addSequenceFeature(sf);
\r
588 while (seqId != null
\r
589 && (seq = align.findName(seq, seqId, false)) != null)
\r
591 seq.addSequenceFeature(new SequenceFeature(sf));
\r
593 // If we got here, its not a GFFFile
\r
598 } catch (Exception ex)
\r
600 System.out.println(line);
\r
601 System.out.println("Error parsing feature file: " + ex + "\n" + line);
\r
602 ex.printStackTrace(System.err);
\r
610 private AlignmentI lastmatchedAl = null;
\r
612 private SequenceIdMatcher matcher = null;
\r
615 * clear any temporary handles used to speed up ID matching
\r
617 private void resetMatcher()
\r
619 lastmatchedAl = null;
\r
623 private SequenceI findName(AlignmentI align, String seqId,
\r
624 boolean relaxedIdMatching)
\r
626 SequenceI match = null;
\r
627 if (relaxedIdMatching)
\r
629 if (lastmatchedAl != align)
\r
631 matcher = new SequenceIdMatcher(
\r
632 (lastmatchedAl = align).getSequencesArray());
\r
634 match = matcher.findIdMatch(seqId);
\r
638 match = align.findName(seqId, true);
\r
643 public void parseDescriptionHTML(SequenceFeature sf, boolean removeHTML)
\r
645 if (sf.getDescription() == null)
\r
649 jalview.util.ParseHtmlBodyAndLinks parsed = new jalview.util.ParseHtmlBodyAndLinks(sf.getDescription(), removeHTML, newline);
\r
651 sf.description = (removeHTML) ? parsed.getNonHtmlContent() : sf.description;
\r
652 for (String link:parsed.getLinks())
\r
660 * generate a features file for seqs includes non-pos features by default.
\r
663 * source of sequence features
\r
665 * hash of feature types and colours
\r
666 * @return features file contents
\r
668 public String printJalviewFormat(SequenceI[] seqs, Hashtable visible)
\r
670 return printJalviewFormat(seqs, visible, true, true);
\r
674 * generate a features file for seqs with colours from visible (if any)
\r
677 * source of features
\r
679 * hash of Colours for each feature type
\r
681 * when true only feature types in 'visible' will be output
\r
683 * indicates if non-positional features should be output (regardless
\r
684 * of group or type)
\r
685 * @return features file contents
\r
687 public String printJalviewFormat(SequenceI[] seqs, Hashtable visible,
\r
688 boolean visOnly, boolean nonpos)
\r
690 StringBuffer out = new StringBuffer();
\r
691 SequenceFeature[] next;
\r
692 boolean featuresGen = false;
\r
693 if (visOnly && !nonpos && (visible == null || visible.size() < 1))
\r
695 // no point continuing.
\r
696 return "No Features Visible";
\r
699 if (visible != null && visOnly)
\r
701 // write feature colours only if we're given them and we are generating
\r
703 // TODO: decide if feature links should also be written here ?
\r
704 Enumeration en = visible.keys();
\r
705 String type, color;
\r
706 while (en.hasMoreElements())
\r
708 type = en.nextElement().toString();
\r
710 if (visible.get(type) instanceof GraduatedColor)
\r
712 GraduatedColor gc = (GraduatedColor) visible.get(type);
\r
713 color = (gc.isColourByLabel() ? "label|" : "")
\r
714 + Format.getHexString(gc.getMinColor()) + "|"
\r
715 + Format.getHexString(gc.getMaxColor())
\r
716 + (gc.isAutoScale() ? "|" : "|abso|") + gc.getMin() + "|"
\r
717 + gc.getMax() + "|";
\r
718 if (gc.getThreshType() != AnnotationColourGradient.NO_THRESHOLD)
\r
720 if (gc.getThreshType() == AnnotationColourGradient.BELOW_THRESHOLD)
\r
726 if (gc.getThreshType() != AnnotationColourGradient.ABOVE_THRESHOLD)
\r
728 System.err.println("WARNING: Unsupported threshold type ("
\r
729 + gc.getThreshType() + ") : Assuming 'above'");
\r
734 color += "|" + gc.getThresh();
\r
741 else if (visible.get(type) instanceof java.awt.Color)
\r
743 color = Format.getHexString((java.awt.Color) visible.get(type));
\r
747 // legacy support for integer objects containing colour triplet values
\r
748 color = Format.getHexString(new java.awt.Color(Integer
\r
749 .parseInt(visible.get(type).toString())));
\r
754 out.append(newline);
\r
757 // Work out which groups are both present and visible
\r
758 Vector groups = new Vector();
\r
759 int groupIndex = 0;
\r
760 boolean isnonpos = false;
\r
762 for (int i = 0; i < seqs.length; i++)
\r
764 next = seqs[i].getSequenceFeatures();
\r
767 for (int j = 0; j < next.length; j++)
\r
769 isnonpos = next[j].begin == 0 && next[j].end == 0;
\r
770 if ((!nonpos && isnonpos)
\r
771 || (!isnonpos && visOnly && !visible
\r
772 .containsKey(next[j].type)))
\r
777 if (next[j].featureGroup != null
\r
778 && !groups.contains(next[j].featureGroup))
\r
780 groups.addElement(next[j].featureGroup);
\r
786 String group = null;
\r
790 if (groups.size() > 0 && groupIndex < groups.size())
\r
792 group = groups.elementAt(groupIndex).toString();
\r
793 out.append(newline);
\r
794 out.append("STARTGROUP\t");
\r
796 out.append(newline);
\r
803 for (int i = 0; i < seqs.length; i++)
\r
805 next = seqs[i].getSequenceFeatures();
\r
808 for (int j = 0; j < next.length; j++)
\r
810 isnonpos = next[j].begin == 0 && next[j].end == 0;
\r
811 if ((!nonpos && isnonpos)
\r
812 || (!isnonpos && visOnly && !visible
\r
813 .containsKey(next[j].type)))
\r
815 // skip if feature is nonpos and we ignore them or if we only
\r
816 // output visible and it isn't non-pos and it's not visible
\r
821 && (next[j].featureGroup == null || !next[j].featureGroup
\r
827 if (group == null && next[j].featureGroup != null)
\r
831 // we have features to output
\r
832 featuresGen = true;
\r
833 if (next[j].description == null
\r
834 || next[j].description.equals(""))
\r
836 out.append(next[j].type + "\t");
\r
840 if (next[j].links != null
\r
841 && next[j].getDescription().indexOf("<html>") == -1)
\r
843 out.append("<html>");
\r
846 out.append(next[j].description + " ");
\r
847 if (next[j].links != null)
\r
849 for (int l = 0; l < next[j].links.size(); l++)
\r
851 String label = next[j].links.elementAt(l).toString();
\r
852 String href = label.substring(label.indexOf("|") + 1);
\r
853 label = label.substring(0, label.indexOf("|"));
\r
855 if (next[j].description.indexOf(href) == -1)
\r
857 out.append("<a href=\"" + href + "\">" + label + "</a>");
\r
861 if (next[j].getDescription().indexOf("</html>") == -1)
\r
863 out.append("</html>");
\r
869 out.append(seqs[i].getName());
\r
870 out.append("\t-1\t");
\r
871 out.append(next[j].begin);
\r
873 out.append(next[j].end);
\r
875 out.append(next[j].type);
\r
876 if (next[j].score != Float.NaN)
\r
879 out.append(next[j].score);
\r
881 out.append(newline);
\r
888 out.append("ENDGROUP\t");
\r
890 out.append(newline);
\r
898 } while (groupIndex < groups.size() + 1);
\r
902 return "No Features Visible";
\r
905 return out.toString();
\r
909 * generate a gff file for sequence features includes non-pos features by
\r
916 public String printGFFFormat(SequenceI[] seqs, Hashtable visible)
\r
918 return printGFFFormat(seqs, visible, true, true);
\r
921 public String printGFFFormat(SequenceI[] seqs, Hashtable visible,
\r
922 boolean visOnly, boolean nonpos)
\r
924 StringBuffer out = new StringBuffer();
\r
925 SequenceFeature[] next;
\r
928 for (int i = 0; i < seqs.length; i++)
\r
930 if (seqs[i].getSequenceFeatures() != null)
\r
932 next = seqs[i].getSequenceFeatures();
\r
933 for (int j = 0; j < next.length; j++)
\r
935 isnonpos = next[j].begin == 0 && next[j].end == 0;
\r
936 if ((!nonpos && isnonpos)
\r
937 || (!isnonpos && visOnly && !visible
\r
938 .containsKey(next[j].type)))
\r
943 source = next[j].featureGroup;
\r
944 if (source == null)
\r
946 source = next[j].getDescription();
\r
949 out.append(seqs[i].getName());
\r
951 out.append(source);
\r
953 out.append(next[j].type);
\r
955 out.append(next[j].begin);
\r
957 out.append(next[j].end);
\r
959 out.append(next[j].score);
\r
962 if (next[j].getValue("STRAND") != null)
\r
964 out.append(next[j].getValue("STRAND"));
\r
972 if (next[j].getValue("FRAME") != null)
\r
974 out.append(next[j].getValue("FRAME"));
\r
980 // TODO: verify/check GFF - should there be a /t here before attribute
\r
983 if (next[j].getValue("ATTRIBUTES") != null)
\r
985 out.append(next[j].getValue("ATTRIBUTES"));
\r
988 out.append(newline);
\r
994 return out.toString();
\r
998 * this is only for the benefit of object polymorphism - method does nothing.
\r
1000 public void parse()
\r
1006 * this is only for the benefit of object polymorphism - method does nothing.
\r
1008 * @return error message
\r
1010 public String print()
\r
1012 return "USE printGFFFormat() or printJalviewFormat()";
\r