Adjustments to recent changes in LibrAlign.
authorb.stoever <b.stoever@localhost>
Thu, 2 Jul 2015 11:11:16 +0000 (11:11 +0000)
committerb.stoever <b.stoever@localhost>
Thu, 2 Jul 2015 11:11:16 +0000 (11:11 +0000)
(The additional project https://secure.bioinfweb.info/Code/svn/LibrAlign / trunk / main / info.bioinfweb.libralign.biojava1 needs to be in the workspace from now on.)

.gitattributes
eu.etaxonomy.taxeditor.editor/.classpath
eu.etaxonomy.taxeditor.editor/.project
eu.etaxonomy.taxeditor.editor/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.editor/build.properties
eu.etaxonomy.taxeditor.editor/lib/biojava3-alignment-3.0.7.jar [deleted file]
eu.etaxonomy.taxeditor.editor/lib/biojava3-core-3.0.7.jar [deleted file]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/molecular/AlignmentEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/molecular/CDMAlignmentObjectPlaceholder.java [deleted file]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/molecular/ContigSequenceDataProvider.java [deleted file]

index 8c999eb..3bddeb6 100644 (file)
@@ -376,8 +376,6 @@ eu.etaxonomy.taxeditor.editor/icons/pherogram-insert-left-disabled-16x16.png -te
 eu.etaxonomy.taxeditor.editor/icons/pherogram-insert-right-16x16.png -text
 eu.etaxonomy.taxeditor.editor/icons/pherogram-insert-right-disabled-16x16.png -text
 eu.etaxonomy.taxeditor.editor/icons/xper64.png -text
-eu.etaxonomy.taxeditor.editor/lib/biojava3-alignment-3.0.7.jar -text
-eu.etaxonomy.taxeditor.editor/lib/biojava3-core-3.0.7.jar -text
 eu.etaxonomy.taxeditor.editor/lib/commons-lang3-3.1.jar -text
 eu.etaxonomy.taxeditor.editor/lib/core-1.8.5.jar -text
 eu.etaxonomy.taxeditor.editor/lib/sequencing-1.8.5.jar -text
@@ -461,8 +459,6 @@ eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/po
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/RefreshNodeNumberingOperation.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/molecular/AlignmentEditor.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/molecular/AlignmentEditorInput.java -text
-eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/molecular/CDMAlignmentObjectPlaceholder.java -text
-eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/molecular/ContigSequenceDataProvider.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/molecular/PherogramMouseListener.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/molecular/PherogramViewPart.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/TaxonNameEditor.java -text
index f227f6c..9fcc457 100644 (file)
@@ -5,8 +5,6 @@
        <classpathentry including="**/*.java" kind="src" path="src/main/java"/>\r
        <classpathentry including="**/*.java" kind="src" path="src/test/java"/>\r
        <classpathentry excluding="**/*.java" kind="src" path="src/main/resources"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/biojava3-alignment-3.0.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/biojava3-core-3.0.7.jar"/>\r
        <classpathentry exported="true" kind="lib" path="lib/core-1.8.5.jar"/>\r
        <classpathentry exported="true" kind="lib" path="lib/sequencing-1.8.5.jar"/>\r
        <classpathentry exported="true" kind="lib" path="lib/bioinfweb.commons"/>\r
@@ -16,5 +14,6 @@
        <classpathentry exported="true" kind="lib" path="lib/info.bioinfweb.libralign.swt"/>\r
        <classpathentry exported="true" kind="lib" path="lib/info.bioinfweb.tic.core"/>\r
        <classpathentry exported="true" kind="lib" path="lib/info.bioinfweb.tic.swt"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/info.bioinfweb.libralign.biojava1"/>\r
        <classpathentry kind="output" path="target/classes"/>\r
 </classpath>\r
index 18951eb..d3dac54 100644 (file)
                        <locationURI>WORKSPACE_LOC/_Lib/bin</locationURI>\r
                </link>\r
                <link>\r
+                       <name>lib/info.bioinfweb.libralign.biojava1</name>\r
+                       <type>2</type>\r
+                       <locationURI>WORKSPACE_LOC/info.bioinfweb.libralign.biojava1/bin</locationURI>\r
+               </link>\r
+               <link>\r
                        <name>lib/info.bioinfweb.libralign.core</name>\r
                        <type>2</type>\r
                        <locationURI>WORKSPACE_LOC/info.bioinfweb.libralign.core/bin</locationURI>\r
index 30660ab..c248ae6 100644 (file)
@@ -178,8 +178,6 @@ Bundle-ClassPath: .,
  pdebuild.jar,
  compatibility.jar,
  junit.jar,
- lib/biojava3-alignment-3.0.7.jar,
- lib/biojava3-core-3.0.7.jar,
  lib/core-1.8.5.jar,
  lib/sequencing-1.8.5.jar,
  lib/bioinfweb.commons/,
@@ -188,4 +186,5 @@ Bundle-ClassPath: .,
  lib/info.bioinfweb.libralign.core/,
  lib/info.bioinfweb.libralign.swt/,
  lib/info.bioinfweb.tic.core/,
- lib/info.bioinfweb.tic.swt/
+ lib/info.bioinfweb.tic.swt/,
+ lib/info.bioinfweb.libralign.biojava1/
index efa5396..7450721 100644 (file)
@@ -7,8 +7,6 @@ bin.includes = META-INF/,\
                p2.inf,\
                OSGI-INF/l10n/plugin.properties,\
                OSGI-INF/l10n/plugin_de.properties,\
-               lib/biojava3-alignment-3.0.7.jar,\
-               lib/biojava3-core-3.0.7.jar,\
                lib/core-1.8.5.jar,\
                lib/sequencing-1.8.5.jar,\
                lib/bioinfweb.commons/,\
@@ -17,4 +15,5 @@ bin.includes = META-INF/,\
                lib/info.bioinfweb.libralign.core/,\
                lib/info.bioinfweb.libralign.swt/,\
                lib/info.bioinfweb.tic.core/,\
-               lib/info.bioinfweb.tic.swt/
+               lib/info.bioinfweb.tic.swt/,\
+               lib/info.bioinfweb.libralign.biojava1/
diff --git a/eu.etaxonomy.taxeditor.editor/lib/biojava3-alignment-3.0.7.jar b/eu.etaxonomy.taxeditor.editor/lib/biojava3-alignment-3.0.7.jar
deleted file mode 100644 (file)
index e5f1d6b..0000000
Binary files a/eu.etaxonomy.taxeditor.editor/lib/biojava3-alignment-3.0.7.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.editor/lib/biojava3-core-3.0.7.jar b/eu.etaxonomy.taxeditor.editor/lib/biojava3-core-3.0.7.jar
deleted file mode 100644 (file)
index c9f1f81..0000000
Binary files a/eu.etaxonomy.taxeditor.editor/lib/biojava3-core-3.0.7.jar and /dev/null differ
index 9ccc826..0308fe9 100644 (file)
@@ -10,7 +10,6 @@
 package eu.etaxonomy.taxeditor.editor.molecular;
 
 
-import info.bioinfweb.jphyloio.events.TokenSetType;
 import info.bioinfweb.libralign.alignmentarea.AlignmentArea;
 import info.bioinfweb.libralign.alignmentarea.selection.SelectionModel;
 import info.bioinfweb.libralign.alignmentarea.tokenpainter.NucleotideTokenPainter;
@@ -27,7 +26,7 @@ import info.bioinfweb.libralign.model.events.SequenceChangeEvent;
 import info.bioinfweb.libralign.model.events.SequenceRenamedEvent;
 import info.bioinfweb.libralign.model.events.TokenChangeEvent;
 import info.bioinfweb.libralign.model.implementations.PackedAlignmentModel;
-import info.bioinfweb.libralign.model.tokenset.BioJavaTokenSet;
+import info.bioinfweb.libralign.model.tokenset.CharacterTokenSet;
 import info.bioinfweb.libralign.model.tokenset.TokenSet;
 import info.bioinfweb.libralign.multiplealignments.AlignmentAreaList;
 import info.bioinfweb.libralign.multiplealignments.MultipleAlignmentsContainer;
@@ -51,8 +50,6 @@ import java.util.TreeMap;
 
 import org.biojava.bio.chromatogram.ChromatogramFactory;
 import org.biojava.bio.chromatogram.UnsupportedChromatogramFormatException;
-import org.biojava3.core.sequence.compound.DNACompoundSet;
-import org.biojava3.core.sequence.compound.NucleotideCompound;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
@@ -180,9 +177,8 @@ public class AlignmentEditor extends EditorPart {
                AlignmentArea result = new AlignmentArea(container);
                result.setAllowVerticalScrolling(allowVerticalScrolling);
 
-               TokenSet<NucleotideCompound> tokenSet = new BioJavaTokenSet<NucleotideCompound>(
-                               TokenSetType.DNA, new DNACompoundSet(), true);  //TODO Should NUCLEOTIDE be used instead?
-               AlignmentModel<NucleotideCompound> provider = new PackedAlignmentModel<NucleotideCompound>(tokenSet);
+               CharacterTokenSet tokenSet = CharacterTokenSet.newDNAInstance();  //TODO Should NUCLEOTIDE be used instead?
+               AlignmentModel<Character> provider = new PackedAlignmentModel<Character>(tokenSet);
                result.setAlignmentModel(provider, false);
                provider.getChangeListeners().add(DIRTY_LISTENER);
                result.getPaintSettings().getTokenPainterList().set(0, new NucleotideTokenPainter());
@@ -262,10 +258,10 @@ public class AlignmentEditor extends EditorPart {
                        AlignmentModel consensusModel = getEditableConsensusArea().getAlignmentModel();
                        int id = consensusModel.addSequence(CONSENSUS_NAME);
                        Collection<Object> tokens = new ArrayList<Object>();  // First save tokens in a collection to avoid GUI updated for each token.
-                       tokens.add(consensusModel.getTokenSet().tokenByKeyChar('A'));
-                       tokens.add(consensusModel.getTokenSet().tokenByKeyChar('C'));
-                       tokens.add(consensusModel.getTokenSet().tokenByKeyChar('G'));
-                       tokens.add(consensusModel.getTokenSet().tokenByKeyChar('T'));
+                       tokens.add(consensusModel.getTokenSet().tokenByRepresentation("A"));
+                       tokens.add(consensusModel.getTokenSet().tokenByRepresentation("C"));
+                       tokens.add(consensusModel.getTokenSet().tokenByRepresentation("G"));
+                       tokens.add(consensusModel.getTokenSet().tokenByRepresentation("T"));
                        consensusModel.insertTokensAt(id, 0, tokens);
                }
                catch (Exception e) {
@@ -635,7 +631,7 @@ public class AlignmentEditor extends EditorPart {
 
 
     public void addRead(URI pherogramURI, boolean reverseComplemented) throws IOException, UnsupportedChromatogramFormatException {
-       addRead(newReadName(), pherogramURI, reverseComplemented, null, 0, 0, 0, null);  // Position values will be ignored, if shifts == null.
+       addRead(newReadName(), pherogramURI, reverseComplemented, null, null, null, null, null);
     }
 
 
@@ -681,8 +677,8 @@ public class AlignmentEditor extends EditorPart {
                else if (pherogramProvider != null) {  // Copy base call sequence into alignment:
                        tokens = new ArrayList<Object>();
                        for (int i = 0; i < pherogramProvider.getSequenceLength(); i++) {
-                               tokens.add(provider.getTokenSet().tokenByKeyChar(
-                                       pherogramProvider.getBaseCall(i).getUpperedBase().charAt(0)));
+                               tokens.add(provider.getTokenSet().tokenByRepresentation(
+                                       Character.toString(pherogramProvider.getBaseCall(i))));
                        }
                        setDirty();
                }
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/molecular/CDMAlignmentObjectPlaceholder.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/molecular/CDMAlignmentObjectPlaceholder.java
deleted file mode 100644 (file)
index 8cd3edb..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-package eu.etaxonomy.taxeditor.editor.molecular;\r
-\r
-\r
-import info.bioinfweb.libralign.pherogram.model.ShiftChange;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.TreeMap;\r
-\r
-import org.biojava3.core.sequence.compound.NucleotideCompound;\r
-import org.biojava3.core.sequence.template.Sequence;\r
-\r
-\r
-\r
-/**\r
- * This class is used as a replacement for a class representing the CMD objects storing an contig alignment during early\r
- * development phase.\r
- *\r
- * @author Ben Stöver\r
- * @date 06.08.2014\r
- */\r
-public class CDMAlignmentObjectPlaceholder {\r
-       /**\r
-        * Represents information in the contig alignment describing a single read sequence and the relation to its associated\r
-        * pherogram.\r
-        *\r
-        * @author Ben Stöver\r
-     * @date 06.08.2014\r
-        */\r
-       public static class Read {\r
-               private long pherogramObjectID = Long.MIN_VALUE;  // The ID used in the CMD to identify the object storing the pherogram URL. (Dont' know if this is long, just as an example-)\r
-               private final Sequence<NucleotideCompound> editableSequence = null;  // Could also be of type String, if helpful for CDM architecture.\r
-               private final List<ShiftChange> shiftChangeList = new ArrayList<ShiftChange>();\r
-               private String readName = "";\r
-               private boolean reverseComplemeted = false;\r
-\r
-\r
-               public Read(long pherogramObjectID) {\r
-                       super();\r
-                       this.pherogramObjectID = pherogramObjectID;\r
-               }\r
-\r
-\r
-               public long getPherogramObjectID() {\r
-                       return pherogramObjectID;\r
-               }\r
-\r
-\r
-               public void setPherogramObjectID(long pherogramObjectID) {\r
-                       this.pherogramObjectID = pherogramObjectID;\r
-               }\r
-\r
-\r
-               public List<ShiftChange> getShiftChangeList() {\r
-                       return shiftChangeList;\r
-               }\r
-\r
-\r
-               public Sequence<NucleotideCompound> getEditableSequence() {\r
-                       return editableSequence;\r
-               }\r
-\r
-\r
-               public String getReadName() {\r
-                       return readName;\r
-               }\r
-\r
-\r
-               public void setReadName(String readName) {\r
-                       this.readName = readName;\r
-               }\r
-\r
-\r
-               public boolean isReverseComplemeted() {\r
-                       return reverseComplemeted;\r
-               }\r
-\r
-\r
-               public void setReverseComplemeted(boolean reverseComplemeted) {\r
-                       this.reverseComplemeted = reverseComplemeted;\r
-               }\r
-       }\r
-\r
-\r
-       private final Map<String, Sequence<NucleotideCompound>> consensusSequences = new TreeMap<String, Sequence<NucleotideCompound>>();    // Could also be of type Map<String, String>, if helpful for CDM architecture.\r
-       private final Map<Long, Read> readSequences = new TreeMap<Long, Read>();\r
-\r
-\r
-       public Map<String, Sequence<NucleotideCompound>> getConsensusSequences() {\r
-               return consensusSequences;\r
-       }\r
-\r
-\r
-       public Map<Long, Read> getReadSequences() {\r
-               return readSequences;\r
-       }\r
-}\r
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/molecular/ContigSequenceDataProvider.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/molecular/ContigSequenceDataProvider.java
deleted file mode 100644 (file)
index 2139f62..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-// $Id$\r
-/**\r
-* Copyright (C) 2014 EDIT\r
-* European Distributed Institute of Taxonomy\r
-* http://www.e-taxonomy.eu\r
-*\r
-* The contents of this file are subject to the Mozilla Public License Version 1.1\r
-* See LICENSE.TXT at the top of this package for the full license terms.\r
-*/\r
-package eu.etaxonomy.taxeditor.editor.molecular;\r
-\r
-\r
-import org.biojava3.core.sequence.compound.NucleotideCompound;\r
-\r
-import info.bioinfweb.commons.bio.biojava3.core.sequence.compound.AlignmentAmbiguityDNACompoundSet;\r
-import info.bioinfweb.jphyloio.events.TokenSetType;\r
-import info.bioinfweb.libralign.model.AlignmentModel;\r
-import info.bioinfweb.libralign.model.implementations.PackedAlignmentModel;\r
-import info.bioinfweb.libralign.model.tokenset.BioJavaTokenSet;\r
-\r
-\r
-\r
-/**\r
- * The LibrAlign sequence data provider used to edit contig alignments with the {@link AlignmentEditor}.\r
- * \r
- * @author Ben Stöver\r
- * @date 04.08.2014\r
- */\r
-public class ContigSequenceDataProvider extends PackedAlignmentModel<NucleotideCompound> \r
-        implements AlignmentModel<NucleotideCompound> {\r
-\r
-       \r
-       public ContigSequenceDataProvider() {\r
-               super(new BioJavaTokenSet<NucleotideCompound>(TokenSetType.NUCLEOTIDE, \r
-                               AlignmentAmbiguityDNACompoundSet.getAlignmentAmbiguityDNACompoundSet(), true));\r
-       }\r
-       \r
-       \r
-       public void saveToCMD() {  //TODO Add cmd node as parameter  \r
-               //TODO impl.\r
-       }\r
-       \r
-       \r
-       public void loadFromCMD() {  //TODO Add cmd node as parameter\r
-               //TODO impl.\r
-       }\r
-}\r