From: b.stoever Date: Wed, 26 Oct 2016 15:31:21 +0000 (+0200) Subject: Merge branch 'LibrAlign' of https://dev.e-taxonomy.eu/git/taxeditor into LibrAlign X-Git-Tag: 4.5.0^2~38 X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/c80496ea537bd9c10955302bd56cde61c3d043d3 Merge branch 'LibrAlign' of https://dev.e-taxonomy.eu/git/taxeditor into LibrAlign # Conflicts: # eu.etaxonomy.taxeditor.molecular.lib/.classpath # eu.etaxonomy.taxeditor/rcp.target --- c80496ea537bd9c10955302bd56cde61c3d043d3 diff --cc .gitignore index a80633085,a80633085..05274d7b9 --- a/.gitignore +++ b/.gitignore @@@ -31,3 -31,3 +31,4 @@@ eu.etaxonomy.taxeditor.webapp/lib/cdmli /eu.etaxonomy.taxeditor.webapp/.settings/org.eclipse.m2e.core.prefs /eu.etaxonomy.taxeditor.webapp/lib/ ++/.ssh diff --cc eu.etaxonomy.taxeditor.molecular.lib/.classpath index f644516a5,cedc1756f..42448a1f3 --- a/eu.etaxonomy.taxeditor.molecular.lib/.classpath +++ b/eu.etaxonomy.taxeditor.molecular.lib/.classpath @@@ -7,15 -6,15 +6,16 @@@ + + + + - - - + + + ++ ++ ++ ++ diff --cc eu.etaxonomy.taxeditor.molecular.lib/META-INF/MANIFEST.MF index 22d225db3,414a0e99f..e6f15330f --- a/eu.etaxonomy.taxeditor.molecular.lib/META-INF/MANIFEST.MF +++ b/eu.etaxonomy.taxeditor.molecular.lib/META-INF/MANIFEST.MF @@@ -2,23 -2,22 +2,23 @@@ Manifest-Version: 1. Bundle-ManifestVersion: 2 Bundle-Name: eu.etaxonomy.taxeditor.molecular.lib Bundle-SymbolicName: eu.etaxonomy.taxeditor.molecular.lib;singleton:=true - Bundle-Version: 4.2.0.qualifier + Bundle-Version: 4.4.0.qualifier Bundle-ClassPath: ., lib/owlapi-xmlutils-4.1.4.jar, - lib/bioinfweb-commons-bio-2-SNAPSHOT.jar, - lib/bioinfweb-commons-core-2-SNAPSHOT.jar, - lib/bioinfweb-commons-swing-2-SNAPSHOT.jar, - lib/bioinfweb-commons-swt-2-SNAPSHOT.jar, - lib/jphyloio-core-0-SNAPSHOT.jar, - lib/libralign-biojava1-0-SNAPSHOT.jar, - lib/libralign-core-0-SNAPSHOT.jar, - lib/libralign-swt-0-SNAPSHOT.jar, - lib/tic-core-2-SNAPSHOT.jar, - lib/tic-swt-2-SNAPSHOT.jar, lib/commons-collections4-4.1.jar, lib/core-1.9.2.jar, - lib/sequencing-1.9.2.jar + lib/sequencing-1.9.2.jar, + lib/info.bioinfweb.commons.bio/bin/, + lib/info.bioinfweb.commons.core/bin/, + lib/info.bioinfweb.commons.swing/bin/, + lib/info.bioinfweb.commons.swt/bin/, - lib/info.bioinfweb.libralign.core/bin/, - lib/info.bioinfweb.libralign.io/bin/, - lib/info.bioinfweb.libralign.swt/bin/, + lib/info.bioinfweb.tic.core/bin/, + lib/info.bioinfweb.tic.swt/bin/, + lib/JPhyloIO/bin/, ++ lib/info.bioinfweb.libralign.core/bin/, ++ lib/info.bioinfweb.libralign.io/bin/, ++ lib/info.bioinfweb.libralign.swt/bin/, + lib/info.bioinfweb.libralign.biojava1/bin/ Export-Package: info.bioinfweb.commons, info.bioinfweb.commons.appversion, info.bioinfweb.commons.beans, diff --cc eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/AlignmentEditor.java index 90b983755,90b983755..12b1d8e5a --- a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/AlignmentEditor.java +++ b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/AlignmentEditor.java @@@ -134,7 -134,7 +134,7 @@@ public class AlignmentEditor extends Ed private MultipleAlignmentsContainer alignmentsContainer = null; -- private final Map cdmMap = new TreeMap(); //TODO Move this to ContigSequenceDataProvider ++ private final Map cdmMap = new TreeMap(); //TODO Move this to ContigSequenceDataProvider private boolean dirty = false; public AlignmentEditor() @@@ -275,12 -275,12 +275,12 @@@ } -- public boolean hasPherogram(int sequenceID) { ++ public boolean hasPherogram(String sequenceID) { return getReadsArea().getDataAreas().getSequenceAreas(sequenceID).size() > PHEROGRAM_AREA_INDEX; } -- public PherogramArea getPherogramArea(int sequenceID) { ++ public PherogramArea getPherogramArea(String sequenceID) { if (hasPherogram(sequenceID)) { return (PherogramArea)getReadsArea().getDataAreas().getSequenceAreas(sequenceID).get(PHEROGRAM_AREA_INDEX); } @@@ -307,7 -307,7 +307,7 @@@ // Add test consensus sequence: AlignmentModel consensusModel = getEditableConsensusArea().getAlignmentModel(); -- int id = consensusModel.addSequence(CONSENSUS_NAME); ++ String id = consensusModel.addSequence(CONSENSUS_NAME); Collection tokens = new ArrayList(); // First save tokens in a collection to avoid GUI updated for each token. tokens.add(consensusModel.getTokenSet().tokenByRepresentation("A")); tokens.add(consensusModel.getTokenSet().tokenByRepresentation("C")); @@@ -332,7 -332,7 +332,7 @@@ if (pherogramInfo.getPherogram() != null) { uri = MediaUtils.getFirstMediaRepresentationPart(pherogramInfo.getPherogram()).getUri(); } -- int id = addRead(DerivateLabelProvider.getDerivateText(pherogramInfo, conversationHolder), ++ String id = addRead(DerivateLabelProvider.getDerivateText(pherogramInfo, conversationHolder), uri, singleReadAlignment.isReverseComplement(), singleReadAlignment.getEditedSequence(), @@@ -350,7 -350,7 +350,7 @@@ // Set consensus sequence: AlignmentModel consensusProvider = getEditableConsensusArea().getAlignmentModel(); -- int id = consensusProvider.addSequence(CONSENSUS_NAME); ++ String id = consensusProvider.addSequence(CONSENSUS_NAME); consensusProvider.insertTokensAt(id, 0, AlignmentModelUtils.charSequenceToTokenList( sequenceNode.getConsensusSequence().getString(), consensusProvider.getTokenSet())); //TODO Can the consensus sequence also be null? / Should it be created here, if nothing is in the DB? @@@ -439,9 -439,9 +439,9 @@@ // Write single reads: stringProvider.setUnderlyingModel(getReadsArea().getAlignmentModel()); sequenceNode.getSingleReadAlignments().retainAll(cdmMap.values()); // Remove all reads that are not in the alignment anymore. -- Iterator iterator = getReadsArea().getAlignmentModel().sequenceIDIterator(); ++ Iterator iterator = getReadsArea().getAlignmentModel().sequenceIDIterator(); while (iterator.hasNext()) { -- int id = iterator.next(); ++ String id = iterator.next(); SingleReadAlignment singleRead = cdmMap.get(id); if (singleRead == null) { throw new InternalError("Creating new reads from AlignmentEditor not implemented."); @@@ -587,7 -587,7 +587,7 @@@ SelectionModel selection = getReadsArea().getSelection(); AlignmentModel model = getReadsArea().getAlignmentModel(); for (int row = selection.getFirstRow(); row < selection.getFirstRow() + selection.getCursorHeight(); row++) { -- int sequenceID = getReadsArea().getSequenceOrder().idByIndex(row); ++ String sequenceID = getReadsArea().getSequenceOrder().idByIndex(row); PherogramArea area = getPherogramArea(sequenceID); PherogramAreaModel pherogramAlignmentModel = area.getModel(); AlignmentModelUtils.reverseComplement(model, sequenceID, @@@ -608,7 -608,7 +608,7 @@@ public void createConsensusSequence() { ConsensusSequenceArea area = getConsensusHintDataArea(); AlignmentModel model = (AlignmentModel)getEditableConsensusArea().getAlignmentModel(); -- int sequenceID = model.sequenceIDIterator().next(); // There is always one sequence contained. ++ String sequenceID = model.sequenceIDIterator().next(); // There is always one sequence contained. int length = getReadsArea().getAlignmentModel().getMaxSequenceLength(); Collection tokens = new ArrayList(length); @@@ -630,7 -630,7 +630,7 @@@ ConsensusSequenceArea area = getConsensusHintDataArea(); AlignmentModel model = (AlignmentModel)getEditableConsensusArea().getAlignmentModel(); TokenSet tokenSet = model.getTokenSet(); -- int sequenceID = model.sequenceIDIterator().next(); // There is always one sequence contained. ++ String sequenceID = model.sequenceIDIterator().next(); // There is always one sequence contained. int currentConsensusLength = model.getSequenceLength(sequenceID); int overallLength = getReadsArea().getAlignmentModel().getMaxSequenceLength(); @@@ -670,9 -670,9 +670,7 @@@ private String newReadName() { int index = 1; -- while (getReadsArea().getAlignmentModel().sequenceIDByName(DEFAULT_READ_NAME_PREFIX + index) -- != AlignmentModel.NO_SEQUENCE_FOUND) { -- ++ while (getReadsArea().getAlignmentModel().sequenceIDByName(DEFAULT_READ_NAME_PREFIX + index) != null) { index++; } return DEFAULT_READ_NAME_PREFIX + index; @@@ -701,7 -701,7 +699,7 @@@ * @throws IOException if an error occurred when trying to read the pherogram file * @throws UnsupportedChromatogramFormatException if the format of the pherogram file is not supported */ -- public int addRead(String name, URI pherogramURI, boolean reverseComplemented, String editedSequence, ++ public String addRead(String name, URI pherogramURI, boolean reverseComplemented, String editedSequence, Integer firstSeqPos, Integer leftCutPos, Integer rightCutPos, SingleReadAlignment.Shift[] shifts) throws IOException, UnsupportedChromatogramFormatException { @@@ -716,7 -716,7 +714,7 @@@ // Create sequence: provider.addSequence(name); -- int id = provider.sequenceIDByName(name); ++ String id = provider.sequenceIDByName(name); // Set edited sequence: Collection tokens = null; // First save tokens in a collection to avoid GUI updated for each token. diff --cc eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/AbstractPherogramComponentHandler.java index 55c24e32a,55c24e32a..b0bf979c5 --- a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/AbstractPherogramComponentHandler.java +++ b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/AbstractPherogramComponentHandler.java @@@ -41,7 -41,7 +41,7 @@@ public abstract class AbstractPherogram if (activePart instanceof AlignmentEditor) { AlignmentEditor editor = (AlignmentEditor)activePart; -- Iterator idIterator = editor.getReadsArea().getAlignmentModel().sequenceIDIterator(); ++ Iterator idIterator = editor.getReadsArea().getAlignmentModel().sequenceIDIterator(); while (idIterator.hasNext()) { PherogramArea area = editor.getPherogramArea(idIterator.next()); if (area != null) { diff --cc eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/AlignmentEditorPasteHandler.java index 590aab56c,590aab56c..982058030 --- a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/AlignmentEditorPasteHandler.java +++ b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/AlignmentEditorPasteHandler.java @@@ -30,10 -30,10 +30,11 @@@ import eu.etaxonomy.taxeditor.molecular * @date 26.08.2015 */ public class AlignmentEditorPasteHandler extends AbstractFocusedAlignmentAreaHandler implements IElementUpdater { -- private void pasteString(AlignmentArea area, int sequenceID, String content) { ++ private void pasteString(AlignmentArea area, String sequenceID, String content) { area.getActionProvider().deleteSelection(); // Overwrite selected tokens. area.getActionProvider().elongateSequence(sequenceID, area.getSelection().getCursorColumn()); ++ @SuppressWarnings("unchecked") AlignmentModel alignmentModel = (AlignmentModel)area.getAlignmentModel(); alignmentModel.insertTokensAt(sequenceID, area.getSelection().getCursorColumn(), AlignmentModelUtils.charSequenceToTokenList(content, alignmentModel.getTokenSet(), @@@ -62,7 -62,7 +63,7 @@@ if (!lines.isEmpty()) { //TODO Can lines be empty? (Can an empty string "" be copied to the clipboard?) if (selection.getCursorHeight() == 1) { // If the consensus sequence is focused, this is the only possible case. -- int sequenceID = focusedArea.getSequenceOrder().idByIndex(selection.getCursorRow()); ++ String sequenceID = focusedArea.getSequenceOrder().idByIndex(selection.getCursorRow()); if (lines.size() == 1) { pasteString(focusedArea, sequenceID, lines.get(0)); } diff --cc eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product index 441c29d34,e0c70a98b..41c429529 --- a/eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product +++ b/eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product @@@ -1,39 -1,39 +1,58 @@@ -- - - -- -- -- -- %productBlurb -- -- -- -- -- -data @user.home/.cdmLibrary -Dserver_port=58080 -- -- -Xmx512M -XX:MaxPermSize=256M -Dorg.eclipse.update.reconcile=false -Declipse.p2.unsignedPolicy=allow -- -- -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ++ ++ ++ ++ ++ ++ ++ ++ ++ %productBlurb ++ ++ ++ ++ ++ ++ ++ ++ -data @user.home/.cdmLibrary -Dserver_port=58080 ++ ++ -Xmx512M -XX:MaxPermSize=256M -Dorg.eclipse.update.reconcile=false -Declipse.p2.unsignedPolicy=allow ++ ++ -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ diff --cc eu.etaxonomy.taxeditor/rcp.target index 2ab0ba60b,ac61176b3..870c330f0 --- a/eu.etaxonomy.taxeditor/rcp.target +++ b/eu.etaxonomy.taxeditor/rcp.target @@@ -1,31 -1,31 +1,31 @@@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - + + + + + + +