JAL-2805 added forester --> jalview sequence converter
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Tue, 9 Jan 2018 10:51:36 +0000 (10:51 +0000)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Tue, 9 Jan 2018 10:51:36 +0000 (10:51 +0000)
src/jalview/ext/forester/DataConversions.java

index ceeecde..74a94a6 100644 (file)
@@ -1,5 +1,6 @@
 package jalview.ext.forester;
 
+import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceI;
 import jalview.math.MatrixI;
 
@@ -40,6 +41,16 @@ public final class DataConversions
 
   }
 
+  public static SequenceI createJalviewSequence(
+          org.forester.phylogeny.data.Sequence foresterSeq)
+  {
+    String seq = foresterSeq.getMolecularSequence();
+    SequenceI jalviewSeq = new Sequence(foresterSeq.getName(), seq, 1,
+            seq.length() + 1);
+    return jalviewSeq;
+
+  }
+
 
   // public static org.forester.phylogeny.data.Accession
   // createForesterAccession(