X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fio%2FStockholmFile.java;h=e7b1c6e21af5e029d5ab8be3d920c9349f037b1d;hb=ce886100c1eae01eac7d59c961e694f4493d4bcb;hp=dedbd440d9ac5c31d17f25f3ff06f5665a0acc2a;hpb=0812da43d6b8d673aa25d2d7a7c5f65aab1b1642;p=jalview.git diff --git a/src/jalview/io/StockholmFile.java b/src/jalview/io/StockholmFile.java index dedbd44..e7b1c6e 100644 --- a/src/jalview/io/StockholmFile.java +++ b/src/jalview/io/StockholmFile.java @@ -31,9 +31,15 @@ import jalview.datamodel.*; /** * This class is supposed to parse a Stockholm format file into Jalview - * + * There are TODOs in this class: we do not know what the database source and + * version is for the file when parsing the #GS= AC tag which associates accessions + * with sequences. + * Database references are also not parsed correctly: a separate reference string + * parser must be added to parse the database reference form into Jalview's local + * representation. * @author bsb at sanger.ac.uk - * @version 0.3 + * @version 0.3 + jalview mods + * */ public class StockholmFile extends AlignFile { @@ -158,9 +164,8 @@ public class StockholmFile extends AlignFile { String src = dbr.substring(0, dbr.indexOf(";")); String acn = dbr.substring(dbr.indexOf(";") + 1); - DBRefEntry dbref = new DBRefEntry(jalview.util.DBRefUtils - .getCanonicalName(src), acn, ""); - seqO.addDBRef(dbref); + jalview.util.DBRefUtils.parseToDbRef(seqO, src, "0", acn); + //seqO.addDBRef(dbref); } } Hashtable features = null; @@ -493,7 +498,7 @@ public class StockholmFile extends AlignFile if (annot == null) { annot = new AlignmentAnnotation(type, type, els); - annotation.add(annot); + annotation.addElement(annot); } else {