From eee996a6476a1e3d84c07f8f690dcde3ff4b2ef5 Mon Sep 17 00:00:00 2001 From: "cmzmasek@gmail.com" Date: Thu, 3 Mar 2011 18:37:12 +0000 Subject: [PATCH] clean up --- .../analysis/AncestralTaxonomyInference.java | 704 ++++++++++---------- .../java/src/org/forester/application/confadd.java | 13 +- .../org/forester/application/count_support.java | 17 +- .../src/org/forester/application/decorator.java | 12 +- .../org/forester/application/get_distances.java | 4 +- .../java/src/org/forester/application/goac.java | 4 +- .../java/src/org/forester/application/nhx_too.java | 4 +- forester/java/src/org/forester/application/nj.java | 4 +- .../src/org/forester/application/obo_tool.java | 4 +- .../java/src/org/forester/application/pccx.java | 4 +- .../forester/application/pfam2go_extractor.java | 4 +- .../java/src/org/forester/application/pfam_go.java | 4 +- .../src/org/forester/application/pfamacc2go.java | 4 +- .../org/forester/application/pfamacc2pfamid.java | 4 +- .../forester/application/phyloxml_converter.java | 66 +- .../org/forester/application/printAllSpecies.java | 4 +- .../org/forester/application/printSameOrder.java | 4 +- .../java/src/org/forester/application/rio.java | 4 +- .../java/src/org/forester/application/sdi.java | 14 +- .../java/src/org/forester/application/sdi_dir.java | 4 +- .../java/src/org/forester/application/sdi_r.java | 22 +- .../java/src/org/forester/application/sdix.java | 20 +- .../application/simple_node_processor.java | 4 +- .../java/src/org/forester/application/strip.java | 4 +- .../forester/application/support_statistics.java | 4 +- .../org/forester/application/support_transfer.java | 8 +- .../src/org/forester/application/surf_paup.java | 18 +- .../src/org/forester/application/surfacing.java | 67 +- .../forester/application/surfacing_hmmpfam.java | 74 +- .../org/forester/application/surfacing_old.java | 69 +- forester/java/src/org/forester/application/ta.java | 14 +- .../archaeopteryx/AncestralTaxonomyInferrer.java | 4 +- .../org/forester/archaeopteryx/Archaeopteryx.java | 6 +- .../org/forester/archaeopteryx/ArchaeopteryxA.java | 4 +- .../org/forester/archaeopteryx/ArchaeopteryxE.java | 2 + .../java/src/org/forester/archaeopteryx/Blast.java | 4 +- .../forester/archaeopteryx/ColorSchemeChooser.java | 10 +- .../org/forester/archaeopteryx/Configuration.java | 9 +- .../src/org/forester/archaeopteryx/Constants.java | 4 +- .../org/forester/archaeopteryx/ControlPanel.java | 162 ++--- .../org/forester/archaeopteryx/FontChooser.java | 2 + .../org/forester/archaeopteryx/ImageLoader.java | 4 +- .../src/org/forester/archaeopteryx/MainFrame.java | 15 +- .../forester/archaeopteryx/MainFrameApplet.java | 15 +- .../archaeopteryx/MainFrameApplication.java | 37 +- .../src/org/forester/archaeopteryx/MainPanel.java | 5 +- .../forester/archaeopteryx/MainPanelApplets.java | 4 +- .../org/forester/archaeopteryx/MainPanelEdit.java | 10 +- .../org/forester/archaeopteryx/MouseListener.java | 4 +- .../org/forester/archaeopteryx/NodeEditPanel.java | 71 +- .../src/org/forester/archaeopteryx/NodeFrame.java | 4 +- .../src/org/forester/archaeopteryx/NodePanel.java | 14 +- .../src/org/forester/archaeopteryx/Options.java | 4 +- .../org/forester/archaeopteryx/PdfExporter.java | 4 +- .../archaeopteryx/PhyloInferenceDialog.java | 5 +- .../PhylogeneticInferenceOptions.java | 4 +- .../archaeopteryx/PhylogeneticInferrer.java | 34 +- .../src/org/forester/archaeopteryx/Printer.java | 4 +- .../archaeopteryx/TaxonomyDataObtainer.java | 4 +- .../src/org/forester/archaeopteryx/TextFrame.java | 6 +- .../org/forester/archaeopteryx/TreeColorSet.java | 4 +- .../org/forester/archaeopteryx/TreeFontSet.java | 4 +- .../src/org/forester/archaeopteryx/TreePanel.java | 103 +-- .../org/forester/archaeopteryx/UrlTreeReader.java | 18 +- .../java/src/org/forester/archaeopteryx/Util.java | 12 +- .../src/org/forester/archaeopteryx/WebLink.java | 4 +- .../data/RenderableDomainArchitecture.java | 10 +- .../phylogeny/data/RenderablePhylogenyData.java | 4 +- .../phylogeny/data/RenderableVector.java | 5 +- .../BasicPhylogeniesWebserviceClient.java | 4 +- .../webservices/PhylogeniesWebserviceClient.java | 4 +- .../archaeopteryx/webservices/WebserviceUtil.java | 130 ++-- .../webservices/WebservicesManager.java | 4 +- .../src/org/forester/datastructures/Queue.java | 4 +- .../org/forester/development/AbstractRenderer.java | 4 +- .../org/forester/development/DevelopmentTools.java | 4 +- .../src/org/forester/development/HmmerRest.java | 4 +- .../src/org/forester/development/MsaRenderer.java | 4 +- .../org/forester/development/ResidueRenderer.java | 4 +- .../java/src/org/forester/development/Test.java | 4 +- .../evoinference/TestPhylogenyReconstruction.java | 4 +- .../evoinference/distance/NeighborJoining.java | 4 +- .../distance/PairwiseDistanceCalculator.java | 4 +- .../character/BasicCharacterStateMatrix.java | 7 +- .../matrix/character/CharacterStateMatrix.java | 4 +- .../matrix/character/DiscreteState.java | 4 +- .../distance/BasicSymmetricalDistanceMatrix.java | 11 +- .../matrix/distance/DistanceMatrix.java | 4 +- .../evoinference/parsimony/DolloParsimony.java | 7 +- .../evoinference/parsimony/FitchParsimony.java | 12 +- .../evoinference/parsimony/SankoffParsimony.java | 12 +- .../evoinference/tools/BootstrapResampler.java | 4 +- .../src/org/forester/go/BasicGoRelationship.java | 7 +- .../java/src/org/forester/go/BasicGoSubset.java | 6 +- forester/java/src/org/forester/go/BasicGoTerm.java | 18 +- forester/java/src/org/forester/go/BasicGoXRef.java | 6 +- forester/java/src/org/forester/go/GoId.java | 5 +- forester/java/src/org/forester/go/GoNameSpace.java | 4 +- .../java/src/org/forester/go/GoRelationship.java | 4 +- forester/java/src/org/forester/go/GoSubset.java | 4 +- forester/java/src/org/forester/go/GoTerm.java | 4 +- forester/java/src/org/forester/go/GoUtils.java | 4 +- forester/java/src/org/forester/go/GoXRef.java | 4 +- forester/java/src/org/forester/go/Mapping.java | 4 +- forester/java/src/org/forester/go/OBOparser.java | 4 +- .../java/src/org/forester/go/PfamToGoMapping.java | 4 +- forester/java/src/org/forester/go/TestGo.java | 10 +- .../src/org/forester/go/etc/MetaOntologizer.java | 23 +- .../src/org/forester/go/etc/OntologizerResult.java | 4 +- .../src/org/forester/io/parsers/FastaParser.java | 8 +- .../org/forester/io/parsers/GeneralMsaParser.java | 4 +- .../forester/io/parsers/HmmPfamOutputParser.java | 4 +- .../io/parsers/HmmscanPerDomainTableParser.java | 4 +- .../org/forester/io/parsers/PhylogenyParser.java | 4 +- .../parsers/SymmetricalDistanceMatrixParser.java | 4 +- .../io/parsers/nexus/NexusCharactersParser.java | 4 +- .../forester/io/parsers/nexus/NexusConstants.java | 4 +- .../io/parsers/nexus/NexusFormatException.java | 4 +- .../io/parsers/nexus/NexusPhylogeniesParser.java | 6 +- .../forester/io/parsers/nexus/PaupLogParser.java | 4 +- .../io/parsers/nhx/NHXFormatException.java | 4 +- .../src/org/forester/io/parsers/nhx/NHXParser.java | 10 +- .../src/org/forester/io/parsers/nhx/NHXtags.java | 4 +- .../phyloxml/PhyloXmlDataFormatException.java | 4 +- .../io/parsers/phyloxml/PhyloXmlException.java | 4 +- .../io/parsers/phyloxml/PhyloXmlHandler.java | 14 +- .../io/parsers/phyloxml/PhyloXmlMapping.java | 4 +- .../io/parsers/phyloxml/PhyloXmlParser.java | 6 +- .../forester/io/parsers/phyloxml/PhyloXmlUtil.java | 5 +- .../forester/io/parsers/phyloxml/XmlElement.java | 4 +- .../io/parsers/phyloxml/data/AccessionParser.java | 8 +- .../io/parsers/phyloxml/data/AnnotationParser.java | 4 +- .../phyloxml/data/BinaryCharactersParser.java | 4 +- .../parsers/phyloxml/data/BranchWidthParser.java | 4 +- .../io/parsers/phyloxml/data/ColorParser.java | 4 +- .../io/parsers/phyloxml/data/ConfidenceParser.java | 4 +- .../io/parsers/phyloxml/data/DateParser.java | 4 +- .../parsers/phyloxml/data/DistributionParser.java | 4 +- .../io/parsers/phyloxml/data/EventParser.java | 4 +- .../io/parsers/phyloxml/data/IdentifierParser.java | 8 +- .../io/parsers/phyloxml/data/PointParser.java | 4 +- .../io/parsers/phyloxml/data/PolygonParser.java | 4 +- .../io/parsers/phyloxml/data/PropertyParser.java | 4 +- .../io/parsers/phyloxml/data/ReferenceParser.java | 4 +- .../phyloxml/data/SequenceRelationParser.java | 12 +- .../io/parsers/phyloxml/data/TaxonomyParser.java | 1 + .../io/parsers/phyloxml/data/UriParser.java | 4 +- .../src/org/forester/io/parsers/tol/TolParser.java | 6 +- .../org/forester/io/parsers/tol/TolXmlHandler.java | 4 +- .../org/forester/io/parsers/util/ParserUtils.java | 4 +- .../io/parsers/util/PhylogenyParserException.java | 4 +- .../forester/io/writers/PhyloXmlNodeWriter.java | 4 +- .../org/forester/io/writers/PhylogenyWriter.java | 4 +- forester/java/src/org/forester/msa/BasicMsa.java | 7 +- forester/java/src/org/forester/msa/Mafft.java | 7 +- forester/java/src/org/forester/msa/MafftOLD.java | 3 + forester/java/src/org/forester/msa/Msa.java | 4 +- .../src/org/forester/msa/MsaFormatException.java | 4 +- .../java/src/org/forester/msa/MsaInferrer.java | 4 +- forester/java/src/org/forester/msa/MsaTools.java | 4 +- .../java/src/org/forester/msa/ResampleableMsa.java | 4 +- .../BasicExternalNodeBasedCoverageExtender.java | 5 +- .../pccx/BranchCountingBasedScoringMethod.java | 7 +- .../pccx/BranchLengthBasedScoringMethod.java | 4 +- forester/java/src/org/forester/pccx/Coverage.java | 4 +- .../forester/pccx/CoverageCalculationMethod.java | 4 +- .../forester/pccx/CoverageCalculationOptions.java | 4 +- .../src/org/forester/pccx/CoverageCalculator.java | 4 +- .../src/org/forester/pccx/CoverageExtender.java | 4 +- .../forester/pccx/ExternalNodeBasedCoverage.java | 6 +- .../pccx/ExternalNodeBasedCoverageMethod.java | 11 +- .../ExternalNodeBasedCoverageMethodOptions.java | 5 +- .../pccx/LogBranchLengthBasedScoringMethod.java | 4 +- .../java/src/org/forester/pccx/ModelingUtils.java | 4 +- .../pccx/ScoringMethodForExternalNode.java | 4 +- forester/java/src/org/forester/pccx/TestPccx.java | 15 +- forester/java/src/org/forester/phylogeny/Edge.java | 4 +- .../java/src/org/forester/phylogeny/Phylogeny.java | 4 +- .../org/forester/phylogeny/PhylogenyBranch.java | 7 +- .../org/forester/phylogeny/PhylogenyMethods.java | 14 +- .../src/org/forester/phylogeny/PhylogenyNode.java | 13 +- .../src/org/forester/phylogeny/PhylogenyNodeI.java | 4 +- .../src/org/forester/phylogeny/data/Accession.java | 10 +- .../org/forester/phylogeny/data/Annotation.java | 4 +- .../forester/phylogeny/data/BinaryCharacters.java | 4 +- .../org/forester/phylogeny/data/BranchData.java | 4 +- .../org/forester/phylogeny/data/BranchWidth.java | 4 +- .../org/forester/phylogeny/data/Confidence.java | 10 +- .../java/src/org/forester/phylogeny/data/Date.java | 4 +- .../org/forester/phylogeny/data/Distribution.java | 4 +- .../phylogeny/data/DomainArchitecture.java | 10 +- .../src/org/forester/phylogeny/data/Event.java | 10 +- .../org/forester/phylogeny/data/Identifier.java | 10 +- .../org/forester/phylogeny/data/MultipleUris.java | 4 +- .../src/org/forester/phylogeny/data/NodeData.java | 10 +- .../org/forester/phylogeny/data/PhylogenyData.java | 4 +- .../forester/phylogeny/data/PhylogenyDataUtil.java | 9 +- .../src/org/forester/phylogeny/data/Polygon.java | 4 +- .../org/forester/phylogeny/data/PropertiesMap.java | 4 +- .../src/org/forester/phylogeny/data/Property.java | 4 +- .../org/forester/phylogeny/data/ProteinDomain.java | 10 +- .../src/org/forester/phylogeny/data/Reference.java | 10 +- .../src/org/forester/phylogeny/data/Sequence.java | 14 +- .../forester/phylogeny/data/SequenceRelation.java | 4 +- .../src/org/forester/phylogeny/data/Taxonomy.java | 14 +- .../java/src/org/forester/phylogeny/data/Uri.java | 4 +- .../phylogeny/factories/BasicPhylogenyFactory.java | 6 +- .../factories/ParserBasedPhylogenyFactory.java | 5 +- .../phylogeny/factories/PhylogenyFactory.java | 4 +- .../iterators/ChildNodeIteratorForward.java | 8 +- .../iterators/ExternalForwardIterator.java | 8 +- .../iterators/LevelOrderTreeIterator.java | 8 +- .../phylogeny/iterators/PhylogenyNodeIterator.java | 6 +- .../phylogeny/iterators/PostOrderStackObject.java | 4 +- .../phylogeny/iterators/PostorderTreeIterator.java | 8 +- .../phylogeny/iterators/PreorderTreeIterator.java | 8 +- .../src/org/forester/sdi/DistanceCalculator.java | 4 +- forester/java/src/org/forester/sdi/GSDI.java | 4 +- forester/java/src/org/forester/sdi/ORcount.java | 4 +- forester/java/src/org/forester/sdi/RIO.java | 4 +- forester/java/src/org/forester/sdi/RIOn.java | 4 +- forester/java/src/org/forester/sdi/SDI.java | 4 +- forester/java/src/org/forester/sdi/SDIR.java | 4 +- forester/java/src/org/forester/sdi/SDIse.java | 4 +- forester/java/src/org/forester/sdi/SDIx.java | 4 +- .../src/org/forester/sdi/TaxonomyAssigner.java | 4 +- forester/java/src/org/forester/sdi/TestGSDI.java | 4 +- forester/java/src/org/forester/sdi/Tuplet.java | 5 +- .../src/org/forester/sequence/BasicSequence.java | 9 +- .../java/src/org/forester/sequence/Sequence.java | 4 +- .../AdjactantDirectedBinaryDomainCombination.java | 4 +- .../AdjactantDirectedCombinableDomains.java | 4 +- .../surfacing/BasicBinaryDomainCombination.java | 7 +- .../forester/surfacing/BasicCombinableDomains.java | 20 +- .../src/org/forester/surfacing/BasicDomain.java | 15 +- .../surfacing/BasicDomainSimilarityCalculator.java | 16 +- .../BasicGenomeWideCombinableDomains.java | 32 +- .../src/org/forester/surfacing/BasicProtein.java | 12 +- .../src/org/forester/surfacing/BasicSpecies.java | 5 +- .../surfacing/BinaryDomainCombination.java | 5 +- .../org/forester/surfacing/CombinableDomains.java | 4 +- .../CombinationsBasedPairwiseDomainSimilarity.java | 5 +- ...onsBasedPairwiseDomainSimilarityCalculator.java | 5 +- .../CountsBasedPairwiseDomainSimilarity.java | 6 +- .../surfacing/DirectedBinaryDomainCombination.java | 4 +- .../surfacing/DirectedCombinableDomains.java | 4 +- .../java/src/org/forester/surfacing/Domain.java | 4 +- ...rchitectureBasedGenomeSimilarityCalculator.java | 4 +- ...ainCountsBasedPairwiseSimilarityCalculator.java | 5 +- .../surfacing/DomainCountsDifferenceUtil.java | 30 +- .../java/src/org/forester/surfacing/DomainId.java | 4 +- .../src/org/forester/surfacing/DomainLengths.java | 4 +- .../org/forester/surfacing/DomainLengthsTable.java | 4 +- .../surfacing/DomainParsimonyCalculator.java | 4 +- .../org/forester/surfacing/DomainSimilarity.java | 4 +- .../surfacing/DomainSimilarityCalculator.java | 4 +- .../surfacing/GenomeWideCombinableDomains.java | 4 +- .../src/org/forester/surfacing/MappingResults.java | 4 +- .../surfacing/PairwiseDomainSimilarity.java | 4 +- .../PairwiseDomainSimilarityCalculator.java | 4 +- .../surfacing/PairwiseGenomeComparator.java | 12 +- .../surfacing/PrintableDomainSimilarity.java | 16 +- ...rintableSpeciesSpecificDomainSimilariyData.java | 8 +- .../java/src/org/forester/surfacing/Protein.java | 4 +- ...ntsBasedPairwiseDomainSimilarityCalculator.java | 5 +- .../java/src/org/forester/surfacing/ProteinId.java | 4 +- .../src/org/forester/surfacing/SimpleDomain.java | 12 +- .../java/src/org/forester/surfacing/Species.java | 4 +- .../SpeciesSpecificDomainSimilariyData.java | 4 +- .../org/forester/surfacing/SurfacingConstants.java | 4 +- .../src/org/forester/surfacing/SurfacingUtil.java | 75 ++- .../src/org/forester/surfacing/TestSurfacing.java | 4 +- forester/java/src/org/forester/test/Test.java | 6 +- .../src/org/forester/tools/ConfidenceAssessor.java | 4 +- .../src/org/forester/tools/PhylogenyDecorator.java | 20 +- .../java/src/org/forester/tools/SupportCount.java | 4 +- .../src/org/forester/tools/TreeSplitMatrix.java | 4 +- .../java/src/org/forester/util/AsciiHistogram.java | 4 +- .../forester/util/BasicDescriptiveStatistics.java | 23 +- .../java/src/org/forester/util/BasicTable.java | 4 +- .../src/org/forester/util/BasicTableParser.java | 4 +- .../org/forester/util/CommandLineArguments.java | 4 +- .../org/forester/util/CommandProcessBuilder.java | 4 +- .../org/forester/util/DescriptiveStatistics.java | 5 +- .../src/org/forester/util/ExternalProgram.java | 4 +- .../util/FailedConditionCheckException.java | 4 +- .../src/org/forester/util/ForesterConstants.java | 4 +- .../java/src/org/forester/util/ForesterUtil.java | 47 +- .../java/src/org/forester/util/GeneralTable.java | 4 +- .../forester/util/IllegalFormatUseException.java | 4 +- .../java/src/org/forester/util/WindowsUtils.java | 2 +- .../org/forester/ws/uniprot/UniProtTaxonomy.java | 4 +- .../org/forester/ws/uniprot/UniProtWsTools.java | 4 +- .../java/src/org/forester/ws/wabi/RestUtil.java | 4 +- .../java/src/org/forester/ws/wabi/TxSearch.java | 4 +- .../java/src/org/forester/ws/wabi/WabiTools.java | 4 +- 296 files changed, 1919 insertions(+), 1486 deletions(-) diff --git a/forester/java/src/org/forester/analysis/AncestralTaxonomyInference.java b/forester/java/src/org/forester/analysis/AncestralTaxonomyInference.java index b9e6b46..4f114a2 100644 --- a/forester/java/src/org/forester/analysis/AncestralTaxonomyInference.java +++ b/forester/java/src/org/forester/analysis/AncestralTaxonomyInference.java @@ -4,7 +4,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -14,7 +14,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -43,380 +43,366 @@ import org.forester.ws.uniprot.UniProtWsTools; public final class AncestralTaxonomyInference { - private static final int MAX_CACHE_SIZE = 100000; - private static final int MAX_TAXONOMIES_TO_RETURN = 100; - private static final HashMap _sn_up_cache_map = new HashMap(); - private static final HashMap _code_up_cache_map = new HashMap(); - private static final HashMap _cn_up_cache_map = new HashMap(); - private static final HashMap _id_up_cache_map = new HashMap(); + private static final int MAX_CACHE_SIZE = 100000; + private static final int MAX_TAXONOMIES_TO_RETURN = 100; + private static final HashMap _sn_up_cache_map = new HashMap(); + private static final HashMap _code_up_cache_map = new HashMap(); + private static final HashMap _cn_up_cache_map = new HashMap(); + private static final HashMap _id_up_cache_map = new HashMap(); - synchronized private static void clearCachesIfTooLarge() { - if (getSnTaxCacheMap().size() > MAX_CACHE_SIZE) { - getSnTaxCacheMap().clear(); - } - if (getCnTaxCacheMap().size() > MAX_CACHE_SIZE) { - getCnTaxCacheMap().clear(); - } - if (getCodeTaxCacheMap().size() > MAX_CACHE_SIZE) { - getCodeTaxCacheMap().clear(); - } - if (getIdTaxCacheMap().size() > MAX_CACHE_SIZE) { - getIdTaxCacheMap().clear(); - } - } + synchronized private static void clearCachesIfTooLarge() { + if ( getSnTaxCacheMap().size() > MAX_CACHE_SIZE ) { + getSnTaxCacheMap().clear(); + } + if ( getCnTaxCacheMap().size() > MAX_CACHE_SIZE ) { + getCnTaxCacheMap().clear(); + } + if ( getCodeTaxCacheMap().size() > MAX_CACHE_SIZE ) { + getCodeTaxCacheMap().clear(); + } + if ( getIdTaxCacheMap().size() > MAX_CACHE_SIZE ) { + getIdTaxCacheMap().clear(); + } + } - synchronized private static HashMap getCnTaxCacheMap() { - return _cn_up_cache_map; - } + synchronized private static HashMap getCnTaxCacheMap() { + return _cn_up_cache_map; + } - synchronized private static HashMap getCodeTaxCacheMap() { - return _code_up_cache_map; - } + synchronized private static HashMap getCodeTaxCacheMap() { + return _code_up_cache_map; + } - synchronized private static HashMap getIdTaxCacheMap() { - return _id_up_cache_map; - } + synchronized private static HashMap getIdTaxCacheMap() { + return _id_up_cache_map; + } - synchronized private static HashMap getSnTaxCacheMap() { - return _sn_up_cache_map; - } + synchronized private static HashMap getSnTaxCacheMap() { + return _sn_up_cache_map; + } - synchronized private static UniProtTaxonomy getTaxonomies( - final HashMap cache, final String query, - final QUERY_TYPE qt) throws IOException { - if (cache.containsKey(query)) { - return cache.get(query).copy(); - } else { - List up_taxonomies = null; - switch (qt) { - case ID: - up_taxonomies = getTaxonomiesFromId(query); - break; - case CODE: - up_taxonomies = getTaxonomiesFromTaxonomyCode(query); - break; - case SN: - up_taxonomies = getTaxonomiesFromScientificName(query); - break; - case CN: - up_taxonomies = getTaxonomiesFromCommonName(query); - break; - default: - throw new RuntimeException(); - } - if ((up_taxonomies != null) && (up_taxonomies.size() == 1)) { - final UniProtTaxonomy up_tax = up_taxonomies.get(0); - if (!ForesterUtil.isEmpty(up_tax.getScientificName())) { - getSnTaxCacheMap().put(up_tax.getScientificName(), up_tax); - } - if (!ForesterUtil.isEmpty(up_tax.getCode())) { - getCodeTaxCacheMap().put(up_tax.getCode(), up_tax); - } - if (!ForesterUtil.isEmpty(up_tax.getCommonName())) { - getCnTaxCacheMap().put(up_tax.getCommonName(), up_tax); - } - if (!ForesterUtil.isEmpty(up_tax.getId())) { - getIdTaxCacheMap().put(up_tax.getId(), up_tax); - } - return up_tax; - } else { - return null; - } - } - } + synchronized private static UniProtTaxonomy getTaxonomies( final HashMap cache, + final String query, + final QUERY_TYPE qt ) throws IOException { + if ( cache.containsKey( query ) ) { + return cache.get( query ).copy(); + } + else { + List up_taxonomies = null; + switch ( qt ) { + case ID: + up_taxonomies = getTaxonomiesFromId( query ); + break; + case CODE: + up_taxonomies = getTaxonomiesFromTaxonomyCode( query ); + break; + case SN: + up_taxonomies = getTaxonomiesFromScientificName( query ); + break; + case CN: + up_taxonomies = getTaxonomiesFromCommonName( query ); + break; + default: + throw new RuntimeException(); + } + if ( ( up_taxonomies != null ) && ( up_taxonomies.size() == 1 ) ) { + final UniProtTaxonomy up_tax = up_taxonomies.get( 0 ); + if ( !ForesterUtil.isEmpty( up_tax.getScientificName() ) ) { + getSnTaxCacheMap().put( up_tax.getScientificName(), up_tax ); + } + if ( !ForesterUtil.isEmpty( up_tax.getCode() ) ) { + getCodeTaxCacheMap().put( up_tax.getCode(), up_tax ); + } + if ( !ForesterUtil.isEmpty( up_tax.getCommonName() ) ) { + getCnTaxCacheMap().put( up_tax.getCommonName(), up_tax ); + } + if ( !ForesterUtil.isEmpty( up_tax.getId() ) ) { + getIdTaxCacheMap().put( up_tax.getId(), up_tax ); + } + return up_tax; + } + else { + return null; + } + } + } - synchronized private static List getTaxonomiesFromCommonName( - final String query) throws IOException { - return UniProtWsTools.getTaxonomiesFromCommonNameStrict(query, - MAX_TAXONOMIES_TO_RETURN); - } + synchronized private static List getTaxonomiesFromCommonName( final String query ) + throws IOException { + return UniProtWsTools.getTaxonomiesFromCommonNameStrict( query, MAX_TAXONOMIES_TO_RETURN ); + } - synchronized private static List getTaxonomiesFromId( - final String query) throws IOException { - return UniProtWsTools.getTaxonomiesFromId(query, - MAX_TAXONOMIES_TO_RETURN); - } + synchronized private static List getTaxonomiesFromId( final String query ) throws IOException { + return UniProtWsTools.getTaxonomiesFromId( query, MAX_TAXONOMIES_TO_RETURN ); + } - synchronized private static List getTaxonomiesFromScientificName( - final String query) throws IOException { - return UniProtWsTools.getTaxonomiesFromScientificNameStrict(query, - MAX_TAXONOMIES_TO_RETURN); - } + synchronized private static List getTaxonomiesFromScientificName( final String query ) + throws IOException { + return UniProtWsTools.getTaxonomiesFromScientificNameStrict( query, MAX_TAXONOMIES_TO_RETURN ); + } - synchronized private static List getTaxonomiesFromTaxonomyCode( - final String query) throws IOException { - return UniProtWsTools.getTaxonomiesFromTaxonomyCode(query, - MAX_TAXONOMIES_TO_RETURN); - } + synchronized private static List getTaxonomiesFromTaxonomyCode( final String query ) + throws IOException { + return UniProtWsTools.getTaxonomiesFromTaxonomyCode( query, MAX_TAXONOMIES_TO_RETURN ); + } - synchronized public static SortedSet inferTaxonomyFromDescendents( - final Phylogeny phy) throws IOException { - clearCachesIfTooLarge(); - final SortedSet not_found = new TreeSet(); - for (final PhylogenyNodeIterator iter = phy.iteratorPostorder(); iter - .hasNext();) { - final PhylogenyNode node = iter.next(); - // final QUERY_TYPE qt = null; - // Taxonomy tax = null; - // if ( node.getNodeData().isHasTaxonomy() ) { - // tax = node.getNodeData().getTaxonomy(); - // } - // UniProtTaxonomy up_tax = null; - // if ( ( tax != null ) - // && ( isHasAppropriateId( tax ) || !ForesterUtil.isEmpty( - // tax.getScientificName() ) - // || !ForesterUtil.isEmpty( tax.getTaxonomyCode() ) || - // !ForesterUtil.isEmpty( tax - // .getCommonName() ) ) ) { - // final String query = null; - // up_tax = obtainUniProtTaxonomy( tax, query, qt ); - // if ( up_tax == null ) { - // not_found.add( query ); - // } - // else { - // updateTaxonomy( qt, node, tax, up_tax ); - // } - // } - if (!node.isExternal()) { - inferTaxonomyFromDescendents(node, not_found); - } - } - return not_found; - } + synchronized public static SortedSet inferTaxonomyFromDescendents( final Phylogeny phy ) throws IOException { + clearCachesIfTooLarge(); + final SortedSet not_found = new TreeSet(); + for( final PhylogenyNodeIterator iter = phy.iteratorPostorder(); iter.hasNext(); ) { + final PhylogenyNode node = iter.next(); + // final QUERY_TYPE qt = null; + // Taxonomy tax = null; + // if ( node.getNodeData().isHasTaxonomy() ) { + // tax = node.getNodeData().getTaxonomy(); + // } + // UniProtTaxonomy up_tax = null; + // if ( ( tax != null ) + // && ( isHasAppropriateId( tax ) || !ForesterUtil.isEmpty( + // tax.getScientificName() ) + // || !ForesterUtil.isEmpty( tax.getTaxonomyCode() ) || + // !ForesterUtil.isEmpty( tax + // .getCommonName() ) ) ) { + // final String query = null; + // up_tax = obtainUniProtTaxonomy( tax, query, qt ); + // if ( up_tax == null ) { + // not_found.add( query ); + // } + // else { + // updateTaxonomy( qt, node, tax, up_tax ); + // } + // } + if ( !node.isExternal() ) { + inferTaxonomyFromDescendents( node, not_found ); + } + } + return not_found; + } - synchronized private static void inferTaxonomyFromDescendents( - final PhylogenyNode n, final SortedSet not_found) - throws IOException { - if (n.isExternal()) { - throw new IllegalArgumentException( - "attempt to infer taxonomy from descendants of external node"); - } - n.getNodeData().setTaxonomy(null); - final List descs = n.getDescendants(); - final List lineages = new ArrayList(); - int shortest_lin_length = Integer.MAX_VALUE; - for (final PhylogenyNode desc : descs) { - if (desc.getNodeData().isHasTaxonomy() - && (isHasAppropriateId(desc.getNodeData().getTaxonomy()) - || !ForesterUtil.isEmpty(desc.getNodeData() - .getTaxonomy().getScientificName()) - || !ForesterUtil.isEmpty(desc.getNodeData() - .getTaxonomy().getTaxonomyCode()) || !ForesterUtil - .isEmpty(desc.getNodeData().getTaxonomy() - .getCommonName()))) { - final QUERY_TYPE qt = null; - final String query = null; - final UniProtTaxonomy up_tax = obtainUniProtTaxonomy(desc - .getNodeData().getTaxonomy(), query, qt); - String[] lineage = null; - if (up_tax != null) { - lineage = obtainLineagePlusOwnScientificName(up_tax); - } - if ((lineage == null) || (lineage.length < 1)) { - not_found.add(desc.getNodeData().getTaxonomy().asText() - .toString()); - return; - } - if (lineage.length < shortest_lin_length) { - shortest_lin_length = lineage.length; - } - lineages.add(lineage); - } else { - String msg = "Node(s) with no or inappropriate taxonomic information found"; - if (!ForesterUtil.isEmpty(desc.getName())) { - msg = "Node " + desc.getName() - + " has no or inappropriate taxonomic information"; - } - throw new IllegalArgumentException(msg); - } - } - String last_common_lineage = null; - if (shortest_lin_length > 0) { - I: for (int i = 0; i < shortest_lin_length; ++i) { - final String lineage_0 = lineages.get(0)[i]; - for (int j = 1; j < lineages.size(); ++j) { - if (!lineage_0.equals(lineages.get(j)[i])) { - break I; - } - } - last_common_lineage = lineage_0; - } - } - if (last_common_lineage == null) { - return; - } - // if ( !n.getNodeData().isHasTaxonomy() ) { - // n.getNodeData().setTaxonomy( new Taxonomy() ); - // } - final Taxonomy tax = new Taxonomy(); - n.getNodeData().setTaxonomy(tax); - tax.setScientificName(last_common_lineage); - final UniProtTaxonomy up_tax = obtainUniProtTaxonomyFromSn(last_common_lineage); - if (up_tax != null) { - if (!ForesterUtil.isEmpty(up_tax.getRank())) { - try { - tax.setRank(up_tax.getRank().toLowerCase()); - } catch (final PhyloXmlDataFormatException ex) { - tax.setRank(""); - } - } - if (!ForesterUtil.isEmpty(up_tax.getId())) { - tax.setIdentifier(new Identifier(up_tax.getId(), "uniprot")); - } - if (!ForesterUtil.isEmpty(up_tax.getCommonName())) { - tax.setCommonName(up_tax.getCommonName()); - } - if (!ForesterUtil.isEmpty(up_tax.getSynonym()) - && !tax.getSynonyms().contains(up_tax.getSynonym())) { - tax.getSynonyms().add(up_tax.getSynonym()); - } - } - for (final PhylogenyNode desc : descs) { - if (!desc.isExternal() && desc.getNodeData().isHasTaxonomy() - && desc.getNodeData().getTaxonomy().isEqual(tax)) { - desc.getNodeData().setTaxonomy(null); - } - } - } + synchronized private static void inferTaxonomyFromDescendents( final PhylogenyNode n, + final SortedSet not_found ) + throws IOException { + if ( n.isExternal() ) { + throw new IllegalArgumentException( "attempt to infer taxonomy from descendants of external node" ); + } + n.getNodeData().setTaxonomy( null ); + final List descs = n.getDescendants(); + final List lineages = new ArrayList(); + int shortest_lin_length = Integer.MAX_VALUE; + for( final PhylogenyNode desc : descs ) { + if ( desc.getNodeData().isHasTaxonomy() + && ( isHasAppropriateId( desc.getNodeData().getTaxonomy() ) + || !ForesterUtil.isEmpty( desc.getNodeData().getTaxonomy().getScientificName() ) + || !ForesterUtil.isEmpty( desc.getNodeData().getTaxonomy().getTaxonomyCode() ) || !ForesterUtil + .isEmpty( desc.getNodeData().getTaxonomy().getCommonName() ) ) ) { + final QUERY_TYPE qt = null; + final String query = null; + final UniProtTaxonomy up_tax = obtainUniProtTaxonomy( desc.getNodeData().getTaxonomy(), query, qt ); + String[] lineage = null; + if ( up_tax != null ) { + lineage = obtainLineagePlusOwnScientificName( up_tax ); + } + if ( ( lineage == null ) || ( lineage.length < 1 ) ) { + not_found.add( desc.getNodeData().getTaxonomy().asText().toString() ); + return; + } + if ( lineage.length < shortest_lin_length ) { + shortest_lin_length = lineage.length; + } + lineages.add( lineage ); + } + else { + String msg = "Node(s) with no or inappropriate taxonomic information found"; + if ( !ForesterUtil.isEmpty( desc.getName() ) ) { + msg = "Node " + desc.getName() + " has no or inappropriate taxonomic information"; + } + throw new IllegalArgumentException( msg ); + } + } + String last_common_lineage = null; + if ( shortest_lin_length > 0 ) { + I: for( int i = 0; i < shortest_lin_length; ++i ) { + final String lineage_0 = lineages.get( 0 )[ i ]; + for( int j = 1; j < lineages.size(); ++j ) { + if ( !lineage_0.equals( lineages.get( j )[ i ] ) ) { + break I; + } + } + last_common_lineage = lineage_0; + } + } + if ( last_common_lineage == null ) { + return; + } + // if ( !n.getNodeData().isHasTaxonomy() ) { + // n.getNodeData().setTaxonomy( new Taxonomy() ); + // } + final Taxonomy tax = new Taxonomy(); + n.getNodeData().setTaxonomy( tax ); + tax.setScientificName( last_common_lineage ); + final UniProtTaxonomy up_tax = obtainUniProtTaxonomyFromSn( last_common_lineage ); + if ( up_tax != null ) { + if ( !ForesterUtil.isEmpty( up_tax.getRank() ) ) { + try { + tax.setRank( up_tax.getRank().toLowerCase() ); + } + catch ( final PhyloXmlDataFormatException ex ) { + tax.setRank( "" ); + } + } + if ( !ForesterUtil.isEmpty( up_tax.getId() ) ) { + tax.setIdentifier( new Identifier( up_tax.getId(), "uniprot" ) ); + } + if ( !ForesterUtil.isEmpty( up_tax.getCommonName() ) ) { + tax.setCommonName( up_tax.getCommonName() ); + } + if ( !ForesterUtil.isEmpty( up_tax.getSynonym() ) && !tax.getSynonyms().contains( up_tax.getSynonym() ) ) { + tax.getSynonyms().add( up_tax.getSynonym() ); + } + } + for( final PhylogenyNode desc : descs ) { + if ( !desc.isExternal() && desc.getNodeData().isHasTaxonomy() + && desc.getNodeData().getTaxonomy().isEqual( tax ) ) { + desc.getNodeData().setTaxonomy( null ); + } + } + } - synchronized private static boolean isHasAppropriateId(final Taxonomy tax) { - return ((tax.getIdentifier() != null) && (!ForesterUtil.isEmpty(tax - .getIdentifier().getValue()) && (tax.getIdentifier() - .getProvider().equalsIgnoreCase("ncbi") - || tax.getIdentifier().getProvider() - .equalsIgnoreCase("uniprot") || tax.getIdentifier() - .getProvider().equalsIgnoreCase("uniprotkb")))); - } + synchronized private static boolean isHasAppropriateId( final Taxonomy tax ) { + return ( ( tax.getIdentifier() != null ) && ( !ForesterUtil.isEmpty( tax.getIdentifier().getValue() ) && ( tax + .getIdentifier().getProvider().equalsIgnoreCase( "ncbi" ) + || tax.getIdentifier().getProvider().equalsIgnoreCase( "uniprot" ) || tax.getIdentifier().getProvider() + .equalsIgnoreCase( "uniprotkb" ) ) ) ); + } - synchronized public static SortedSet obtainDetailedTaxonomicInformation( - final Phylogeny phy) throws IOException { - clearCachesIfTooLarge(); - final SortedSet not_found = new TreeSet(); - for (final PhylogenyNodeIterator iter = phy.iteratorPostorder(); iter - .hasNext();) { - final PhylogenyNode node = iter.next(); - final QUERY_TYPE qt = null; - Taxonomy tax = null; - if (node.getNodeData().isHasTaxonomy()) { - tax = node.getNodeData().getTaxonomy(); - } else if (node.isExternal()) { - if (!ForesterUtil.isEmpty(node.getName())) { - not_found.add(node.getName()); - } else { - not_found.add(node.toString()); - } - } - UniProtTaxonomy up_tax = null; - if ((tax != null) - && (isHasAppropriateId(tax) - || !ForesterUtil.isEmpty(tax.getScientificName()) - || !ForesterUtil.isEmpty(tax.getTaxonomyCode()) || !ForesterUtil - .isEmpty(tax.getCommonName()))) { - up_tax = obtainUniProtTaxonomy(tax, null, qt); - if (up_tax != null) { - updateTaxonomy(qt, node, tax, up_tax); - } else { - not_found.add(tax.toString()); - } - } - } - return not_found; - } + synchronized public static SortedSet obtainDetailedTaxonomicInformation( final Phylogeny phy ) + throws IOException { + clearCachesIfTooLarge(); + final SortedSet not_found = new TreeSet(); + for( final PhylogenyNodeIterator iter = phy.iteratorPostorder(); iter.hasNext(); ) { + final PhylogenyNode node = iter.next(); + final QUERY_TYPE qt = null; + Taxonomy tax = null; + if ( node.getNodeData().isHasTaxonomy() ) { + tax = node.getNodeData().getTaxonomy(); + } + else if ( node.isExternal() ) { + if ( !ForesterUtil.isEmpty( node.getName() ) ) { + not_found.add( node.getName() ); + } + else { + not_found.add( node.toString() ); + } + } + UniProtTaxonomy up_tax = null; + if ( ( tax != null ) + && ( isHasAppropriateId( tax ) || !ForesterUtil.isEmpty( tax.getScientificName() ) + || !ForesterUtil.isEmpty( tax.getTaxonomyCode() ) || !ForesterUtil.isEmpty( tax + .getCommonName() ) ) ) { + up_tax = obtainUniProtTaxonomy( tax, null, qt ); + if ( up_tax != null ) { + updateTaxonomy( qt, node, tax, up_tax ); + } + else { + not_found.add( tax.toString() ); + } + } + } + return not_found; + } - synchronized private static String[] obtainLineagePlusOwnScientificName( - final UniProtTaxonomy up_tax) { - final String[] lineage = up_tax.getLineage(); - final String[] lin_plus_self = new String[lineage.length + 1]; - for (int i = 0; i < lineage.length; ++i) { - lin_plus_self[i] = lineage[i]; - } - lin_plus_self[lineage.length] = up_tax.getScientificName(); - return lin_plus_self; - } + synchronized private static String[] obtainLineagePlusOwnScientificName( final UniProtTaxonomy up_tax ) { + final String[] lineage = up_tax.getLineage(); + final String[] lin_plus_self = new String[ lineage.length + 1 ]; + for( int i = 0; i < lineage.length; ++i ) { + lin_plus_self[ i ] = lineage[ i ]; + } + lin_plus_self[ lineage.length ] = up_tax.getScientificName(); + return lin_plus_self; + } - synchronized private static UniProtTaxonomy obtainUniProtTaxonomy( - final Taxonomy tax, String query, QUERY_TYPE qt) throws IOException { - if (isHasAppropriateId(tax)) { - query = tax.getIdentifier().getValue(); - qt = QUERY_TYPE.ID; - return getTaxonomies(getIdTaxCacheMap(), query, qt); - } else if (!ForesterUtil.isEmpty(tax.getScientificName())) { - query = tax.getScientificName(); - qt = QUERY_TYPE.SN; - return getTaxonomies(getSnTaxCacheMap(), query, qt); - } else if (!ForesterUtil.isEmpty(tax.getTaxonomyCode())) { - query = tax.getTaxonomyCode(); - qt = QUERY_TYPE.CODE; - return getTaxonomies(getCodeTaxCacheMap(), query, qt); - } else { - query = tax.getCommonName(); - qt = QUERY_TYPE.CN; - return getTaxonomies(getCnTaxCacheMap(), query, qt); - } - } + synchronized private static UniProtTaxonomy obtainUniProtTaxonomy( final Taxonomy tax, String query, QUERY_TYPE qt ) + throws IOException { + if ( isHasAppropriateId( tax ) ) { + query = tax.getIdentifier().getValue(); + qt = QUERY_TYPE.ID; + return getTaxonomies( getIdTaxCacheMap(), query, qt ); + } + else if ( !ForesterUtil.isEmpty( tax.getScientificName() ) ) { + query = tax.getScientificName(); + qt = QUERY_TYPE.SN; + return getTaxonomies( getSnTaxCacheMap(), query, qt ); + } + else if ( !ForesterUtil.isEmpty( tax.getTaxonomyCode() ) ) { + query = tax.getTaxonomyCode(); + qt = QUERY_TYPE.CODE; + return getTaxonomies( getCodeTaxCacheMap(), query, qt ); + } + else { + query = tax.getCommonName(); + qt = QUERY_TYPE.CN; + return getTaxonomies( getCnTaxCacheMap(), query, qt ); + } + } - synchronized private static UniProtTaxonomy obtainUniProtTaxonomyFromSn( - final String sn) throws IOException { - UniProtTaxonomy up_tax = null; - if (getSnTaxCacheMap().containsKey(sn)) { - up_tax = getSnTaxCacheMap().get(sn).copy(); - } else { - final List up_taxonomies = getTaxonomiesFromScientificName(sn); - if ((up_taxonomies != null) && (up_taxonomies.size() == 1)) { - up_tax = up_taxonomies.get(0); - getSnTaxCacheMap().put(sn, up_tax); - if (!ForesterUtil.isEmpty(up_tax.getCode())) { - getCodeTaxCacheMap().put(up_tax.getCode(), up_tax); - } - if (!ForesterUtil.isEmpty(up_tax.getCommonName())) { - getCnTaxCacheMap().put(up_tax.getCommonName(), up_tax); - } - if (!ForesterUtil.isEmpty(up_tax.getId())) { - getIdTaxCacheMap().put(up_tax.getId(), up_tax); - } - } - } - return up_tax; - } + synchronized private static UniProtTaxonomy obtainUniProtTaxonomyFromSn( final String sn ) throws IOException { + UniProtTaxonomy up_tax = null; + if ( getSnTaxCacheMap().containsKey( sn ) ) { + up_tax = getSnTaxCacheMap().get( sn ).copy(); + } + else { + final List up_taxonomies = getTaxonomiesFromScientificName( sn ); + if ( ( up_taxonomies != null ) && ( up_taxonomies.size() == 1 ) ) { + up_tax = up_taxonomies.get( 0 ); + getSnTaxCacheMap().put( sn, up_tax ); + if ( !ForesterUtil.isEmpty( up_tax.getCode() ) ) { + getCodeTaxCacheMap().put( up_tax.getCode(), up_tax ); + } + if ( !ForesterUtil.isEmpty( up_tax.getCommonName() ) ) { + getCnTaxCacheMap().put( up_tax.getCommonName(), up_tax ); + } + if ( !ForesterUtil.isEmpty( up_tax.getId() ) ) { + getIdTaxCacheMap().put( up_tax.getId(), up_tax ); + } + } + } + return up_tax; + } - synchronized private static void updateTaxonomy(final QUERY_TYPE qt, - final PhylogenyNode node, final Taxonomy tax, - final UniProtTaxonomy up_tax) { - if ((qt != QUERY_TYPE.SN) - && !ForesterUtil.isEmpty(up_tax.getScientificName()) - && ForesterUtil.isEmpty(tax.getScientificName())) { - tax.setScientificName(up_tax.getScientificName()); - } - if (node.isExternal() - && ((qt != QUERY_TYPE.CODE) - && !ForesterUtil.isEmpty(up_tax.getCode()) && ForesterUtil - .isEmpty(tax.getTaxonomyCode()))) { - tax.setTaxonomyCode(up_tax.getCode()); - } - if ((qt != QUERY_TYPE.CN) - && !ForesterUtil.isEmpty(up_tax.getCommonName()) - && ForesterUtil.isEmpty(tax.getCommonName())) { - tax.setCommonName(up_tax.getCommonName()); - } - if (!ForesterUtil.isEmpty(up_tax.getSynonym()) - && !tax.getSynonyms().contains(up_tax.getSynonym())) { - tax.getSynonyms().add(up_tax.getSynonym()); - } - if (!ForesterUtil.isEmpty(up_tax.getRank()) - && ForesterUtil.isEmpty(tax.getRank())) { - try { - tax.setRank(up_tax.getRank().toLowerCase()); - } catch (final PhyloXmlDataFormatException ex) { - tax.setRank(""); - } - } - if ((qt != QUERY_TYPE.ID) && !ForesterUtil.isEmpty(up_tax.getId()) - && (tax.getIdentifier() == null)) { - tax.setIdentifier(new Identifier(up_tax.getId(), "uniprot")); - } - } + synchronized private static void updateTaxonomy( final QUERY_TYPE qt, + final PhylogenyNode node, + final Taxonomy tax, + final UniProtTaxonomy up_tax ) { + if ( ( qt != QUERY_TYPE.SN ) && !ForesterUtil.isEmpty( up_tax.getScientificName() ) + && ForesterUtil.isEmpty( tax.getScientificName() ) ) { + tax.setScientificName( up_tax.getScientificName() ); + } + if ( node.isExternal() + && ( ( qt != QUERY_TYPE.CODE ) && !ForesterUtil.isEmpty( up_tax.getCode() ) && ForesterUtil + .isEmpty( tax.getTaxonomyCode() ) ) ) { + tax.setTaxonomyCode( up_tax.getCode() ); + } + if ( ( qt != QUERY_TYPE.CN ) && !ForesterUtil.isEmpty( up_tax.getCommonName() ) + && ForesterUtil.isEmpty( tax.getCommonName() ) ) { + tax.setCommonName( up_tax.getCommonName() ); + } + if ( !ForesterUtil.isEmpty( up_tax.getSynonym() ) && !tax.getSynonyms().contains( up_tax.getSynonym() ) ) { + tax.getSynonyms().add( up_tax.getSynonym() ); + } + if ( !ForesterUtil.isEmpty( up_tax.getRank() ) && ForesterUtil.isEmpty( tax.getRank() ) ) { + try { + tax.setRank( up_tax.getRank().toLowerCase() ); + } + catch ( final PhyloXmlDataFormatException ex ) { + tax.setRank( "" ); + } + } + if ( ( qt != QUERY_TYPE.ID ) && !ForesterUtil.isEmpty( up_tax.getId() ) && ( tax.getIdentifier() == null ) ) { + tax.setIdentifier( new Identifier( up_tax.getId(), "uniprot" ) ); + } + } - private enum QUERY_TYPE { - CODE, SN, CN, ID; - } + private enum QUERY_TYPE { + CODE, SN, CN, ID; + } } diff --git a/forester/java/src/org/forester/application/confadd.java b/forester/java/src/org/forester/application/confadd.java index efccace..dbc4d50 100644 --- a/forester/java/src/org/forester/application/confadd.java +++ b/forester/java/src/org/forester/application/confadd.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -148,8 +148,9 @@ public class confadd { targets = factory.create( target_file, ForesterUtil.createParserDependingOnFileType( target_file, true ) ); } catch ( final IOException e ) { - ForesterUtil.fatalError( PRG_NAME, "failed to read target phylogenies from [" + target_file + "]: " - + e.getLocalizedMessage() ); + ForesterUtil.fatalError( PRG_NAME, + "failed to read target phylogenies from [" + target_file + "]: " + + e.getLocalizedMessage() ); } int counter = 0; for( final Phylogeny target : targets ) { @@ -168,8 +169,8 @@ public class confadd { ForesterUtil.programMessage( PRG_NAME, "read in a total of " + targets.length + " targets" ); } try { - evaluators = factory.create( evaluators_file, ForesterUtil - .createParserDependingOnFileType( evaluators_file, true ) ); + evaluators = factory.create( evaluators_file, + ForesterUtil.createParserDependingOnFileType( evaluators_file, true ) ); } catch ( final IOException e ) { ForesterUtil.fatalError( PRG_NAME, "failed to read evaluator topologies from [" + evaluators_file + "]: " diff --git a/forester/java/src/org/forester/application/count_support.java b/forester/java/src/org/forester/application/count_support.java index 67dfc1b..e094f69 100644 --- a/forester/java/src/org/forester/application/count_support.java +++ b/forester/java/src/org/forester/application/count_support.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -108,8 +108,8 @@ public class count_support { p = factory.create( phylogeny_infile, pp )[ 0 ]; } catch ( final Exception e ) { - ForesterUtil.fatalError( count_support.PRG_NAME, "Could not read \"" + phylogeny_infile + "\" [" - + e.getMessage() + "]" ); + ForesterUtil.fatalError( count_support.PRG_NAME, + "Could not read \"" + phylogeny_infile + "\" [" + e.getMessage() + "]" ); } try { final PhylogenyFactory factory = ParserBasedPhylogenyFactory.getInstance(); @@ -117,8 +117,8 @@ public class count_support { ev = factory.create( evaluators_infile, pp ); } catch ( final Exception e ) { - ForesterUtil.fatalError( count_support.PRG_NAME, "Could not read \"" + evaluators_infile + "\" [" - + e.getMessage() + "]" ); + ForesterUtil.fatalError( count_support.PRG_NAME, + "Could not read \"" + evaluators_infile + "\" [" + e.getMessage() + "]" ); } boolean strip = false; if ( cla.isOptionSet( "s" ) ) { @@ -187,8 +187,9 @@ public class count_support { else { System.out.println( "Writing " + ev.length + " evaluator phylogenies to :" + evaluators_outfile ); if ( count_support.WRITE_EVALUATORS_AS_NHX ) { - w.toNewHampshireX( Arrays.asList( ev ), evaluators_outfile, ";" - + ForesterUtil.getLineSeparator() ); + w.toNewHampshireX( Arrays.asList( ev ), + evaluators_outfile, + ";" + ForesterUtil.getLineSeparator() ); } else { w.toNewHampshire( Arrays.asList( ev ), true, branch_lengths_in_ev_out, evaluators_outfile, ";" diff --git a/forester/java/src/org/forester/application/decorator.java b/forester/java/src/org/forester/application/decorator.java index c1a2786..cec430b 100644 --- a/forester/java/src/org/forester/application/decorator.java +++ b/forester/java/src/org/forester/application/decorator.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -305,8 +305,8 @@ public final class decorator { mapping_table = BasicTableParser.parse( mapping_infile, separator, decorator.USE_FIRST_SEPARATOR_ONLY ); } catch ( final Exception e ) { - ForesterUtil.fatalError( decorator.PRG_NAME, "failed to read [" + mapping_infile + "] [" - + e.getMessage() + "]" ); + ForesterUtil.fatalError( decorator.PRG_NAME, + "failed to read [" + mapping_infile + "] [" + e.getMessage() + "]" ); } if ( ( key_column < 0 ) || ( key_column >= mapping_table.getNumberOfColumns() ) ) { ForesterUtil.fatalError( decorator.PRG_NAME, "illegal value for key column" ); @@ -343,8 +343,8 @@ public final class decorator { table = PhylogenyDecorator.parseMappingTable( mapping_infile ); } catch ( final IOException e ) { - ForesterUtil.fatalError( decorator.PRG_NAME, "failed to read \"" + mapping_infile + "\" [" - + e.getMessage() + "]" ); + ForesterUtil.fatalError( decorator.PRG_NAME, + "failed to read \"" + mapping_infile + "\" [" + e.getMessage() + "]" ); } PhylogenyDecorator.decorate( phylogenies, table, diff --git a/forester/java/src/org/forester/application/get_distances.java b/forester/java/src/org/forester/application/get_distances.java index 8a8d328..87d9918 100644 --- a/forester/java/src/org/forester/application/get_distances.java +++ b/forester/java/src/org/forester/application/get_distances.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/application/goac.java b/forester/java/src/org/forester/application/goac.java index 1a6e00f..3cdceb7 100644 --- a/forester/java/src/org/forester/application/goac.java +++ b/forester/java/src/org/forester/application/goac.java @@ -5,7 +5,7 @@ // Copyright (C) 2009 Christian M. Zmasek // Copyright (C) 2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/application/nhx_too.java b/forester/java/src/org/forester/application/nhx_too.java index e7b8b96..32acbc8 100644 --- a/forester/java/src/org/forester/application/nhx_too.java +++ b/forester/java/src/org/forester/application/nhx_too.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/application/nj.java b/forester/java/src/org/forester/application/nj.java index 767edca..7ef1d56 100644 --- a/forester/java/src/org/forester/application/nj.java +++ b/forester/java/src/org/forester/application/nj.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/application/obo_tool.java b/forester/java/src/org/forester/application/obo_tool.java index 31a9b26..17281b7 100644 --- a/forester/java/src/org/forester/application/obo_tool.java +++ b/forester/java/src/org/forester/application/obo_tool.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/application/pccx.java b/forester/java/src/org/forester/application/pccx.java index d46d18f..0cb6577 100644 --- a/forester/java/src/org/forester/application/pccx.java +++ b/forester/java/src/org/forester/application/pccx.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/application/pfam2go_extractor.java b/forester/java/src/org/forester/application/pfam2go_extractor.java index 164a170..02e26fb 100644 --- a/forester/java/src/org/forester/application/pfam2go_extractor.java +++ b/forester/java/src/org/forester/application/pfam2go_extractor.java @@ -5,7 +5,7 @@ // Copyright (C) 2009 Christian M. Zmasek // Copyright (C) 2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/application/pfam_go.java b/forester/java/src/org/forester/application/pfam_go.java index 8d95d86..194def2 100644 --- a/forester/java/src/org/forester/application/pfam_go.java +++ b/forester/java/src/org/forester/application/pfam_go.java @@ -5,7 +5,7 @@ // Copyright (C) 2009 Christian M. Zmasek // Copyright (C) 2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/application/pfamacc2go.java b/forester/java/src/org/forester/application/pfamacc2go.java index 1d6ab2f..69793ef 100644 --- a/forester/java/src/org/forester/application/pfamacc2go.java +++ b/forester/java/src/org/forester/application/pfamacc2go.java @@ -6,7 +6,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/application/pfamacc2pfamid.java b/forester/java/src/org/forester/application/pfamacc2pfamid.java index 2a4ec9c..24da6d0 100644 --- a/forester/java/src/org/forester/application/pfamacc2pfamid.java +++ b/forester/java/src/org/forester/application/pfamacc2pfamid.java @@ -6,7 +6,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/application/phyloxml_converter.java b/forester/java/src/org/forester/application/phyloxml_converter.java index 9822e1f..d2c0a5c 100644 --- a/forester/java/src/org/forester/application/phyloxml_converter.java +++ b/forester/java/src/org/forester/application/phyloxml_converter.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -47,29 +47,31 @@ import org.forester.util.ForesterUtil.PhylogenyNodeField; public class phyloxml_converter { - final static private String HELP_OPTION_1 = "help"; - final static private String HELP_OPTION_2 = "h"; - final static private String FIELD_OPTION = "f"; - final static private String FIELD_CLADE_NAME = "nn"; - final static private String FIELD_TAXONOMY_CODE = "tc"; - final static private String FIELD_TAXONOMY_SCI_NAME = "sn"; - final static private String FIELD_TAXONOMY_COMM_NAME = "cn"; - final static private String FIELD_SEQUENCE_GENE_NAME = "gn"; - final static private String FIELD_SEQUENCE_SYMBOL = "sy"; - final static private String FIELD_DUMMY = "dummy"; - final static private String INTERNAL_NAMES_ARE_BOOT_SUPPPORT = "i"; - final static private String MIDPOINT_REROOT = "m"; - final static private String EXTRACT_TAXONOMY = "xt"; - final static private String EXTRACT_TAXONOMY_PF = "xp"; - final static private String ORDER_SUBTREES = "o"; - final static private String NO_TREE_LEVEL_INDENDATION = "ni"; - final static private String REPLACE_UNDER_SCORES = "ru"; - final static private String PRG_NAME = "phyloxml_converter"; - final static private String PRG_VERSION = "1.21"; - final static private String PRG_DATE = "2010.10.02"; - final static private String E_MAIL = "czmasek@burnham.org"; - final static private String WWW = "www.phylosoft.org/forester/"; - final static private boolean SPECIAL = false; + final static private String HELP_OPTION_1 = "help"; + final static private String HELP_OPTION_2 = "h"; + final static private String FIELD_OPTION = "f"; + final static private String FIELD_CLADE_NAME = "nn"; + final static private String FIELD_TAXONOMY_CODE = "tc"; + final static private String FIELD_TAXONOMY_SCI_NAME = "sn"; + final static private String FIELD_TAXONOMY_COMM_NAME = "cn"; + final static private String FIELD_SEQUENCE_GENE_NAME = "gn"; + final static private String FIELD_SEQUENCE_SYMBOL = "sy"; + final static private String FIELD_UNIPROT_TAXONOMY_ID_SPLIT_1 = "i1"; + final static private String FIELD_UNIPROT_TAXONOMY_ID_SPLIT_2 = "i2"; + final static private String FIELD_DUMMY = "dummy"; + final static private String INTERNAL_NAMES_ARE_BOOT_SUPPPORT = "i"; + final static private String MIDPOINT_REROOT = "m"; + final static private String EXTRACT_TAXONOMY = "xt"; + final static private String EXTRACT_TAXONOMY_PF = "xp"; + final static private String ORDER_SUBTREES = "o"; + final static private String NO_TREE_LEVEL_INDENDATION = "ni"; + final static private String REPLACE_UNDER_SCORES = "ru"; + final static private String PRG_NAME = "phyloxml_converter"; + final static private String PRG_VERSION = "1.30"; + final static private String PRG_DATE = "2011.03.01"; + final static private String E_MAIL = "phylosoft@gmail.com"; + final static private String WWW = "www.phylosoft.org/forester/"; + final static private boolean SPECIAL = false; public static void main( final String args[] ) { ForesterUtil.printProgramInformation( PRG_NAME, PRG_VERSION, PRG_DATE, E_MAIL, WWW ); @@ -142,6 +144,12 @@ public class phyloxml_converter { else if ( field_option_value.equals( FIELD_SEQUENCE_SYMBOL ) ) { field = PhylogenyNodeField.SEQUENCE_SYMBOL; } + else if ( field_option_value.equals( FIELD_UNIPROT_TAXONOMY_ID_SPLIT_1 ) ) { + field = PhylogenyNodeField.TAXONOMY_ID_UNIPROT_1; + } + else if ( field_option_value.equals( FIELD_UNIPROT_TAXONOMY_ID_SPLIT_2 ) ) { + field = PhylogenyNodeField.TAXONOMY_ID_UNIPROT_2; + } else if ( field_option_value.equals( FIELD_DUMMY ) ) { } else { @@ -353,6 +361,14 @@ public class phyloxml_converter { System.out.println( " " + FIELD_TAXONOMY_COMM_NAME + ": transfer name to taxonomy common name" ); System.out.println( " " + FIELD_SEQUENCE_GENE_NAME + ": transfer name to sequence name" ); System.out.println( " " + FIELD_SEQUENCE_SYMBOL + ": transfer name to sequence symbol" ); + System.out + .println( " " + + FIELD_UNIPROT_TAXONOMY_ID_SPLIT_1 + + ": transfer/split name to taxonomy uniprot identifier\n (split at underscore if \"id_name\" pattern, e.g. \"817_SusD\")" ); + System.out + .println( " " + + FIELD_UNIPROT_TAXONOMY_ID_SPLIT_2 + + ": transfer/split name to taxonomy uniprot identifier\n (split at underscore if \"name_id\" pattern, e.g. \"SusD_817\")" ); System.out.println(); System.out.println( " options: " ); System.out.println( " -" + INTERNAL_NAMES_ARE_BOOT_SUPPPORT diff --git a/forester/java/src/org/forester/application/printAllSpecies.java b/forester/java/src/org/forester/application/printAllSpecies.java index 734239b..3d31929 100644 --- a/forester/java/src/org/forester/application/printAllSpecies.java +++ b/forester/java/src/org/forester/application/printAllSpecies.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/application/printSameOrder.java b/forester/java/src/org/forester/application/printSameOrder.java index 530a0fe..b45d132 100644 --- a/forester/java/src/org/forester/application/printSameOrder.java +++ b/forester/java/src/org/forester/application/printSameOrder.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/application/rio.java b/forester/java/src/org/forester/application/rio.java index b4902b1..88e3444 100644 --- a/forester/java/src/org/forester/application/rio.java +++ b/forester/java/src/org/forester/application/rio.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/application/sdi.java b/forester/java/src/org/forester/application/sdi.java index 08d94fb..47e493f 100644 --- a/forester/java/src/org/forester/application/sdi.java +++ b/forester/java/src/org/forester/application/sdi.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -130,16 +130,18 @@ public final class sdi { species_tree = factory.create( species_tree_file, new PhyloXmlParser() )[ 0 ]; } catch ( final IOException e ) { - ForesterUtil.fatalError( sdi.PRG_NAME, "Failed to read species tree from \"" + gene_tree_file + "\" [" - + e.getMessage() + "]" ); + ForesterUtil.fatalError( sdi.PRG_NAME, + "Failed to read species tree from \"" + gene_tree_file + "\" [" + e.getMessage() + + "]" ); } try { final PhylogenyFactory factory = ParserBasedPhylogenyFactory.getInstance(); gene_tree = factory.create( gene_tree_file, new PhyloXmlParser() )[ 0 ]; } catch ( final IOException e ) { - ForesterUtil.fatalError( sdi.PRG_NAME, "Failed to read gene tree from \"" + gene_tree_file + "\" [" - + e.getMessage() + "]" ); + ForesterUtil.fatalError( sdi.PRG_NAME, + "Failed to read gene tree from \"" + gene_tree_file + "\" [" + e.getMessage() + + "]" ); } gene_tree.setRooted( true ); species_tree.setRooted( true ); diff --git a/forester/java/src/org/forester/application/sdi_dir.java b/forester/java/src/org/forester/application/sdi_dir.java index fddb6e4..bc91edb 100644 --- a/forester/java/src/org/forester/application/sdi_dir.java +++ b/forester/java/src/org/forester/application/sdi_dir.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/application/sdi_r.java b/forester/java/src/org/forester/application/sdi_r.java index 258e0f4..0b2475b 100644 --- a/forester/java/src/org/forester/application/sdi_r.java +++ b/forester/java/src/org/forester/application/sdi_r.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -115,8 +115,9 @@ public class sdi_r { species_tree = factory.create( species_tree_file, pp )[ 0 ]; } catch ( final IOException e ) { - ForesterUtil.fatalError( PRG_NAME, "failed to read species tree [" + species_tree_file + "]: " - + e.getLocalizedMessage() ); + ForesterUtil.fatalError( PRG_NAME, + "failed to read species tree [" + species_tree_file + "]: " + + e.getLocalizedMessage() ); } if ( !species_tree.isRooted() ) { ForesterUtil.fatalError( PRG_NAME, "species tree [" + species_tree_file + "] is not rooted" ); @@ -126,8 +127,8 @@ public class sdi_r { gene_trees = factory.create( gene_tree_file, pp ); } catch ( final IOException e ) { - ForesterUtil.fatalError( PRG_NAME, "failed to read gene trees [" + gene_tree_file + "]: " - + e.getLocalizedMessage() ); + ForesterUtil.fatalError( PRG_NAME, + "failed to read gene trees [" + gene_tree_file + "]: " + e.getLocalizedMessage() ); } // Removes from gene_tree all species not found in species_tree. int gene_tree_counter = 0; @@ -197,8 +198,9 @@ public class sdi_r { + ForesterUtil.FORMATTER_06.format( sdiunrooted.getMinimalTreeHeight() ) ); ForesterUtil.programMessage( PRG_NAME, "Minimal difference in subtree heights: " + ForesterUtil.FORMATTER_06.format( sdiunrooted.getMinimalDiffInSubTreeHeights() ) ); - ForesterUtil.programMessage( PRG_NAME, "Duplications in midpoint rooted tree : " - + sdiunrooted.getMinimalDuplications() ); + ForesterUtil.programMessage( PRG_NAME, + "Duplications in midpoint rooted tree : " + + sdiunrooted.getMinimalDuplications() ); } else { ForesterUtil.programMessage( PRG_NAME, "No (re) rooting was performed." ); @@ -223,8 +225,8 @@ public class sdi_r { w.toPhyloXML( outfile, all_result_trees, 0, ForesterUtil.LINE_SEPARATOR ); } catch ( final IOException e ) { - ForesterUtil.fatalError( PRG_NAME, "failure to write output to [" + outfile + "]: " - + e.getLocalizedMessage() ); + ForesterUtil.fatalError( PRG_NAME, + "failure to write output to [" + outfile + "]: " + e.getLocalizedMessage() ); } ForesterUtil.programMessage( PRG_NAME, "Wrote: " + outfile ); ForesterUtil.programMessage( PRG_NAME, "OK." ); diff --git a/forester/java/src/org/forester/application/sdix.java b/forester/java/src/org/forester/application/sdix.java index a14d459..f8304dd 100644 --- a/forester/java/src/org/forester/application/sdix.java +++ b/forester/java/src/org/forester/application/sdix.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -42,11 +42,11 @@ import org.forester.util.ForesterUtil; public class sdix { - final static private String HELP_OPTION_1 = "help"; - final static private String HELP_OPTION_2 = "h"; - final static private String PRG_NAME = "sdix"; - final static private String PRG_VERSION = "0.001 alpha"; - final static private String PRG_DATE = "2009.10.14"; + final static private String HELP_OPTION_1 = "help"; + final static private String HELP_OPTION_2 = "h"; + final static private String PRG_NAME = "sdix"; + final static private String PRG_VERSION = "0.001 alpha"; + final static private String PRG_DATE = "2009.10.14"; public static void main( final String args[] ) { ForesterUtil.printProgramInformation( PRG_NAME, PRG_VERSION, PRG_DATE ); @@ -114,8 +114,9 @@ public class sdix { species_trees = factory.create( species_trees_file, new PhyloXmlParser() ); } catch ( final IOException e ) { - ForesterUtil.fatalError( PRG_NAME, "failed to read species trees from [" + species_trees_file + "] [" - + e.getMessage() + "]" ); + ForesterUtil.fatalError( PRG_NAME, + "failed to read species trees from [" + species_trees_file + "] [" + + e.getMessage() + "]" ); } if ( ( species_trees == null ) || ( species_trees.length < 1 ) ) { ForesterUtil.fatalError( PRG_NAME, "failed to read species trees from [" + species_trees_file + "]" ); @@ -124,6 +125,7 @@ public class sdix { + species_trees_file + "]" ); final FilenameFilter filter = new FilenameFilter() { + @Override public boolean accept( final File dir, final String name ) { return ( !name.startsWith( "." ) && !name.startsWith( "00_" ) && name.endsWith( ".xml" ) ); } diff --git a/forester/java/src/org/forester/application/simple_node_processor.java b/forester/java/src/org/forester/application/simple_node_processor.java index 399f9f2..3f713dc 100644 --- a/forester/java/src/org/forester/application/simple_node_processor.java +++ b/forester/java/src/org/forester/application/simple_node_processor.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/application/strip.java b/forester/java/src/org/forester/application/strip.java index 308878f..7af9ff8 100644 --- a/forester/java/src/org/forester/application/strip.java +++ b/forester/java/src/org/forester/application/strip.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/application/support_statistics.java b/forester/java/src/org/forester/application/support_statistics.java index 7e26be7..4235048 100644 --- a/forester/java/src/org/forester/application/support_statistics.java +++ b/forester/java/src/org/forester/application/support_statistics.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/application/support_transfer.java b/forester/java/src/org/forester/application/support_transfer.java index 12e0a41..f6e2aed 100644 --- a/forester/java/src/org/forester/application/support_transfer.java +++ b/forester/java/src/org/forester/application/support_transfer.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -162,8 +162,8 @@ public final class support_transfer { final List ext_children_from = node_from.getAllExternalDescendantsNames(); if ( ( ext_children_from.size() == ext_children_to.size() ) && ext_children_from.containsAll( ext_children_to ) ) { - PhylogenyMethods.setBootstrapConfidence( node_to, PhylogenyMethods - .getConfidenceValue( node_from ) ); + PhylogenyMethods.setBootstrapConfidence( node_to, + PhylogenyMethods.getConfidenceValue( node_from ) ); continue to; } } diff --git a/forester/java/src/org/forester/application/surf_paup.java b/forester/java/src/org/forester/application/surf_paup.java index 297e16f..a60d22f 100644 --- a/forester/java/src/org/forester/application/surf_paup.java +++ b/forester/java/src/org/forester/application/surf_paup.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -101,8 +101,9 @@ public class surf_paup { phylogenies = factory.create( surfacing_nexus_outfile, phylogeny_parser ); } catch ( final IOException e ) { - ForesterUtil.fatalError( PRG_NAME, "problem with parsing phylogeny [" + surfacing_nexus_outfile + "]: " - + e.getMessage() ); + ForesterUtil.fatalError( PRG_NAME, + "problem with parsing phylogeny [" + surfacing_nexus_outfile + "]: " + + e.getMessage() ); e.printStackTrace(); } if ( phylogenies.length != 1 ) { @@ -121,11 +122,12 @@ public class surf_paup { matrix = paup_log_parser.parse(); } catch ( final IOException e ) { - ForesterUtil.fatalError( PRG_NAME, "failed to parse matrix from [" + paup_log_file + "]: " - + e.getMessage() ); + ForesterUtil.fatalError( PRG_NAME, + "failed to parse matrix from [" + paup_log_file + "]: " + e.getMessage() ); } - ForesterUtil.programMessage( PRG_NAME, "read in character state matrix of size " - + matrix.getNumberOfIdentifiers() + "x" + matrix.getNumberOfCharacters() ); + ForesterUtil.programMessage( PRG_NAME, + "read in character state matrix of size " + matrix.getNumberOfIdentifiers() + "x" + + matrix.getNumberOfCharacters() ); final DomainParsimonyCalculator domain_parsimony = DomainParsimonyCalculator.createInstance( phylogeny ); domain_parsimony.executeOnGivenBinaryStatesMatrix( matrix, labels ); final String sep = ForesterUtil.LINE_SEPARATOR + "###################" + ForesterUtil.LINE_SEPARATOR; diff --git a/forester/java/src/org/forester/application/surfacing.java b/forester/java/src/org/forester/application/surfacing.java index 4f1073c..580eea4 100644 --- a/forester/java/src/org/forester/application/surfacing.java +++ b/forester/java/src/org/forester/application/surfacing.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -71,21 +71,21 @@ import org.forester.surfacing.DomainId; import org.forester.surfacing.DomainLengthsTable; import org.forester.surfacing.DomainParsimonyCalculator; import org.forester.surfacing.DomainSimilarity; +import org.forester.surfacing.DomainSimilarity.DomainSimilarityScoring; +import org.forester.surfacing.DomainSimilarity.DomainSimilaritySortField; import org.forester.surfacing.DomainSimilarityCalculator; +import org.forester.surfacing.DomainSimilarityCalculator.Detailedness; import org.forester.surfacing.GenomeWideCombinableDomains; +import org.forester.surfacing.GenomeWideCombinableDomains.GenomeWideCombinableDomainsSortOrder; import org.forester.surfacing.MappingResults; import org.forester.surfacing.PairwiseDomainSimilarityCalculator; import org.forester.surfacing.PairwiseGenomeComparator; import org.forester.surfacing.PrintableDomainSimilarity; +import org.forester.surfacing.PrintableDomainSimilarity.PRINT_OPTION; import org.forester.surfacing.Protein; import org.forester.surfacing.ProteinCountsBasedPairwiseDomainSimilarityCalculator; import org.forester.surfacing.Species; import org.forester.surfacing.SurfacingUtil; -import org.forester.surfacing.DomainSimilarity.DomainSimilarityScoring; -import org.forester.surfacing.DomainSimilarity.DomainSimilaritySortField; -import org.forester.surfacing.DomainSimilarityCalculator.Detailedness; -import org.forester.surfacing.GenomeWideCombinableDomains.GenomeWideCombinableDomainsSortOrder; -import org.forester.surfacing.PrintableDomainSimilarity.PRINT_OPTION; import org.forester.util.BasicTable; import org.forester.util.BasicTableParser; import org.forester.util.CommandLineArguments; @@ -522,9 +522,11 @@ public class surfacing { ForesterUtil.fatalError( surfacing.PRG_NAME, "input tree [" + intree_file + "] is not rooted" ); } if ( intree.getNumberOfExternalNodes() < number_of_genomes ) { - ForesterUtil.fatalError( surfacing.PRG_NAME, "number of external nodes [" - + intree.getNumberOfExternalNodes() + "] of input tree [" + intree_file - + "] is smaller than the number of genomes the be analyzed [" + number_of_genomes + "]" ); + ForesterUtil.fatalError( surfacing.PRG_NAME, + "number of external nodes [" + intree.getNumberOfExternalNodes() + + "] of input tree [" + intree_file + + "] is smaller than the number of genomes the be analyzed [" + + number_of_genomes + "]" ); } final StringBuilder parent_names = new StringBuilder(); final int nodes_lacking_name = SurfacingUtil.getNumberOfNodesLackingName( intree, parent_names ); @@ -1304,8 +1306,8 @@ public class surfacing { .createDomainIdToSecondaryFeaturesMap( secondary_features_map_files[ i ] ); } catch ( final IOException e ) { - ForesterUtil.fatalError( surfacing.PRG_NAME, "cannot read secondary features map file: " - + e.getMessage() ); + ForesterUtil.fatalError( surfacing.PRG_NAME, + "cannot read secondary features map file: " + e.getMessage() ); } catch ( final Exception e ) { ForesterUtil.fatalError( surfacing.PRG_NAME, "problem with contents of features map file [" @@ -1778,8 +1780,7 @@ public class surfacing { if ( max_allowed_overlap != surfacing.MAX_ALLOWED_OVERLAP_DEFAULT ) { parser.setMaxAllowedOverlap( max_allowed_overlap ); } - parser - .setReturnType( HmmscanPerDomainTableParser.ReturnType.UNORDERED_PROTEIN_DOMAIN_COLLECTION_PER_PROTEIN ); + parser.setReturnType( HmmscanPerDomainTableParser.ReturnType.UNORDERED_PROTEIN_DOMAIN_COLLECTION_PER_PROTEIN ); if ( individual_score_cutoffs != null ) { parser.setIndividualScoreCutoffs( individual_score_cutoffs ); } @@ -1813,7 +1814,8 @@ public class surfacing { System.out.println( "Domains ignored due to individual score cutoffs: " + parser.getDomainsIgnoredDueToIndividualScoreCutoff() ); log( "Domains ignored due to individual score cutoffs: " - + parser.getDomainsIgnoredDueToIndividualScoreCutoff(), log_writer ); + + parser.getDomainsIgnoredDueToIndividualScoreCutoff(), + log_writer ); System.out.println( "Domains ignored due to E-value : " + parser.getDomainsIgnoredDueToEval() ); log( "Domains ignored due to E-value : " + parser.getDomainsIgnoredDueToEval(), log_writer ); @@ -1829,7 +1831,8 @@ public class surfacing { System.out.println( "Domains ignored due negative domain filter : " + parser.getDomainsIgnoredDueToNegativeDomainFilter() ); log( "Domains ignored due negative domain filter : " - + parser.getDomainsIgnoredDueToNegativeDomainFilter(), log_writer ); + + parser.getDomainsIgnoredDueToNegativeDomainFilter(), + log_writer ); System.out.println( "Domains ignored due to overlap : " + parser.getDomainsIgnoredDueToOverlap() ); log( "Domains ignored due to overlap : " + parser.getDomainsIgnoredDueToOverlap(), @@ -2082,12 +2085,13 @@ public class surfacing { } SurfacingUtil.writeMatrixToFile( new File( matrix_output_file + surfacing.MATRIX_MEAN_SCORE_BASED_GENOME_DISTANCE_SUFFIX ), pwgc.getDomainDistanceScoresMeans() ); + SurfacingUtil + .writeMatrixToFile( new File( matrix_output_file + + surfacing.MATRIX_SHARED_BIN_COMBINATIONS_BASED_GENOME_DISTANCE_SUFFIX ), + pwgc.getSharedBinaryCombinationsBasedDistances() ); SurfacingUtil.writeMatrixToFile( new File( matrix_output_file - + surfacing.MATRIX_SHARED_BIN_COMBINATIONS_BASED_GENOME_DISTANCE_SUFFIX ), pwgc - .getSharedBinaryCombinationsBasedDistances() ); - SurfacingUtil.writeMatrixToFile( new File( matrix_output_file - + surfacing.MATRIX_SHARED_DOMAINS_BASED_GENOME_DISTANCE_SUFFIX ), pwgc - .getSharedDomainsBasedDistances() ); + + surfacing.MATRIX_SHARED_DOMAINS_BASED_GENOME_DISTANCE_SUFFIX ), + pwgc.getSharedDomainsBasedDistances() ); final Phylogeny nj_gd = SurfacingUtil.createNjTreeBasedOnMatrixToFile( new File( matrix_output_file + surfacing.NJ_TREE_MEAN_SCORE_BASED_GENOME_DISTANCE_SUFFIX ), pwgc.getDomainDistanceScoresMeans() .get( 0 ) ); @@ -2119,14 +2123,19 @@ public class surfacing { jacknife_resamplings, jacknife_ratio, random_seed ); - SurfacingUtil.writeMatrixToFile( new File( matrix_output_file + "_" - + ForesterUtil.round( jacknife_ratio, 2 ) + "_" + jacknife_resamplings - + surfacing.MATRIX_SHARED_BIN_COMBINATIONS_BASED_GENOME_DISTANCE_SUFFIX ), pwgc - .getSharedBinaryCombinationsBasedDistances() ); - SurfacingUtil.writeMatrixToFile( new File( matrix_output_file + "_" - + ForesterUtil.round( jacknife_ratio, 2 ) + "_" + jacknife_resamplings - + surfacing.MATRIX_SHARED_DOMAINS_BASED_GENOME_DISTANCE_SUFFIX ), pwgc - .getSharedDomainsBasedDistances() ); + SurfacingUtil + .writeMatrixToFile( new File( matrix_output_file + + "_" + + ForesterUtil.round( jacknife_ratio, 2 ) + + "_" + + jacknife_resamplings + + surfacing.MATRIX_SHARED_BIN_COMBINATIONS_BASED_GENOME_DISTANCE_SUFFIX ), + pwgc.getSharedBinaryCombinationsBasedDistances() ); + SurfacingUtil + .writeMatrixToFile( new File( matrix_output_file + "_" + ForesterUtil.round( jacknife_ratio, 2 ) + + "_" + jacknife_resamplings + + surfacing.MATRIX_SHARED_DOMAINS_BASED_GENOME_DISTANCE_SUFFIX ), + pwgc.getSharedDomainsBasedDistances() ); // if ( infer_species_trees ) { // inferSpeciesTrees( new File( output_file + "_" + jacknife_resamplings // + INFERRED_SBC_BASED_NJ_SPECIES_TREE_SUFFIX ), pwgc diff --git a/forester/java/src/org/forester/application/surfacing_hmmpfam.java b/forester/java/src/org/forester/application/surfacing_hmmpfam.java index 9185725..eeeb5bb 100644 --- a/forester/java/src/org/forester/application/surfacing_hmmpfam.java +++ b/forester/java/src/org/forester/application/surfacing_hmmpfam.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -67,21 +67,21 @@ import org.forester.surfacing.DomainId; import org.forester.surfacing.DomainLengthsTable; import org.forester.surfacing.DomainParsimonyCalculator; import org.forester.surfacing.DomainSimilarity; +import org.forester.surfacing.DomainSimilarity.DomainSimilarityScoring; +import org.forester.surfacing.DomainSimilarity.DomainSimilaritySortField; import org.forester.surfacing.DomainSimilarityCalculator; +import org.forester.surfacing.DomainSimilarityCalculator.Detailedness; import org.forester.surfacing.GenomeWideCombinableDomains; +import org.forester.surfacing.GenomeWideCombinableDomains.GenomeWideCombinableDomainsSortOrder; import org.forester.surfacing.MappingResults; import org.forester.surfacing.PairwiseDomainSimilarityCalculator; import org.forester.surfacing.PairwiseGenomeComparator; import org.forester.surfacing.PrintableDomainSimilarity; +import org.forester.surfacing.PrintableDomainSimilarity.PRINT_OPTION; import org.forester.surfacing.Protein; import org.forester.surfacing.ProteinCountsBasedPairwiseDomainSimilarityCalculator; import org.forester.surfacing.Species; import org.forester.surfacing.SurfacingUtil; -import org.forester.surfacing.DomainSimilarity.DomainSimilarityScoring; -import org.forester.surfacing.DomainSimilarity.DomainSimilaritySortField; -import org.forester.surfacing.DomainSimilarityCalculator.Detailedness; -import org.forester.surfacing.GenomeWideCombinableDomains.GenomeWideCombinableDomainsSortOrder; -import org.forester.surfacing.PrintableDomainSimilarity.PRINT_OPTION; import org.forester.util.BasicTable; import org.forester.util.BasicTableParser; import org.forester.util.CommandLineArguments; @@ -517,9 +517,11 @@ public class surfacing_hmmpfam { ForesterUtil.fatalError( surfacing_hmmpfam.PRG_NAME, "input tree [" + intree_file + "] is not rooted" ); } if ( intree.getNumberOfExternalNodes() < number_of_genomes ) { - ForesterUtil.fatalError( surfacing_hmmpfam.PRG_NAME, "number of external nodes [" - + intree.getNumberOfExternalNodes() + "] of input tree [" + intree_file - + "] is smaller than the number of genomes the be analyzed [" + number_of_genomes + "]" ); + ForesterUtil.fatalError( surfacing_hmmpfam.PRG_NAME, + "number of external nodes [" + intree.getNumberOfExternalNodes() + + "] of input tree [" + intree_file + + "] is smaller than the number of genomes the be analyzed [" + + number_of_genomes + "]" ); } final StringBuilder parent_names = new StringBuilder(); final int nodes_lacking_name = SurfacingUtil.getNumberOfNodesLackingName( intree, parent_names ); @@ -777,8 +779,7 @@ public class surfacing_hmmpfam { ForesterUtil.fatalError( surfacing_hmmpfam.PRG_NAME, "no value for negative domains filter: -" + surfacing_hmmpfam.FILTER_NEGATIVE_DOMAINS_OPTION + "=" ); } - negative_domains_filter_file = new File( cla - .getOptionValue( surfacing_hmmpfam.FILTER_NEGATIVE_DOMAINS_OPTION ) ); + negative_domains_filter_file = new File( cla.getOptionValue( surfacing_hmmpfam.FILTER_NEGATIVE_DOMAINS_OPTION ) ); final String msg = ForesterUtil.isReadableFile( negative_domains_filter_file ); if ( !ForesterUtil.isEmpty( msg ) ) { ForesterUtil.fatalError( surfacing_hmmpfam.PRG_NAME, "can not read from \"" @@ -1119,8 +1120,8 @@ public class surfacing_hmmpfam { } } catch ( final IOException e ) { - ForesterUtil.fatalError( surfacing_hmmpfam.PRG_NAME, "cannot read from GO OBO file: " - + e.getLocalizedMessage() ); + ForesterUtil.fatalError( surfacing_hmmpfam.PRG_NAME, + "cannot read from GO OBO file: " + e.getLocalizedMessage() ); } } Map go_id_to_term_map = null; @@ -2027,15 +2028,18 @@ public class surfacing_hmmpfam { matrix_output_file = out_dir + ForesterUtil.FILE_SEPARATOR + matrix_output_file; output_file = new File( out_dir + ForesterUtil.FILE_SEPARATOR + output_file ); } - SurfacingUtil.writeMatrixToFile( new File( matrix_output_file - + surfacing_hmmpfam.MATRIX_MEAN_SCORE_BASED_GENOME_DISTANCE_SUFFIX ), pwgc - .getDomainDistanceScoresMeans() ); - SurfacingUtil.writeMatrixToFile( new File( matrix_output_file - + surfacing_hmmpfam.MATRIX_SHARED_BIN_COMBINATIONS_BASED_GENOME_DISTANCE_SUFFIX ), pwgc - .getSharedBinaryCombinationsBasedDistances() ); - SurfacingUtil.writeMatrixToFile( new File( matrix_output_file - + surfacing_hmmpfam.MATRIX_SHARED_DOMAINS_BASED_GENOME_DISTANCE_SUFFIX ), pwgc - .getSharedDomainsBasedDistances() ); + SurfacingUtil + .writeMatrixToFile( new File( matrix_output_file + + surfacing_hmmpfam.MATRIX_MEAN_SCORE_BASED_GENOME_DISTANCE_SUFFIX ), + pwgc.getDomainDistanceScoresMeans() ); + SurfacingUtil + .writeMatrixToFile( new File( matrix_output_file + + surfacing_hmmpfam.MATRIX_SHARED_BIN_COMBINATIONS_BASED_GENOME_DISTANCE_SUFFIX ), + pwgc.getSharedBinaryCombinationsBasedDistances() ); + SurfacingUtil + .writeMatrixToFile( new File( matrix_output_file + + surfacing_hmmpfam.MATRIX_SHARED_DOMAINS_BASED_GENOME_DISTANCE_SUFFIX ), + pwgc.getSharedDomainsBasedDistances() ); final Phylogeny nj_gd = SurfacingUtil.createNjTreeBasedOnMatrixToFile( new File( matrix_output_file + surfacing_hmmpfam.NJ_TREE_MEAN_SCORE_BASED_GENOME_DISTANCE_SUFFIX ), pwgc .getDomainDistanceScoresMeans().get( 0 ) ); @@ -2067,14 +2071,22 @@ public class surfacing_hmmpfam { jacknife_resamplings, jacknife_ratio, random_seed ); - SurfacingUtil.writeMatrixToFile( new File( matrix_output_file + "_" - + ForesterUtil.round( jacknife_ratio, 2 ) + "_" + jacknife_resamplings - + surfacing_hmmpfam.MATRIX_SHARED_BIN_COMBINATIONS_BASED_GENOME_DISTANCE_SUFFIX ), pwgc - .getSharedBinaryCombinationsBasedDistances() ); - SurfacingUtil.writeMatrixToFile( new File( matrix_output_file + "_" - + ForesterUtil.round( jacknife_ratio, 2 ) + "_" + jacknife_resamplings - + surfacing_hmmpfam.MATRIX_SHARED_DOMAINS_BASED_GENOME_DISTANCE_SUFFIX ), pwgc - .getSharedDomainsBasedDistances() ); + SurfacingUtil + .writeMatrixToFile( new File( matrix_output_file + + "_" + + ForesterUtil.round( jacknife_ratio, 2 ) + + "_" + + jacknife_resamplings + + surfacing_hmmpfam.MATRIX_SHARED_BIN_COMBINATIONS_BASED_GENOME_DISTANCE_SUFFIX ), + pwgc.getSharedBinaryCombinationsBasedDistances() ); + SurfacingUtil + .writeMatrixToFile( new File( matrix_output_file + + "_" + + ForesterUtil.round( jacknife_ratio, 2 ) + + "_" + + jacknife_resamplings + + surfacing_hmmpfam.MATRIX_SHARED_DOMAINS_BASED_GENOME_DISTANCE_SUFFIX ), + pwgc.getSharedDomainsBasedDistances() ); // if ( infer_species_trees ) { // inferSpeciesTrees( new File( output_file + "_" + jacknife_resamplings // + INFERRED_SBC_BASED_NJ_SPECIES_TREE_SUFFIX ), pwgc diff --git a/forester/java/src/org/forester/application/surfacing_old.java b/forester/java/src/org/forester/application/surfacing_old.java index 07711ee..443191c 100644 --- a/forester/java/src/org/forester/application/surfacing_old.java +++ b/forester/java/src/org/forester/application/surfacing_old.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -68,21 +68,21 @@ import org.forester.surfacing.DomainId; import org.forester.surfacing.DomainLengthsTable; import org.forester.surfacing.DomainParsimonyCalculator; import org.forester.surfacing.DomainSimilarity; +import org.forester.surfacing.DomainSimilarity.DomainSimilarityScoring; +import org.forester.surfacing.DomainSimilarity.DomainSimilaritySortField; import org.forester.surfacing.DomainSimilarityCalculator; +import org.forester.surfacing.DomainSimilarityCalculator.Detailedness; import org.forester.surfacing.GenomeWideCombinableDomains; +import org.forester.surfacing.GenomeWideCombinableDomains.GenomeWideCombinableDomainsSortOrder; import org.forester.surfacing.MappingResults; import org.forester.surfacing.PairwiseDomainSimilarityCalculator; import org.forester.surfacing.PairwiseGenomeComparator; import org.forester.surfacing.PrintableDomainSimilarity; +import org.forester.surfacing.PrintableDomainSimilarity.PRINT_OPTION; import org.forester.surfacing.Protein; import org.forester.surfacing.ProteinCountsBasedPairwiseDomainSimilarityCalculator; import org.forester.surfacing.Species; import org.forester.surfacing.SurfacingUtil; -import org.forester.surfacing.DomainSimilarity.DomainSimilarityScoring; -import org.forester.surfacing.DomainSimilarity.DomainSimilaritySortField; -import org.forester.surfacing.DomainSimilarityCalculator.Detailedness; -import org.forester.surfacing.GenomeWideCombinableDomains.GenomeWideCombinableDomainsSortOrder; -import org.forester.surfacing.PrintableDomainSimilarity.PRINT_OPTION; import org.forester.util.BasicTable; import org.forester.util.BasicTableParser; import org.forester.util.CommandLineArguments; @@ -517,9 +517,11 @@ public class surfacing_old { ForesterUtil.fatalError( surfacing_old.PRG_NAME, "input tree [" + intree_file + "] is not rooted" ); } if ( intree.getNumberOfExternalNodes() < number_of_genomes ) { - ForesterUtil.fatalError( surfacing_old.PRG_NAME, "number of external nodes [" - + intree.getNumberOfExternalNodes() + "] of input tree [" + intree_file - + "] is smaller than the number of genomes the be analyzed [" + number_of_genomes + "]" ); + ForesterUtil.fatalError( surfacing_old.PRG_NAME, + "number of external nodes [" + intree.getNumberOfExternalNodes() + + "] of input tree [" + intree_file + + "] is smaller than the number of genomes the be analyzed [" + + number_of_genomes + "]" ); } final StringBuilder parent_names = new StringBuilder(); final int nodes_lacking_name = SurfacingUtil.getNumberOfNodesLackingName( intree, parent_names ); @@ -1113,8 +1115,8 @@ public class surfacing_old { } } catch ( final IOException e ) { - ForesterUtil.fatalError( surfacing_old.PRG_NAME, "cannot read from GO OBO file: " - + e.getLocalizedMessage() ); + ForesterUtil.fatalError( surfacing_old.PRG_NAME, + "cannot read from GO OBO file: " + e.getLocalizedMessage() ); } } Map go_id_to_term_map = null; @@ -1307,8 +1309,8 @@ public class surfacing_old { .createDomainIdToSecondaryFeaturesMap( secondary_features_map_files[ i ] ); } catch ( final IOException e ) { - ForesterUtil.fatalError( surfacing_old.PRG_NAME, "cannot read secondary features map file: " - + e.getMessage() ); + ForesterUtil.fatalError( surfacing_old.PRG_NAME, + "cannot read secondary features map file: " + e.getMessage() ); } catch ( final Exception e ) { ForesterUtil.fatalError( surfacing_old.PRG_NAME, "problem with contents of features map file [" @@ -2021,14 +2023,16 @@ public class surfacing_old { output_file = new File( out_dir + ForesterUtil.FILE_SEPARATOR + output_file ); } SurfacingUtil.writeMatrixToFile( new File( matrix_output_file - + surfacing_old.MATRIX_MEAN_SCORE_BASED_GENOME_DISTANCE_SUFFIX ), pwgc - .getDomainDistanceScoresMeans() ); - SurfacingUtil.writeMatrixToFile( new File( matrix_output_file - + surfacing_old.MATRIX_SHARED_BIN_COMBINATIONS_BASED_GENOME_DISTANCE_SUFFIX ), pwgc - .getSharedBinaryCombinationsBasedDistances() ); - SurfacingUtil.writeMatrixToFile( new File( matrix_output_file - + surfacing_old.MATRIX_SHARED_DOMAINS_BASED_GENOME_DISTANCE_SUFFIX ), pwgc - .getSharedDomainsBasedDistances() ); + + surfacing_old.MATRIX_MEAN_SCORE_BASED_GENOME_DISTANCE_SUFFIX ), + pwgc.getDomainDistanceScoresMeans() ); + SurfacingUtil + .writeMatrixToFile( new File( matrix_output_file + + surfacing_old.MATRIX_SHARED_BIN_COMBINATIONS_BASED_GENOME_DISTANCE_SUFFIX ), + pwgc.getSharedBinaryCombinationsBasedDistances() ); + SurfacingUtil + .writeMatrixToFile( new File( matrix_output_file + + surfacing_old.MATRIX_SHARED_DOMAINS_BASED_GENOME_DISTANCE_SUFFIX ), + pwgc.getSharedDomainsBasedDistances() ); final Phylogeny nj_gd = SurfacingUtil.createNjTreeBasedOnMatrixToFile( new File( matrix_output_file + surfacing_old.NJ_TREE_MEAN_SCORE_BASED_GENOME_DISTANCE_SUFFIX ), pwgc .getDomainDistanceScoresMeans().get( 0 ) ); @@ -2060,14 +2064,19 @@ public class surfacing_old { jacknife_resamplings, jacknife_ratio, random_seed ); - SurfacingUtil.writeMatrixToFile( new File( matrix_output_file + "_" - + ForesterUtil.round( jacknife_ratio, 2 ) + "_" + jacknife_resamplings - + surfacing_old.MATRIX_SHARED_BIN_COMBINATIONS_BASED_GENOME_DISTANCE_SUFFIX ), pwgc - .getSharedBinaryCombinationsBasedDistances() ); - SurfacingUtil.writeMatrixToFile( new File( matrix_output_file + "_" - + ForesterUtil.round( jacknife_ratio, 2 ) + "_" + jacknife_resamplings - + surfacing_old.MATRIX_SHARED_DOMAINS_BASED_GENOME_DISTANCE_SUFFIX ), pwgc - .getSharedDomainsBasedDistances() ); + SurfacingUtil + .writeMatrixToFile( new File( matrix_output_file + + "_" + + ForesterUtil.round( jacknife_ratio, 2 ) + + "_" + + jacknife_resamplings + + surfacing_old.MATRIX_SHARED_BIN_COMBINATIONS_BASED_GENOME_DISTANCE_SUFFIX ), + pwgc.getSharedBinaryCombinationsBasedDistances() ); + SurfacingUtil + .writeMatrixToFile( new File( matrix_output_file + "_" + ForesterUtil.round( jacknife_ratio, 2 ) + + "_" + jacknife_resamplings + + surfacing_old.MATRIX_SHARED_DOMAINS_BASED_GENOME_DISTANCE_SUFFIX ), + pwgc.getSharedDomainsBasedDistances() ); // if ( infer_species_trees ) { // inferSpeciesTrees( new File( output_file + "_" + jacknife_resamplings // + INFERRED_SBC_BASED_NJ_SPECIES_TREE_SUFFIX ), pwgc diff --git a/forester/java/src/org/forester/application/ta.java b/forester/java/src/org/forester/application/ta.java index 5817b84..b460916 100644 --- a/forester/java/src/org/forester/application/ta.java +++ b/forester/java/src/org/forester/application/ta.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -131,8 +131,9 @@ public class ta { species_tree = factory.create( species_tree_file, pp )[ 0 ]; } catch ( final IOException e ) { - ForesterUtil.fatalError( PRG_NAME, "Failed to read species tree from \"" + gene_tree_file + "\" [" - + e.getMessage() + "]" ); + ForesterUtil.fatalError( PRG_NAME, + "Failed to read species tree from \"" + gene_tree_file + "\" [" + e.getMessage() + + "]" ); } try { final PhylogenyFactory factory = ParserBasedPhylogenyFactory.getInstance(); @@ -140,8 +141,9 @@ public class ta { gene_tree = factory.create( gene_tree_file, pp )[ 0 ]; } catch ( final IOException e ) { - ForesterUtil.fatalError( PRG_NAME, "Failed to read gene tree from \"" + gene_tree_file + "\" [" - + e.getMessage() + "]" ); + ForesterUtil.fatalError( PRG_NAME, + "Failed to read gene tree from \"" + gene_tree_file + "\" [" + e.getMessage() + + "]" ); } gene_tree.setRooted( true ); species_tree.setRooted( true ); diff --git a/forester/java/src/org/forester/archaeopteryx/AncestralTaxonomyInferrer.java b/forester/java/src/org/forester/archaeopteryx/AncestralTaxonomyInferrer.java index c1c92cc..c7388c4 100644 --- a/forester/java/src/org/forester/archaeopteryx/AncestralTaxonomyInferrer.java +++ b/forester/java/src/org/forester/archaeopteryx/AncestralTaxonomyInferrer.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/Archaeopteryx.java b/forester/java/src/org/forester/archaeopteryx/Archaeopteryx.java index 7d7b9ec..b9bdcb8 100644 --- a/forester/java/src/org/forester/archaeopteryx/Archaeopteryx.java +++ b/forester/java/src/org/forester/archaeopteryx/Archaeopteryx.java @@ -35,7 +35,7 @@ import org.forester.phylogeny.Phylogeny; import org.forester.phylogeny.factories.ParserBasedPhylogenyFactory; import org.forester.util.ForesterUtil; -// +// // java -javaagent:shiftone-jrat.jar -cp // $HOME/SOFTWARE_DEV/ECLIPSE_WORKSPACE/forester-atv/java/forester.jar:. // org.forester.archaeopteryx.Archaeopteryx @@ -160,7 +160,9 @@ public final class Archaeopteryx { } else { MainFrameApplication.createInstance( ParserBasedPhylogenyFactory.getInstance() - .create( s, new PhyloXmlParser() ), conf, title ); + .create( s, new PhyloXmlParser() ), + conf, + title ); } } // catch ( final IOException ex ) { diff --git a/forester/java/src/org/forester/archaeopteryx/ArchaeopteryxA.java b/forester/java/src/org/forester/archaeopteryx/ArchaeopteryxA.java index bea6a7b..fd82f35 100644 --- a/forester/java/src/org/forester/archaeopteryx/ArchaeopteryxA.java +++ b/forester/java/src/org/forester/archaeopteryx/ArchaeopteryxA.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/ArchaeopteryxE.java b/forester/java/src/org/forester/archaeopteryx/ArchaeopteryxE.java index b4e4e87..d6d842b 100644 --- a/forester/java/src/org/forester/archaeopteryx/ArchaeopteryxE.java +++ b/forester/java/src/org/forester/archaeopteryx/ArchaeopteryxE.java @@ -110,6 +110,7 @@ public class ArchaeopteryxE extends JApplet implements ActionListener { private JMenuItem _overview_placment_mi; private ButtonGroup _radio_group_1; + @Override public void actionPerformed( final ActionEvent e ) { final Object o = e.getSource(); if ( o == _midpoint_root_item ) { @@ -328,6 +329,7 @@ public class ArchaeopteryxE extends JApplet implements ActionListener { _options_jmenu = MainFrame.createMenu( MainFrame.OPTIONS_HEADER, getConfiguration() ); _options_jmenu.addChangeListener( new ChangeListener() { + @Override public void stateChanged( final ChangeEvent e ) { MainFrame.setOvPlacementColorChooseMenuItem( _overview_placment_mi, getCurrentTreePanel() ); MainFrame.setTextColorChooseMenuItem( _switch_colors_mi, getCurrentTreePanel() ); diff --git a/forester/java/src/org/forester/archaeopteryx/Blast.java b/forester/java/src/org/forester/archaeopteryx/Blast.java index 68911e8..600eb04 100644 --- a/forester/java/src/org/forester/archaeopteryx/Blast.java +++ b/forester/java/src/org/forester/archaeopteryx/Blast.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/ColorSchemeChooser.java b/forester/java/src/org/forester/archaeopteryx/ColorSchemeChooser.java index cc76278..2866b14 100644 --- a/forester/java/src/org/forester/archaeopteryx/ColorSchemeChooser.java +++ b/forester/java/src/org/forester/archaeopteryx/ColorSchemeChooser.java @@ -8,7 +8,7 @@ // and Howard Hughes Medical Institute // Copyright (C) 2003-2007 Ethalinda K.S. Cannon // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -18,7 +18,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -81,15 +81,18 @@ final class ColorSchemeChooser extends JDialog implements ActionListener { _selector.setMaximumRowCount( list.size() ); _selector.getModel().addListDataListener( new ListDataListener() { + @Override public void contentsChanged( final ListDataEvent e ) { final int selection = _selector.getSelectedIndex(); changeDialogColors( selection ); } + @Override public void intervalAdded( final ListDataEvent e ) { // Not needed. } + @Override public void intervalRemoved( final ListDataEvent e ) { // Not needed. } @@ -117,6 +120,7 @@ final class ColorSchemeChooser extends JDialog implements ActionListener { _ok_btn = new JButton( "OK" ); _ok_btn.addActionListener( new ActionListener() { + @Override public void actionPerformed( final ActionEvent e ) { ok(); } @@ -125,6 +129,7 @@ final class ColorSchemeChooser extends JDialog implements ActionListener { _cancel_btn = new JButton( "Cancel" ); _cancel_btn.addActionListener( new ActionListener() { + @Override public void actionPerformed( final ActionEvent e ) { cancel(); } @@ -135,6 +140,7 @@ final class ColorSchemeChooser extends JDialog implements ActionListener { setCurrentColor( colorset.getCurrentColorScheme() ); } + @Override public void actionPerformed( final ActionEvent e ) { // Not needed. } diff --git a/forester/java/src/org/forester/archaeopteryx/Configuration.java b/forester/java/src/org/forester/archaeopteryx/Configuration.java index 2333e77..d9a657d 100644 --- a/forester/java/src/org/forester/archaeopteryx/Configuration.java +++ b/forester/java/src/org/forester/archaeopteryx/Configuration.java @@ -8,7 +8,7 @@ // and Howard Hughes Medical Institute // Copyright (C) 2003-2007 Ethalinda K.S. Cannon // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -18,7 +18,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -1235,8 +1235,9 @@ public final class Configuration { } else if ( key.equals( WEB_LINK_KEY ) ) { if ( st.countTokens() == 3 ) { - createWebLink( ( String ) st.nextElement(), ( String ) st.nextElement(), ( String ) st - .nextElement() ); + createWebLink( ( String ) st.nextElement(), + ( String ) st.nextElement(), + ( String ) st.nextElement() ); } else { ForesterUtil.printWarningMessage( Constants.PRG_NAME, diff --git a/forester/java/src/org/forester/archaeopteryx/Constants.java b/forester/java/src/org/forester/archaeopteryx/Constants.java index 94dfc5d..243a526 100644 --- a/forester/java/src/org/forester/archaeopteryx/Constants.java +++ b/forester/java/src/org/forester/archaeopteryx/Constants.java @@ -8,7 +8,7 @@ // and Howard Hughes Medical Institute // Copyright (C) 2003-2007 Ethalinda K.S. Cannon // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -18,7 +18,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/ControlPanel.java b/forester/java/src/org/forester/archaeopteryx/ControlPanel.java index d3b56e2..9729cb8 100644 --- a/forester/java/src/org/forester/archaeopteryx/ControlPanel.java +++ b/forester/java/src/org/forester/archaeopteryx/ControlPanel.java @@ -4,7 +4,7 @@ // // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -14,7 +14,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -172,6 +172,7 @@ final class ControlPanel extends JPanel implements ActionListener { /** * Handle an action. */ + @Override public void actionPerformed( final ActionEvent e ) { try { final TreePanel tp = getMainPanel().getCurrentTreePanel(); @@ -586,10 +587,10 @@ final class ControlPanel extends JPanel implements ActionListener { add( horizGrid ); add( getSequenceRelationBox() ); if ( _configuration.doDisplayOption( Configuration.show_relation_confidence ) ) { - addCheckbox( Configuration.show_relation_confidence, _configuration - .getDisplayTitle( Configuration.show_relation_confidence ) ); - setCheckbox( Configuration.show_relation_confidence, _configuration - .doCheckOption( Configuration.show_relation_confidence ) ); + addCheckbox( Configuration.show_relation_confidence, + _configuration.getDisplayTitle( Configuration.show_relation_confidence ) ); + setCheckbox( Configuration.show_relation_confidence, + _configuration.doCheckOption( Configuration.show_relation_confidence ) ); } }// addSequenceRelationBlock @@ -1258,8 +1259,8 @@ final class ControlPanel extends JPanel implements ActionListener { int cb_index = 0; if ( _configuration.doDisplayClickToOption( Configuration.display_node_data ) ) { _show_data_item = cb_index; - addClickToOption( Configuration.display_node_data, _configuration - .getClickToTitle( Configuration.display_node_data ) ); + addClickToOption( Configuration.display_node_data, + _configuration.getClickToTitle( Configuration.display_node_data ) ); if ( default_option == Configuration.display_node_data ) { selected_index = cb_index; } @@ -1267,8 +1268,8 @@ final class ControlPanel extends JPanel implements ActionListener { } if ( _configuration.doDisplayClickToOption( Configuration.collapse_uncollapse ) ) { _collapse_cb_item = cb_index; - addClickToOption( Configuration.collapse_uncollapse, _configuration - .getClickToTitle( Configuration.collapse_uncollapse ) ); + addClickToOption( Configuration.collapse_uncollapse, + _configuration.getClickToTitle( Configuration.collapse_uncollapse ) ); if ( default_option == Configuration.collapse_uncollapse ) { selected_index = cb_index; } @@ -1333,8 +1334,8 @@ final class ControlPanel extends JPanel implements ActionListener { } if ( _configuration.doDisplayClickToOption( Configuration.copy_subtree ) ) { _copy_subtree_item = cb_index; - addClickToOption( Configuration.copy_subtree, _configuration - .getClickToTitle( Configuration.copy_subtree ) ); + addClickToOption( Configuration.copy_subtree, + _configuration.getClickToTitle( Configuration.copy_subtree ) ); if ( default_option == Configuration.copy_subtree ) { selected_index = cb_index; } @@ -1342,8 +1343,8 @@ final class ControlPanel extends JPanel implements ActionListener { } if ( _configuration.doDisplayClickToOption( Configuration.paste_subtree ) ) { _paste_subtree_item = cb_index; - addClickToOption( Configuration.paste_subtree, _configuration - .getClickToTitle( Configuration.paste_subtree ) ); + addClickToOption( Configuration.paste_subtree, + _configuration.getClickToTitle( Configuration.paste_subtree ) ); if ( default_option == Configuration.paste_subtree ) { selected_index = cb_index; } @@ -1351,8 +1352,8 @@ final class ControlPanel extends JPanel implements ActionListener { } if ( _configuration.doDisplayClickToOption( Configuration.delete_subtree_or_node ) ) { _delete_node_or_subtree_item = cb_index; - addClickToOption( Configuration.delete_subtree_or_node, _configuration - .getClickToTitle( Configuration.delete_subtree_or_node ) ); + addClickToOption( Configuration.delete_subtree_or_node, + _configuration.getClickToTitle( Configuration.delete_subtree_or_node ) ); if ( default_option == Configuration.delete_subtree_or_node ) { selected_index = cb_index; } @@ -1360,8 +1361,8 @@ final class ControlPanel extends JPanel implements ActionListener { } if ( _configuration.doDisplayClickToOption( Configuration.add_new_node ) ) { _add_new_node_item = cb_index; - addClickToOption( Configuration.add_new_node, _configuration - .getClickToTitle( Configuration.add_new_node ) ); + addClickToOption( Configuration.add_new_node, + _configuration.getClickToTitle( Configuration.add_new_node ) ); if ( default_option == Configuration.add_new_node ) { selected_index = cb_index; } @@ -1369,8 +1370,8 @@ final class ControlPanel extends JPanel implements ActionListener { } if ( _configuration.doDisplayClickToOption( Configuration.edit_node_data ) ) { _edit_node_data_item = cb_index; - addClickToOption( Configuration.edit_node_data, _configuration - .getClickToTitle( Configuration.edit_node_data ) ); + addClickToOption( Configuration.edit_node_data, + _configuration.getClickToTitle( Configuration.edit_node_data ) ); if ( default_option == Configuration.edit_node_data ) { selected_index = cb_index; } @@ -1452,38 +1453,38 @@ final class ControlPanel extends JPanel implements ActionListener { private void setupDisplayCheckboxes() { if ( _configuration.doDisplayOption( Configuration.display_as_phylogram ) ) { - addCheckbox( Configuration.display_as_phylogram, _configuration - .getDisplayTitle( Configuration.display_as_phylogram ) ); - setCheckbox( Configuration.display_as_phylogram, _configuration - .doCheckOption( Configuration.display_as_phylogram ) ); + addCheckbox( Configuration.display_as_phylogram, + _configuration.getDisplayTitle( Configuration.display_as_phylogram ) ); + setCheckbox( Configuration.display_as_phylogram, + _configuration.doCheckOption( Configuration.display_as_phylogram ) ); } if ( _configuration.doDisplayOption( Configuration.dynamically_hide_data ) ) { - addCheckbox( Configuration.dynamically_hide_data, _configuration - .getDisplayTitle( Configuration.dynamically_hide_data ) ); - setCheckbox( Configuration.dynamically_hide_data, _configuration - .doCheckOption( Configuration.dynamically_hide_data ) ); + addCheckbox( Configuration.dynamically_hide_data, + _configuration.getDisplayTitle( Configuration.dynamically_hide_data ) ); + setCheckbox( Configuration.dynamically_hide_data, + _configuration.doCheckOption( Configuration.dynamically_hide_data ) ); } if ( _configuration.doDisplayOption( Configuration.node_data_popup ) ) { addCheckbox( Configuration.node_data_popup, _configuration.getDisplayTitle( Configuration.node_data_popup ) ); setCheckbox( Configuration.node_data_popup, _configuration.doCheckOption( Configuration.node_data_popup ) ); } if ( _configuration.doDisplayOption( Configuration.display_internal_data ) ) { - addCheckbox( Configuration.display_internal_data, _configuration - .getDisplayTitle( Configuration.display_internal_data ) ); - setCheckbox( Configuration.display_internal_data, _configuration - .doCheckOption( Configuration.display_internal_data ) ); + addCheckbox( Configuration.display_internal_data, + _configuration.getDisplayTitle( Configuration.display_internal_data ) ); + setCheckbox( Configuration.display_internal_data, + _configuration.doCheckOption( Configuration.display_internal_data ) ); } if ( _configuration.doDisplayOption( Configuration.color_according_to_species ) ) { - addCheckbox( Configuration.color_according_to_species, _configuration - .getDisplayTitle( Configuration.color_according_to_species ) ); - setCheckbox( Configuration.color_according_to_species, _configuration - .doCheckOption( Configuration.color_according_to_species ) ); + addCheckbox( Configuration.color_according_to_species, + _configuration.getDisplayTitle( Configuration.color_according_to_species ) ); + setCheckbox( Configuration.color_according_to_species, + _configuration.doCheckOption( Configuration.color_according_to_species ) ); } if ( _configuration.doDisplayOption( Configuration.color_according_to_annotation ) ) { - addCheckbox( Configuration.color_according_to_annotation, _configuration - .getDisplayTitle( Configuration.color_according_to_annotation ) ); - setCheckbox( Configuration.color_according_to_annotation, _configuration - .doCheckOption( Configuration.color_according_to_annotation ) ); + addCheckbox( Configuration.color_according_to_annotation, + _configuration.getDisplayTitle( Configuration.color_according_to_annotation ) ); + setCheckbox( Configuration.color_according_to_annotation, + _configuration.doCheckOption( Configuration.color_according_to_annotation ) ); } if ( _configuration.doDisplayOption( Configuration.color_branches ) ) { addCheckbox( Configuration.color_branches, _configuration.getDisplayTitle( Configuration.color_branches ) ); @@ -1508,74 +1509,74 @@ final class ControlPanel extends JPanel implements ActionListener { setCheckbox( Configuration.show_tax_code, _configuration.doCheckOption( Configuration.show_tax_code ) ); } if ( _configuration.doDisplayOption( Configuration.show_taxonomy_scientific_names ) ) { - addCheckbox( Configuration.show_taxonomy_scientific_names, _configuration - .getDisplayTitle( Configuration.show_taxonomy_scientific_names ) ); - setCheckbox( Configuration.show_taxonomy_scientific_names, _configuration - .doCheckOption( Configuration.show_taxonomy_scientific_names ) ); + addCheckbox( Configuration.show_taxonomy_scientific_names, + _configuration.getDisplayTitle( Configuration.show_taxonomy_scientific_names ) ); + setCheckbox( Configuration.show_taxonomy_scientific_names, + _configuration.doCheckOption( Configuration.show_taxonomy_scientific_names ) ); } if ( _configuration.doDisplayOption( Configuration.show_taxonomy_common_names ) ) { - addCheckbox( Configuration.show_taxonomy_common_names, _configuration - .getDisplayTitle( Configuration.show_taxonomy_common_names ) ); - setCheckbox( Configuration.show_taxonomy_common_names, _configuration - .doCheckOption( Configuration.show_taxonomy_common_names ) ); + addCheckbox( Configuration.show_taxonomy_common_names, + _configuration.getDisplayTitle( Configuration.show_taxonomy_common_names ) ); + setCheckbox( Configuration.show_taxonomy_common_names, + _configuration.doCheckOption( Configuration.show_taxonomy_common_names ) ); } if ( _configuration.doDisplayOption( Configuration.show_taxonomy_images ) ) { - addCheckbox( Configuration.show_taxonomy_images, _configuration - .getDisplayTitle( Configuration.show_taxonomy_images ) ); - setCheckbox( Configuration.show_taxonomy_images, _configuration - .doCheckOption( Configuration.show_taxonomy_images ) ); + addCheckbox( Configuration.show_taxonomy_images, + _configuration.getDisplayTitle( Configuration.show_taxonomy_images ) ); + setCheckbox( Configuration.show_taxonomy_images, + _configuration.doCheckOption( Configuration.show_taxonomy_images ) ); } if ( _configuration.doDisplayOption( Configuration.show_gene_symbols ) ) { - addCheckbox( Configuration.show_gene_symbols, _configuration - .getDisplayTitle( Configuration.show_gene_symbols ) ); - setCheckbox( Configuration.show_gene_symbols, _configuration - .doCheckOption( Configuration.show_gene_symbols ) ); + addCheckbox( Configuration.show_gene_symbols, + _configuration.getDisplayTitle( Configuration.show_gene_symbols ) ); + setCheckbox( Configuration.show_gene_symbols, + _configuration.doCheckOption( Configuration.show_gene_symbols ) ); } if ( _configuration.doDisplayOption( Configuration.show_gene_names ) ) { addCheckbox( Configuration.show_gene_names, _configuration.getDisplayTitle( Configuration.show_gene_names ) ); setCheckbox( Configuration.show_gene_names, _configuration.doCheckOption( Configuration.show_gene_names ) ); } if ( _configuration.doDisplayOption( Configuration.show_sequence_acc ) ) { - addCheckbox( Configuration.show_sequence_acc, _configuration - .getDisplayTitle( Configuration.show_sequence_acc ) ); - setCheckbox( Configuration.show_sequence_acc, _configuration - .doCheckOption( Configuration.show_sequence_acc ) ); + addCheckbox( Configuration.show_sequence_acc, + _configuration.getDisplayTitle( Configuration.show_sequence_acc ) ); + setCheckbox( Configuration.show_sequence_acc, + _configuration.doCheckOption( Configuration.show_sequence_acc ) ); } if ( _configuration.doDisplayOption( Configuration.show_annotation ) ) { addCheckbox( Configuration.show_annotation, _configuration.getDisplayTitle( Configuration.show_annotation ) ); setCheckbox( Configuration.show_annotation, _configuration.doCheckOption( Configuration.show_annotation ) ); } if ( _configuration.doDisplayOption( Configuration.show_binary_characters ) ) { - addCheckbox( Configuration.show_binary_characters, _configuration - .getDisplayTitle( Configuration.show_binary_characters ) ); - setCheckbox( Configuration.show_binary_characters, _configuration - .doCheckOption( Configuration.show_binary_characters ) ); + addCheckbox( Configuration.show_binary_characters, + _configuration.getDisplayTitle( Configuration.show_binary_characters ) ); + setCheckbox( Configuration.show_binary_characters, + _configuration.doCheckOption( Configuration.show_binary_characters ) ); } if ( _configuration.doDisplayOption( Configuration.show_binary_character_counts ) ) { - addCheckbox( Configuration.show_binary_character_counts, _configuration - .getDisplayTitle( Configuration.show_binary_character_counts ) ); - setCheckbox( Configuration.show_binary_character_counts, _configuration - .doCheckOption( Configuration.show_binary_character_counts ) ); + addCheckbox( Configuration.show_binary_character_counts, + _configuration.getDisplayTitle( Configuration.show_binary_character_counts ) ); + setCheckbox( Configuration.show_binary_character_counts, + _configuration.doCheckOption( Configuration.show_binary_character_counts ) ); } if ( _configuration.doDisplayOption( Configuration.show_domain_architectures ) ) { - addCheckbox( Configuration.show_domain_architectures, _configuration - .getDisplayTitle( Configuration.show_domain_architectures ) ); - setCheckbox( Configuration.show_domain_architectures, _configuration - .doCheckOption( Configuration.show_domain_architectures ) ); + addCheckbox( Configuration.show_domain_architectures, + _configuration.getDisplayTitle( Configuration.show_domain_architectures ) ); + setCheckbox( Configuration.show_domain_architectures, + _configuration.doCheckOption( Configuration.show_domain_architectures ) ); } if ( _configuration.doDisplayOption( Configuration.write_confidence_values ) ) { - addCheckbox( Configuration.write_confidence_values, _configuration - .getDisplayTitle( Configuration.write_confidence_values ) ); - setCheckbox( Configuration.write_confidence_values, _configuration - .doCheckOption( Configuration.write_confidence_values ) ); + addCheckbox( Configuration.write_confidence_values, + _configuration.getDisplayTitle( Configuration.write_confidence_values ) ); + setCheckbox( Configuration.write_confidence_values, + _configuration.doCheckOption( Configuration.write_confidence_values ) ); } if ( _configuration.doDisplayOption( Configuration.write_events ) ) { addCheckbox( Configuration.write_events, _configuration.getDisplayTitle( Configuration.write_events ) ); setCheckbox( Configuration.write_events, _configuration.doCheckOption( Configuration.write_events ) ); } if ( _configuration.doDisplayOption( Configuration.show_vector_data ) ) { - addCheckbox( Configuration.show_vector_data, _configuration - .getDisplayTitle( Configuration.show_vector_data ) ); + addCheckbox( Configuration.show_vector_data, + _configuration.getDisplayTitle( Configuration.show_vector_data ) ); setCheckbox( Configuration.show_vector_data, _configuration.doCheckOption( Configuration.show_vector_data ) ); } } @@ -1694,8 +1695,9 @@ final class ControlPanel extends JPanel implements ActionListener { for( final TreePanel tree_panel : _mainpanel.getTreePanels() ) { if ( tree_panel != null ) { tree_panel.validate(); - tree_panel.setParametersForPainting( _mainpanel.getSizeOfViewport().width, _mainpanel - .getSizeOfViewport().height, true ); + tree_panel.setParametersForPainting( _mainpanel.getSizeOfViewport().width, + _mainpanel.getSizeOfViewport().height, + true ); tree_panel.resetPreferredSize(); tree_panel.repaint(); } diff --git a/forester/java/src/org/forester/archaeopteryx/FontChooser.java b/forester/java/src/org/forester/archaeopteryx/FontChooser.java index d319fa1..9c9eedd 100644 --- a/forester/java/src/org/forester/archaeopteryx/FontChooser.java +++ b/forester/java/src/org/forester/archaeopteryx/FontChooser.java @@ -126,6 +126,7 @@ public class FontChooser extends JDialog implements ActionListener, ListSelectio this( new Font( font_name, font_style, size ) ); } + @Override public void actionPerformed( final ActionEvent e ) { if ( e.getSource() == _fonts_tf ) { boolean found = false; @@ -262,6 +263,7 @@ public class FontChooser extends JDialog implements ActionListener, ListSelectio return _option; } + @Override public void valueChanged( final ListSelectionEvent e ) { if ( e.getSource() == _font_list ) { if ( _font_list.getSelectedValue() != null ) { diff --git a/forester/java/src/org/forester/archaeopteryx/ImageLoader.java b/forester/java/src/org/forester/archaeopteryx/ImageLoader.java index f9d5d89..2618943 100644 --- a/forester/java/src/org/forester/archaeopteryx/ImageLoader.java +++ b/forester/java/src/org/forester/archaeopteryx/ImageLoader.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/MainFrame.java b/forester/java/src/org/forester/archaeopteryx/MainFrame.java index 48c52e8..4ade5da 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainFrame.java +++ b/forester/java/src/org/forester/archaeopteryx/MainFrame.java @@ -4,7 +4,7 @@ // // Copyright (C) 2008-2010 Christian M. Zmasek // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -14,7 +14,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -874,9 +874,8 @@ public abstract class MainFrame extends JFrame implements ActionListener { options.setAntialiasPrint( ( _antialias_print_cbmi != null ) && _antialias_print_cbmi.isSelected() ); options.setPrintBlackAndWhite( ( _print_black_and_white_cbmi != null ) && _print_black_and_white_cbmi.isSelected() ); - options - .setInternalNumberAreConfidenceForNhParsing( ( _internal_number_are_confidence_for_nh_parsing_cbmi != null ) - && _internal_number_are_confidence_for_nh_parsing_cbmi.isSelected() ); + options.setInternalNumberAreConfidenceForNhParsing( ( _internal_number_are_confidence_for_nh_parsing_cbmi != null ) + && _internal_number_are_confidence_for_nh_parsing_cbmi.isSelected() ); options.setExtractPfamTaxonomyCodesInNhParsing( ( _extract_pfam_style_tax_codes_cbmi != null ) && _extract_pfam_style_tax_codes_cbmi.isSelected() ); options.setReplaceUnderscoresInNhParsing( ( _replace_underscores_cbmi != null ) @@ -1064,8 +1063,7 @@ public abstract class MainFrame extends JFrame implements ActionListener { sb.append( "Mouse wheel+Ctrl changes the text size.\n" ); sb.append( "Mouse wheel+Shift controls zooming in vertical direction only.\n" ); sb.append( "Use the buttons on the control panel to zoom the tree in and out, horizontally or vertically.\n" ); - sb - .append( "The entire tree can be fitted into the window by clicking the \"F\" button, or by pressing F, Delete, or Home.\n" ); + sb.append( "The entire tree can be fitted into the window by clicking the \"F\" button, or by pressing F, Delete, or Home.\n" ); sb.append( "The up, down, left, and right keys can be used to move the visible part (if zoomed in).\n" ); sb.append( "Up, down, left, and right+Shift can be used to control zooming horizontally and vertically.\n" ); sb.append( "Plus and minus keys+Ctrl change the text size; F+Ctrl, Delete+Ctrl, or Home+Ctrl resets it.\n\n" ); @@ -1076,8 +1074,7 @@ public abstract class MainFrame extends JFrame implements ActionListener { sb.append( "Memory problems (Java heap space error)\n" ); sb.append( "---------------------------------------\n" ); sb.append( "Since the Java default memory allocation is quite small, it might by necessary (for trees\n" ); - sb - .append( "with more than approximately 5000 external nodes) to increase the memory which Java can use, with\n" ); + sb.append( "with more than approximately 5000 external nodes) to increase the memory which Java can use, with\n" ); sb.append( "the '-Xmx' Java command line option. For example:\n" ); sb.append( "java -Xms32m -Xmx256m -cp path\\to\\forester.jar org.forester.archaeopteryx.Archaeopteryx\n\n" ); if ( ( weblinks != null ) && ( weblinks.size() > 0 ) ) { diff --git a/forester/java/src/org/forester/archaeopteryx/MainFrameApplet.java b/forester/java/src/org/forester/archaeopteryx/MainFrameApplet.java index 3ac938c..0b89e48 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainFrameApplet.java +++ b/forester/java/src/org/forester/archaeopteryx/MainFrameApplet.java @@ -8,7 +8,7 @@ // and Howard Hughes Medical Institute // Copyright (C) 2003-2007 Ethalinda K.S. Cannon // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -18,7 +18,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -73,12 +73,11 @@ public final class MainFrameApplet extends MainFrame { catch ( final Exception e ) { ForesterUtil.printErrorMessage( ArchaeopteryxA.NAME, e.toString() ); e.printStackTrace(); - JOptionPane - .showMessageDialog( this, - ArchaeopteryxA.NAME + ": Could not create URL from: \"" - + _applet.getUrlString() + "\"\nError: " + e, - "Failed to create URL", - JOptionPane.ERROR_MESSAGE ); + JOptionPane.showMessageDialog( this, + ArchaeopteryxA.NAME + ": Could not create URL from: \"" + + _applet.getUrlString() + "\"\nError: " + e, + "Failed to create URL", + JOptionPane.ERROR_MESSAGE ); close(); } } diff --git a/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java b/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java index a6e2569..5c26a5a 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java +++ b/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Burnham Institute for Medical Research // Copyright (C) 2003-2007 Ethalinda K.S. Cannon // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -94,9 +94,9 @@ import org.forester.util.BasicTable; import org.forester.util.BasicTableParser; import org.forester.util.DescriptiveStatistics; import org.forester.util.ForesterUtil; -import org.forester.util.WindowsUtils; import org.forester.util.ForesterUtil.PhylogenyNodeField; import org.forester.util.ForesterUtil.TAXONOMY_EXTRACTION; +import org.forester.util.WindowsUtils; class DefaultFilter extends FileFilter { @@ -1098,8 +1098,9 @@ public final class MainFrameApplication extends MainFrame { if ( ( _mainpanel.getCurrentPhylogeny() == null ) || ( _mainpanel.getCurrentPhylogeny().isEmpty() ) ) { return; } - final MainPanelEdit a = new MainPanelEdit( this, _mainpanel.getCurrentTreePanel(), _mainpanel - .getCurrentPhylogeny() ); + final MainPanelEdit a = new MainPanelEdit( this, + _mainpanel.getCurrentTreePanel(), + _mainpanel.getCurrentPhylogeny() ); new Thread( a ).start(); } @@ -1115,8 +1116,9 @@ public final class MainFrameApplication extends MainFrame { return; } final Phylogeny phy = _mainpanel.getCurrentPhylogeny().copy(); - final AncestralTaxonomyInferrer inferrer = new AncestralTaxonomyInferrer( this, _mainpanel - .getCurrentTreePanel(), phy ); + final AncestralTaxonomyInferrer inferrer = new AncestralTaxonomyInferrer( this, + _mainpanel.getCurrentTreePanel(), + phy ); new Thread( inferrer ).start(); } @@ -1130,8 +1132,7 @@ public final class MainFrameApplication extends MainFrame { if ( getMsa() != null ) { final PhylogeneticInferrer inferrer = new PhylogeneticInferrer( getMsa(), getPhylogeneticInferenceOptions() - .copy(), - this ); + .copy(), this ); new Thread( inferrer ).start(); } else { @@ -1145,8 +1146,7 @@ public final class MainFrameApplication extends MainFrame { if ( getSeqs() != null ) { final PhylogeneticInferrer inferrer = new PhylogeneticInferrer( getSeqs(), getPhylogeneticInferenceOptions() - .copy(), - this ); + .copy(), this ); new Thread( inferrer ).start(); } else { @@ -1374,8 +1374,9 @@ public final class MainFrameApplication extends MainFrame { if ( getCurrentTreePanel() != null ) { final Phylogeny phy = getCurrentTreePanel().getPhylogeny(); if ( ( phy != null ) && !phy.isEmpty() ) { - final TaxonomyDataObtainer t = new TaxonomyDataObtainer( this, _mainpanel.getCurrentTreePanel(), phy - .copy() ); + final TaxonomyDataObtainer t = new TaxonomyDataObtainer( this, + _mainpanel.getCurrentTreePanel(), + phy.copy() ); new Thread( t ).start(); } } @@ -1991,8 +1992,11 @@ public final class MainFrameApplication extends MainFrame { ForesterUtil.transferInternalNodeNamesToConfidence( phy ); } } - Util.addPhylogeniesToTabs( phys, new File( url.getFile() ).getName(), new File( url.getFile() ) - .toString(), getConfiguration(), getMainPanel() ); + Util.addPhylogeniesToTabs( phys, + new File( url.getFile() ).getName(), + new File( url.getFile() ).toString(), + getConfiguration(), + getMainPanel() ); _mainpanel.getControlPanel().showWhole(); } } @@ -2574,8 +2578,7 @@ class TolFilter extends FileFilter { public boolean accept( final File f ) { final String file_name = f.getName().trim().toLowerCase(); return ( file_name.endsWith( ".tol" ) || file_name.endsWith( ".tolxml" ) || file_name.endsWith( ".zip" ) || f - .isDirectory() ) - && ( !file_name.endsWith( ".xml.zip" ) ); + .isDirectory() ) && ( !file_name.endsWith( ".xml.zip" ) ); } @Override diff --git a/forester/java/src/org/forester/archaeopteryx/MainPanel.java b/forester/java/src/org/forester/archaeopteryx/MainPanel.java index 42332d4..921ff91 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainPanel.java +++ b/forester/java/src/org/forester/archaeopteryx/MainPanel.java @@ -8,7 +8,7 @@ // and Howard Hughes Medical Institute // Copyright (C) 2003-2007 Ethalinda K.S. Cannon // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -18,7 +18,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -329,6 +329,7 @@ public class MainPanel extends JPanel implements ComponentListener { _tabbed_pane.addChangeListener( new ChangeListener() { // This method is called whenever the selected tab changes + @Override public void stateChanged( final ChangeEvent evt ) { final JTabbedPane pane = ( JTabbedPane ) evt.getSource(); getControlPanel().tabChanged(); diff --git a/forester/java/src/org/forester/archaeopteryx/MainPanelApplets.java b/forester/java/src/org/forester/archaeopteryx/MainPanelApplets.java index 226c2db..4d4d684 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainPanelApplets.java +++ b/forester/java/src/org/forester/archaeopteryx/MainPanelApplets.java @@ -8,7 +8,7 @@ // and Howard Hughes Medical Institute // Copyright (C) 2003-2007 Ethalinda K.S. Cannon // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -18,7 +18,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/MainPanelEdit.java b/forester/java/src/org/forester/archaeopteryx/MainPanelEdit.java index b2b7bdd..0728da1 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainPanelEdit.java +++ b/forester/java/src/org/forester/archaeopteryx/MainPanelEdit.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -66,15 +66,13 @@ public class MainPanelEdit implements Runnable { if ( ( node.getNodeData().getSequences() != null ) && !node.getNodeData().getSequences().isEmpty() ) { for( final Sequence seq : node.getNodeData().getSequences() ) { if ( ( ( seq.getAccession() != null ) && !ForesterUtil.isEmpty( seq.getAccession().getValue() ) && ( seq - .getAnnotations() == null ) ) - || seq.getAnnotations().isEmpty() ) { + .getAnnotations() == null ) ) || seq.getAnnotations().isEmpty() ) { final Accession acc = seq.getAccession(); try { final URL url = new URL( "http://www.ebi.ac.uk/QuickGO/GAnnotation?protein=" + acc.getValue() + "&format=tsv" ); final HttpURLConnection url_connection = ( HttpURLConnection ) url.openConnection(); - final BufferedReader br = new BufferedReader( new InputStreamReader( url_connection - .getInputStream() ) ); + final BufferedReader br = new BufferedReader( new InputStreamReader( url_connection.getInputStream() ) ); final List columns = Arrays.asList( br.readLine().split( "\t" ) ); System.out.println( columns ); final int db_index = columns.indexOf( DB ); diff --git a/forester/java/src/org/forester/archaeopteryx/MouseListener.java b/forester/java/src/org/forester/archaeopteryx/MouseListener.java index 628d0b6..eb6e64f 100644 --- a/forester/java/src/org/forester/archaeopteryx/MouseListener.java +++ b/forester/java/src/org/forester/archaeopteryx/MouseListener.java @@ -8,7 +8,7 @@ // and Howard Hughes Medical Institute // Copyright (C) 2003-2007 Ethalinda K.S. Cannon // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -18,7 +18,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/NodeEditPanel.java b/forester/java/src/org/forester/archaeopteryx/NodeEditPanel.java index beab4f2..9780d25 100644 --- a/forester/java/src/org/forester/archaeopteryx/NodeEditPanel.java +++ b/forester/java/src/org/forester/archaeopteryx/NodeEditPanel.java @@ -220,12 +220,18 @@ class NodeEditPanel extends JPanel { category = new DefaultMutableTreeNode( name ); top.add( category ); addSubelementEditable( category, NodePanel.DATE_DESCRIPTION, date.getDesc(), PHYLOXML_TAG.DATE_DESCRIPTION ); - addSubelementEditable( category, NodePanel.DATE_VALUE, String.valueOf( date.getValue() != null ? date - .getValue() : "" ), PHYLOXML_TAG.DATE_VALUE ); - addSubelementEditable( category, NodePanel.DATE_MIN, String - .valueOf( date.getMin() != null ? date.getMin() : "" ), PHYLOXML_TAG.DATE_MIN ); - addSubelementEditable( category, NodePanel.DATE_MAX, String - .valueOf( date.getMax() != null ? date.getMax() : "" ), PHYLOXML_TAG.DATE_MAX ); + addSubelementEditable( category, + NodePanel.DATE_VALUE, + String.valueOf( date.getValue() != null ? date.getValue() : "" ), + PHYLOXML_TAG.DATE_VALUE ); + addSubelementEditable( category, + NodePanel.DATE_MIN, + String.valueOf( date.getMin() != null ? date.getMin() : "" ), + PHYLOXML_TAG.DATE_MIN ); + addSubelementEditable( category, + NodePanel.DATE_MAX, + String.valueOf( date.getMax() != null ? date.getMax() : "" ), + PHYLOXML_TAG.DATE_MAX ); addSubelementEditable( category, NodePanel.DATE_UNIT, date.getUnit(), PHYLOXML_TAG.DATE_UNIT ); } @@ -247,14 +253,22 @@ class NodeEditPanel extends JPanel { NodePanel.DIST_GEODETIC_DATUM, p0.getGeodeticDatum(), PHYLOXML_TAG.DIST_GEODETIC ); - addSubelementEditable( category, NodePanel.DIST_LATITUDE, String.valueOf( p0.getLatitude() != null ? p0 - .getLatitude() : "" ), PHYLOXML_TAG.DIST_LAT ); - addSubelementEditable( category, NodePanel.DIST_LONGITUDE, String.valueOf( p0.getLongitude() != null ? p0 - .getLongitude() : "" ), PHYLOXML_TAG.DIST_LONG ); - addSubelementEditable( category, NodePanel.DIST_ALTITUDE, String.valueOf( p0.getAltitude() != null ? p0 - .getAltitude() : "" ), PHYLOXML_TAG.DIST_ALT ); - addSubelementEditable( category, NodePanel.DIST_ALT_UNIT, String.valueOf( p0.getAltiudeUnit() != null ? p0 - .getAltiudeUnit() : "" ), PHYLOXML_TAG.DIST_ALT_UNIT ); + addSubelementEditable( category, + NodePanel.DIST_LATITUDE, + String.valueOf( p0.getLatitude() != null ? p0.getLatitude() : "" ), + PHYLOXML_TAG.DIST_LAT ); + addSubelementEditable( category, + NodePanel.DIST_LONGITUDE, + String.valueOf( p0.getLongitude() != null ? p0.getLongitude() : "" ), + PHYLOXML_TAG.DIST_LONG ); + addSubelementEditable( category, + NodePanel.DIST_ALTITUDE, + String.valueOf( p0.getAltitude() != null ? p0.getAltitude() : "" ), + PHYLOXML_TAG.DIST_ALT ); + addSubelementEditable( category, + NodePanel.DIST_ALT_UNIT, + String.valueOf( p0.getAltiudeUnit() != null ? p0.getAltiudeUnit() : "" ), + PHYLOXML_TAG.DIST_ALT_UNIT ); } private void addEvents( final DefaultMutableTreeNode top, Event events, final String name ) { @@ -275,9 +289,7 @@ class NodeEditPanel extends JPanel { PHYLOXML_TAG.EVENTS_SPECIATIONS ); addSubelementEditable( category, NodePanel.EVENTS_GENE_LOSSES, - String - .valueOf( events.getNumberOfGeneLosses() >= 0 ? events.getNumberOfGeneLosses() - : 0 ), + String.valueOf( events.getNumberOfGeneLosses() >= 0 ? events.getNumberOfGeneLosses() : 0 ), PHYLOXML_TAG.EVENTS_GENE_LOSSES ); } @@ -911,8 +923,8 @@ class NodeEditPanel extends JPanel { p.getLatitude(), p.getLongitude(), new_value, - ForesterUtil.isEmpty( p.getAltiudeUnit() ) ? "?" : p - .getAltiudeUnit() ); + ForesterUtil.isEmpty( p.getAltiudeUnit() ) ? "?" + : p.getAltiudeUnit() ); ps.set( 0, p_new ); } break; @@ -927,8 +939,11 @@ class NodeEditPanel extends JPanel { if ( !ForesterUtil.isEmpty( value ) ) { final List ps = obtainPoints(); final Point p = ps.get( 0 ); - final Point p_new = new Point( value, p.getLatitude(), p.getLongitude(), p.getAltitude(), p - .getAltiudeUnit() ); + final Point p_new = new Point( value, + p.getLatitude(), + p.getLongitude(), + p.getAltitude(), + p.getAltiudeUnit() ); ps.set( 0, p_new ); } break; @@ -937,8 +952,11 @@ class NodeEditPanel extends JPanel { if ( !ForesterUtil.isEmpty( value ) ) { final List ps = obtainPoints(); final Point p = ps.get( 0 ); - final Point p_new = new Point( p.getGeodeticDatum(), p.getLatitude(), p.getLongitude(), p - .getAltitude(), value ); + final Point p_new = new Point( p.getGeodeticDatum(), + p.getLatitude(), + p.getLongitude(), + p.getAltitude(), + value ); ps.set( 0, p_new ); } break; @@ -962,8 +980,11 @@ class NodeEditPanel extends JPanel { if ( new_value != null ) { final List ps = obtainPoints(); final Point p = ps.get( 0 ); - final Point p_new = new Point( p.getGeodeticDatum(), p.getLatitude(), new_value, p.getAltitude(), p - .getAltiudeUnit() ); + final Point p_new = new Point( p.getGeodeticDatum(), + p.getLatitude(), + new_value, + p.getAltitude(), + p.getAltiudeUnit() ); ps.set( 0, p_new ); } break; diff --git a/forester/java/src/org/forester/archaeopteryx/NodeFrame.java b/forester/java/src/org/forester/archaeopteryx/NodeFrame.java index 64236f4..2b37494 100644 --- a/forester/java/src/org/forester/archaeopteryx/NodeFrame.java +++ b/forester/java/src/org/forester/archaeopteryx/NodeFrame.java @@ -8,7 +8,7 @@ // and Howard Hughes Medical Institute // Copyright (C) 2003-2007 Ethalinda K.S. Cannon // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -18,7 +18,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/NodePanel.java b/forester/java/src/org/forester/archaeopteryx/NodePanel.java index ff6e275..153d949 100644 --- a/forester/java/src/org/forester/archaeopteryx/NodePanel.java +++ b/forester/java/src/org/forester/archaeopteryx/NodePanel.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -213,8 +213,9 @@ class NodePanel extends JPanel implements TreeSelectionListener { top.add( category ); addSubelement( category, NODE_NAME, phylogeny_node.getName() ); if ( phylogeny_node.getDistanceToParent() != PhylogenyNode.DISTANCE_DEFAULT ) { - addSubelement( category, NODE_BRANCH_LENGTH, ForesterUtil.FORMATTER_6.format( phylogeny_node - .getDistanceToParent() ) ); + addSubelement( category, + NODE_BRANCH_LENGTH, + ForesterUtil.FORMATTER_6.format( phylogeny_node.getDistanceToParent() ) ); } if ( phylogeny_node.getBranchData().isHasConfidences() ) { for( final PhylogenyData conf : phylogeny_node.getBranchData().getConfidences() ) { @@ -223,8 +224,9 @@ class NodePanel extends JPanel implements TreeSelectionListener { } if ( !phylogeny_node.isExternal() ) { addSubelement( category, "Children", String.valueOf( phylogeny_node.getNumberOfDescendants() ) ); - addSubelement( category, "External children", String.valueOf( phylogeny_node.getAllExternalDescendants() - .size() ) ); + addSubelement( category, + "External children", + String.valueOf( phylogeny_node.getAllExternalDescendants().size() ) ); final SortedMap distinct_tax = PhylogenyMethods .obtainDistinctTaxonomyCounts( phylogeny_node ); if ( distinct_tax != null ) { diff --git a/forester/java/src/org/forester/archaeopteryx/Options.java b/forester/java/src/org/forester/archaeopteryx/Options.java index d0c6c92..babf160 100644 --- a/forester/java/src/org/forester/archaeopteryx/Options.java +++ b/forester/java/src/org/forester/archaeopteryx/Options.java @@ -5,7 +5,7 @@ // Copyright (C) 2009 Christian M. Zmasek // Copyright (C) 2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/PdfExporter.java b/forester/java/src/org/forester/archaeopteryx/PdfExporter.java index 5b524e9..af819de 100644 --- a/forester/java/src/org/forester/archaeopteryx/PdfExporter.java +++ b/forester/java/src/org/forester/archaeopteryx/PdfExporter.java @@ -8,7 +8,7 @@ // and Howard Hughes Medical Institute // Copyright (C) 2003-2007 Ethalinda K.S. Cannon // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -18,7 +18,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/PhyloInferenceDialog.java b/forester/java/src/org/forester/archaeopteryx/PhyloInferenceDialog.java index bfc937d..0b99bf8 100644 --- a/forester/java/src/org/forester/archaeopteryx/PhyloInferenceDialog.java +++ b/forester/java/src/org/forester/archaeopteryx/PhyloInferenceDialog.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -235,6 +235,7 @@ public class PhyloInferenceDialog extends JDialog implements ActionListener { setResizable( false ); } + @Override public void actionPerformed( final ActionEvent e ) { if ( e.getSource() == _select_input_msa_btn ) { readInputFile(); diff --git a/forester/java/src/org/forester/archaeopteryx/PhylogeneticInferenceOptions.java b/forester/java/src/org/forester/archaeopteryx/PhylogeneticInferenceOptions.java index 3bd36d0..caf26f1 100644 --- a/forester/java/src/org/forester/archaeopteryx/PhylogeneticInferenceOptions.java +++ b/forester/java/src/org/forester/archaeopteryx/PhylogeneticInferenceOptions.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/PhylogeneticInferrer.java b/forester/java/src/org/forester/archaeopteryx/PhylogeneticInferrer.java index 822c65f..613d883 100644 --- a/forester/java/src/org/forester/archaeopteryx/PhylogeneticInferrer.java +++ b/forester/java/src/org/forester/archaeopteryx/PhylogeneticInferrer.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -161,23 +161,31 @@ public class PhylogeneticInferrer implements Runnable { msa = inferMsa(); } catch ( final IOException e ) { - JOptionPane.showMessageDialog( _mf, "Could not create multiple sequence alignment with " - + _options.getMsaPrg() + "\nand the following parameters:\n\"" + _options.getMsaPrgParameters() - + "\"\nError:" + e.getLocalizedMessage(), "Failed to Calculate MSA", JOptionPane.ERROR_MESSAGE ); + JOptionPane.showMessageDialog( _mf, + "Could not create multiple sequence alignment with " + + _options.getMsaPrg() + "\nand the following parameters:\n\"" + + _options.getMsaPrgParameters() + "\"\nError:" + + e.getLocalizedMessage(), + "Failed to Calculate MSA", + JOptionPane.ERROR_MESSAGE ); return; } if ( msa == null ) { - JOptionPane.showMessageDialog( _mf, "Could not create multiple sequence alignment with " - + _options.getMsaPrg() + "\nand the following parameters:\n\"" + _options.getMsaPrgParameters() - + "\"", "Failed to Calculate MSA", JOptionPane.ERROR_MESSAGE ); + JOptionPane.showMessageDialog( _mf, + "Could not create multiple sequence alignment with " + + _options.getMsaPrg() + "\nand the following parameters:\n\"" + + _options.getMsaPrgParameters() + "\"", + "Failed to Calculate MSA", + JOptionPane.ERROR_MESSAGE ); return; } System.out.println( msa.toString() ); System.out.println( MsaTools.calcBasicGapinessStatistics( msa ).toString() ); final MsaTools msa_tools = MsaTools.createInstance(); if ( _options.isExecuteMsaProcessing() ) { - msa = msa_tools.removeGapColumns( _options.getMsaProcessingMaxAllowedGapRatio(), _options - .getMsaProcessingMinAllowedLength(), msa ); + msa = msa_tools.removeGapColumns( _options.getMsaProcessingMaxAllowedGapRatio(), + _options.getMsaProcessingMinAllowedLength(), + msa ); if ( msa == null ) { JOptionPane.showMessageDialog( _mf, "Less than two sequences longer than " @@ -235,13 +243,11 @@ public class PhylogeneticInferrer implements Runnable { private void writeToFiles( final BasicSymmetricalDistanceMatrix m ) { if ( !ForesterUtil.isEmpty( _options.getIntermediateFilesBase() ) ) { try { - final BufferedWriter msa_writer = new BufferedWriter( new FileWriter( _options - .getIntermediateFilesBase() + final BufferedWriter msa_writer = new BufferedWriter( new FileWriter( _options.getIntermediateFilesBase() + MSA_FILE_SUFFIX ) ); _msa.write( msa_writer ); msa_writer.close(); - final BufferedWriter pwd_writer = new BufferedWriter( new FileWriter( _options - .getIntermediateFilesBase() + final BufferedWriter pwd_writer = new BufferedWriter( new FileWriter( _options.getIntermediateFilesBase() + PWD_FILE_SUFFIX ) ); m.write( pwd_writer ); pwd_writer.close(); diff --git a/forester/java/src/org/forester/archaeopteryx/Printer.java b/forester/java/src/org/forester/archaeopteryx/Printer.java index de5e41d..bca603e 100644 --- a/forester/java/src/org/forester/archaeopteryx/Printer.java +++ b/forester/java/src/org/forester/archaeopteryx/Printer.java @@ -5,7 +5,7 @@ // Copyright (C) 2009-2010 Christian M. Zmasek // Copyright (C) 2009-2010 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/TaxonomyDataObtainer.java b/forester/java/src/org/forester/archaeopteryx/TaxonomyDataObtainer.java index 9277823..841f38c 100644 --- a/forester/java/src/org/forester/archaeopteryx/TaxonomyDataObtainer.java +++ b/forester/java/src/org/forester/archaeopteryx/TaxonomyDataObtainer.java @@ -6,7 +6,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/TextFrame.java b/forester/java/src/org/forester/archaeopteryx/TextFrame.java index 54c6f80..c7edaa2 100644 --- a/forester/java/src/org/forester/archaeopteryx/TextFrame.java +++ b/forester/java/src/org/forester/archaeopteryx/TextFrame.java @@ -8,7 +8,7 @@ // and Howard Hughes Medical Institute // Copyright (C) 2003-2007 Ethalinda K.S. Cannon // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -18,7 +18,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -124,6 +124,7 @@ final class TextFrame extends JFrame implements ActionListener, ClipboardOwner { setVisible( true ); } + @Override public void actionPerformed( final ActionEvent e ) { final Object o = e.getSource(); if ( o == close_button ) { @@ -149,6 +150,7 @@ final class TextFrame extends JFrame implements ActionListener, ClipboardOwner { sys_clipboard.setContents( contents, this ); } + @Override public void lostOwnership( final Clipboard clipboard, final Transferable contents ) { } diff --git a/forester/java/src/org/forester/archaeopteryx/TreeColorSet.java b/forester/java/src/org/forester/archaeopteryx/TreeColorSet.java index b99a27b..f822bf1 100644 --- a/forester/java/src/org/forester/archaeopteryx/TreeColorSet.java +++ b/forester/java/src/org/forester/archaeopteryx/TreeColorSet.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2010 Burnham Institute for Medical Research // Copyright (C) 2003-2010 Ethalinda K.S. Cannon // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/TreeFontSet.java b/forester/java/src/org/forester/archaeopteryx/TreeFontSet.java index 66020cc..29ae89c 100644 --- a/forester/java/src/org/forester/archaeopteryx/TreeFontSet.java +++ b/forester/java/src/org/forester/archaeopteryx/TreeFontSet.java @@ -8,7 +8,7 @@ // and Howard Hughes Medical Institute // Copyright (C) 2003-2007 Ethalinda K.S. Cannon // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -18,7 +18,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/TreePanel.java b/forester/java/src/org/forester/archaeopteryx/TreePanel.java index 7c40d10..c020b28 100644 --- a/forester/java/src/org/forester/archaeopteryx/TreePanel.java +++ b/forester/java/src/org/forester/archaeopteryx/TreePanel.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -125,16 +125,11 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee private static final float HALF_PI = ( float ) ( Math.PI / 2.0 ); private static final float ANGLE_ROTATION_UNIT = ( float ) ( Math.PI / 32 ); private static final short OV_BORDER = 10; - final static Cursor CUT_CURSOR = Cursor - .getPredefinedCursor( Cursor.CROSSHAIR_CURSOR ); - final static Cursor MOVE_CURSOR = Cursor - .getPredefinedCursor( Cursor.MOVE_CURSOR ); - final static Cursor ARROW_CURSOR = Cursor - .getPredefinedCursor( Cursor.DEFAULT_CURSOR ); - final static Cursor HAND_CURSOR = Cursor - .getPredefinedCursor( Cursor.HAND_CURSOR ); - final static Cursor WAIT_CURSOR = Cursor - .getPredefinedCursor( Cursor.WAIT_CURSOR ); + final static Cursor CUT_CURSOR = Cursor.getPredefinedCursor( Cursor.CROSSHAIR_CURSOR ); + final static Cursor MOVE_CURSOR = Cursor.getPredefinedCursor( Cursor.MOVE_CURSOR ); + final static Cursor ARROW_CURSOR = Cursor.getPredefinedCursor( Cursor.DEFAULT_CURSOR ); + final static Cursor HAND_CURSOR = Cursor.getPredefinedCursor( Cursor.HAND_CURSOR ); + final static Cursor WAIT_CURSOR = Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR ); private final static long serialVersionUID = -978349745916505029L; private final static int EURO_D = 10; private final static String NODE_POPMENU_NODE_CLIENT_PROPERTY = "node"; @@ -222,8 +217,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee private JTextArea _rollover_popup; //private final short _skip_counter = 0; private final StringBuffer _popup_buffer = new StringBuffer(); - final private static Font POPUP_FONT = new Font( Configuration - .getDefaultFontFamilyName(), + final private static Font POPUP_FONT = new Font( Configuration.getDefaultFontFamilyName(), Font.PLAIN, 12 ); private static final boolean DRAW_MEAN_COUNTS = true; //TODO remove me later @@ -2138,8 +2132,11 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee final double r2 = 2.0 * parent_radius; drawArc( root_x - parent_radius, root_y - parent_radius, r2, r2, ( -angle - arc ), arc, g ); } - drawLine( c.getXcoord(), c.getYcoord(), root_x + ( Math.cos( angle ) * parent_radius ), root_y - + ( Math.sin( angle ) * parent_radius ), g ); + drawLine( c.getXcoord(), + c.getYcoord(), + root_x + ( Math.cos( angle ) * parent_radius ), + root_y + ( Math.sin( angle ) * parent_radius ), + g ); paintNodeBox( c.getXcoord(), c.getYcoord(), c, g, to_pdf, to_graphics_file, isInFoundNodes( c ) ); if ( c.isExternal() ) { final boolean is_in_found_nodes = isInFoundNodes( c ); @@ -2164,8 +2161,11 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee final double r2 = 2.0 * parent_radius; drawArc( root_x - parent_radius, root_y - parent_radius, r2, r2, ( -angle - arc ), arc, g ); } - drawLine( c.getXSecondary(), c.getYSecondary(), root_x + ( Math.cos( angle ) * parent_radius ), root_y - + ( Math.sin( angle ) * parent_radius ), g ); + drawLine( c.getXSecondary(), + c.getYSecondary(), + root_x + ( Math.cos( angle ) * parent_radius ), + root_y + ( Math.sin( angle ) * parent_radius ), + g ); if ( isInFoundNodes( c ) ) { g.setColor( getTreeColorSet().getFoundColor() ); drawRectFilled( c.getXSecondary() - 1, c.getYSecondary() - 1, 3, 3, g ); @@ -2186,13 +2186,11 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee if ( !node.isRoot() ) { if ( getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.EURO_STYLE ) { TreePanel.drawString( FORMATTER_BRANCH_LENGTH.format( node.getDistanceToParent() ), node.getParent() - .getXcoord() - + EURO_D, node.getYcoord() - getTreeFontSet()._small_max_descent, g ); + .getXcoord() + EURO_D, node.getYcoord() - getTreeFontSet()._small_max_descent, g ); } else if ( getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.ROUNDED ) { TreePanel.drawString( FORMATTER_BRANCH_LENGTH.format( node.getDistanceToParent() ), node.getParent() - .getXcoord() - + ROUNDED_D, node.getYcoord() - getTreeFontSet()._small_max_descent, g ); + .getXcoord() + ROUNDED_D, node.getYcoord() - getTreeFontSet()._small_max_descent, g ); } else { TreePanel.drawString( FORMATTER_BRANCH_LENGTH.format( node.getDistanceToParent() ), node.getParent() @@ -2277,8 +2275,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee boolean draw_vertical = true; final PhylogenyNode parent = node.getParent(); if ( ( ( getOptions().isShowNodeBoxes() && !to_pdf && !to_graphics_file ) || ( ( getControlPanel() - .isEvents() ) - && ( parent != null ) && parent.isHasAssignedEvent() ) ) + .isEvents() ) && ( parent != null ) && parent.isHasAssignedEvent() ) ) && ( _phylogeny.isRooted() || !( ( parent != null ) && parent.isRoot() ) ) && !( ( to_pdf || to_graphics_file ) && getOptions().isPrintBlackAndWhite() && !parent .isDuplication() ) ) { @@ -2561,12 +2558,12 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee d = BOX_SIZE; } _polygon.reset(); - _polygon.addPoint( ForesterUtil.roundToInt( node.getXcoord() - TreePanel.BOX_SIZE ), ForesterUtil - .roundToInt( node.getYcoord() ) ); - _polygon.addPoint( ForesterUtil.roundToInt( node.getXcoord() + TreePanel.BOX_SIZE ), ForesterUtil - .roundToInt( node.getYcoord() - d ) ); - _polygon.addPoint( ForesterUtil.roundToInt( node.getXcoord() + TreePanel.BOX_SIZE ), ForesterUtil - .roundToInt( node.getYcoord() + d ) ); + _polygon.addPoint( ForesterUtil.roundToInt( node.getXcoord() - TreePanel.BOX_SIZE ), + ForesterUtil.roundToInt( node.getYcoord() ) ); + _polygon.addPoint( ForesterUtil.roundToInt( node.getXcoord() + TreePanel.BOX_SIZE ), + ForesterUtil.roundToInt( node.getYcoord() - d ) ); + _polygon.addPoint( ForesterUtil.roundToInt( node.getXcoord() + TreePanel.BOX_SIZE ), + ForesterUtil.roundToInt( node.getYcoord() + d ) ); g.fillPolygon( _polygon ); paintNodeData( g, node, to_graphics_file, to_pdf, is_in_found_nodes ); } @@ -2649,9 +2646,11 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee g.setColor( getTreeColorSet().getConfidenceColor() ); } TreePanel - .drawString( conf_str, parent_x - + ( ( x - parent_x - getTreeFontSet()._fm_small.stringWidth( conf_str ) ) / 2 ), ( node - .getYcoord() + getTreeFontSet()._small_max_ascent ) - 1, g ); + .drawString( conf_str, + parent_x + + ( ( x - parent_x - getTreeFontSet()._fm_small.stringWidth( conf_str ) ) / 2 ), + ( node.getYcoord() + getTreeFontSet()._small_max_ascent ) - 1, + g ); } } @@ -2673,9 +2672,10 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee g.setColor( Color.BLUE ); } TreePanel - .drawString( gained, parent_x - + ( ( x - parent_x - getTreeFontSet()._fm_large.stringWidth( gained ) ) / 2 ), ( node - .getYcoord() - getTreeFontSet()._fm_large.getMaxDescent() ), g ); + .drawString( gained, + parent_x + ( ( x - parent_x - getTreeFontSet()._fm_large.stringWidth( gained ) ) / 2 ), + ( node.getYcoord() - getTreeFontSet()._fm_large.getMaxDescent() ), + g ); g.setColor( getTreeColorSet().getLostCharactersColor() ); TreePanel.drawString( lost, parent_x + ( ( x - parent_x - getTreeFontSet()._fm_large.stringWidth( lost ) ) / 2 ), @@ -2772,8 +2772,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee x += drawTaxonomyImage( node.getXcoord() + 2 + TreePanel.HALF_BOX_SIZE, node.getYcoord(), node, g ); } if ( ( getControlPanel().isShowTaxonomyCode() || getControlPanel().isShowTaxonomyScientificNames() || getControlPanel() - .isShowTaxonomyCommonNames() ) - && node.getNodeData().isHasTaxonomy() ) { + .isShowTaxonomyCommonNames() ) && node.getNodeData().isHasTaxonomy() ) { x += paintTaxonomy( g, node, is_in_found_nodes, to_pdf, to_graphics_file, x ); } if ( ( to_pdf || to_graphics_file ) && getOptions().isPrintBlackAndWhite() ) { @@ -2967,10 +2966,11 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee + ( getTreeFontSet()._fm_large.getAscent() / down_shift_factor ), g ); } else { - TreePanel.drawString( " " + node.getNodeData().getBinaryCharacters().getPresentCount(), node - .getXcoord() - + x + 4 + TreePanel.HALF_BOX_SIZE, node.getYcoord() - + ( getTreeFontSet()._fm_large.getAscent() / down_shift_factor ), g ); + TreePanel.drawString( " " + node.getNodeData().getBinaryCharacters().getPresentCount(), + node.getXcoord() + x + 4 + TreePanel.HALF_BOX_SIZE, + node.getYcoord() + + ( getTreeFontSet()._fm_large.getAscent() / down_shift_factor ), + g ); } paintGainedAndLostCharacters( g, node, "+" + node.getNodeData().getBinaryCharacters().getGainedCount(), "-" @@ -3006,8 +3006,16 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee final int x_w = ( int ) ( x + ws + 0.5 ); final int y_h = ( int ) ( my_y + hs + 0.5 ); if ( ( x_w - x > 7 ) && ( y_h - my_y > 7 ) ) { - g.drawImage( bi, ( int ) ( x + 0.5 + offset ), ( int ) ( my_y + 0.5 ), x_w, y_h, 0, 0, bi - .getWidth(), bi.getHeight(), null ); + g.drawImage( bi, + ( int ) ( x + 0.5 + offset ), + ( int ) ( my_y + 0.5 ), + x_w, + y_h, + 0, + 0, + bi.getWidth(), + bi.getHeight(), + null ); ws += 8; } else { @@ -4488,9 +4496,10 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee _popup_buffer.append( confidence.getType() ); _popup_buffer.append( "] " ); } - _popup_buffer.append( FORMATTER_CONFIDENCE.format( ForesterUtil - .round( confidence.getValue(), getOptions() - .getNumberOfDigitsAfterCommaForConfidenceValues() ) ) ); + _popup_buffer + .append( FORMATTER_CONFIDENCE.format( ForesterUtil.round( confidence.getValue(), + getOptions() + .getNumberOfDigitsAfterCommaForConfidenceValues() ) ) ); } } if ( _popup_buffer.length() > 0 ) { diff --git a/forester/java/src/org/forester/archaeopteryx/UrlTreeReader.java b/forester/java/src/org/forester/archaeopteryx/UrlTreeReader.java index 729d569..002adad 100644 --- a/forester/java/src/org/forester/archaeopteryx/UrlTreeReader.java +++ b/forester/java/src/org/forester/archaeopteryx/UrlTreeReader.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -147,14 +147,16 @@ public class UrlTreeReader implements Runnable { JOptionPane.ERROR_MESSAGE ); } catch ( final IOException e ) { - JOptionPane.showMessageDialog( _main_frame, "Could not read from " + url + "\n" - + e.getLocalizedMessage(), "Failed to read tree from " + client.getName() + " for " - + identifier, JOptionPane.ERROR_MESSAGE ); + JOptionPane.showMessageDialog( _main_frame, + "Could not read from " + url + "\n" + e.getLocalizedMessage(), + "Failed to read tree from " + client.getName() + " for " + identifier, + JOptionPane.ERROR_MESSAGE ); } catch ( final NumberFormatException e ) { - JOptionPane.showMessageDialog( _main_frame, "Could not read from " + url + "\n" - + e.getLocalizedMessage(), "Failed to read tree from " + client.getName() + " for " - + identifier, JOptionPane.ERROR_MESSAGE ); + JOptionPane.showMessageDialog( _main_frame, + "Could not read from " + url + "\n" + e.getLocalizedMessage(), + "Failed to read tree from " + client.getName() + " for " + identifier, + JOptionPane.ERROR_MESSAGE ); } catch ( final Exception e ) { e.printStackTrace(); diff --git a/forester/java/src/org/forester/archaeopteryx/Util.java b/forester/java/src/org/forester/archaeopteryx/Util.java index 3f7a50e..d347ab1 100644 --- a/forester/java/src/org/forester/archaeopteryx/Util.java +++ b/forester/java/src/org/forester/archaeopteryx/Util.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -116,8 +116,8 @@ final class Util { } String suffix = ""; if ( my_name_for_file.indexOf( '.' ) > 0 ) { - suffix = my_name_for_file.substring( my_name_for_file.lastIndexOf( '.' ), my_name_for_file - .length() ); + suffix = my_name_for_file.substring( my_name_for_file.lastIndexOf( '.' ), + my_name_for_file.length() ); my_name_for_file = my_name_for_file.substring( 0, my_name_for_file.lastIndexOf( '.' ) ); } if ( !ForesterUtil.isEmpty( my_name_for_file ) ) { @@ -300,8 +300,8 @@ final class Util { n.getBranchData().setBranchColor( new BranchColor( tree_panel.calculateTaxonomyBasedColor( tax ) ) ); final List descs = PhylogenyMethods.getAllDescendants( n ); for( final PhylogenyNode desc : descs ) { - desc.getBranchData().setBranchColor( new BranchColor( tree_panel - .calculateTaxonomyBasedColor( tax ) ) ); + desc.getBranchData() + .setBranchColor( new BranchColor( tree_panel.calculateTaxonomyBasedColor( tax ) ) ); } } } diff --git a/forester/java/src/org/forester/archaeopteryx/WebLink.java b/forester/java/src/org/forester/archaeopteryx/WebLink.java index ae18572..4db567e 100644 --- a/forester/java/src/org/forester/archaeopteryx/WebLink.java +++ b/forester/java/src/org/forester/archaeopteryx/WebLink.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/phylogeny/data/RenderableDomainArchitecture.java b/forester/java/src/org/forester/archaeopteryx/phylogeny/data/RenderableDomainArchitecture.java index df45fe5..ed12a91 100644 --- a/forester/java/src/org/forester/archaeopteryx/phylogeny/data/RenderableDomainArchitecture.java +++ b/forester/java/src/org/forester/archaeopteryx/phylogeny/data/RenderableDomainArchitecture.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -144,10 +144,12 @@ public final class RenderableDomainArchitecture extends DomainArchitecture imple return _domain_structure.getNumberOfDomains(); } + @Override public Dimension getOriginalSize() { return new Dimension( _domain_structure.getTotalLength(), ForesterUtil.roundToInt( _rendering_height ) ); } + @Override public Object getParameter() { return new Integer( _e_value_threshold_exp ); } @@ -156,6 +158,7 @@ public final class RenderableDomainArchitecture extends DomainArchitecture imple return _rendering_factor_width; } + @Override public Dimension getRenderingSize() { return new Dimension( ForesterUtil.roundToInt( _domain_structure.getTotalLength() * _rendering_factor_width ), ForesterUtil.roundToInt( _rendering_height ) ); @@ -171,6 +174,7 @@ public final class RenderableDomainArchitecture extends DomainArchitecture imple return _domain_structure.isEqual( data ); } + @Override public void render( final double x1, final double y1, final Graphics2D g, @@ -198,6 +202,7 @@ public final class RenderableDomainArchitecture extends DomainArchitecture imple } } + @Override public void setParameter( final double e_value_threshold_exp ) { _e_value_threshold_exp = ( int ) e_value_threshold_exp; } @@ -206,6 +211,7 @@ public final class RenderableDomainArchitecture extends DomainArchitecture imple _rendering_factor_width = rendering_factor_width; } + @Override public void setRenderingHeight( final double rendering_height ) { _rendering_height = rendering_height; } diff --git a/forester/java/src/org/forester/archaeopteryx/phylogeny/data/RenderablePhylogenyData.java b/forester/java/src/org/forester/archaeopteryx/phylogeny/data/RenderablePhylogenyData.java index 1755671..b4f3868 100644 --- a/forester/java/src/org/forester/archaeopteryx/phylogeny/data/RenderablePhylogenyData.java +++ b/forester/java/src/org/forester/archaeopteryx/phylogeny/data/RenderablePhylogenyData.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/phylogeny/data/RenderableVector.java b/forester/java/src/org/forester/archaeopteryx/phylogeny/data/RenderableVector.java index c22b645..2785daf 100644 --- a/forester/java/src/org/forester/archaeopteryx/phylogeny/data/RenderableVector.java +++ b/forester/java/src/org/forester/archaeopteryx/phylogeny/data/RenderableVector.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -102,6 +102,7 @@ public final class RenderableVector implements RenderablePhylogenyData { throw new NoSuchMethodError(); } + @Override public void render( final double x1, final double y1, final Graphics2D g, diff --git a/forester/java/src/org/forester/archaeopteryx/webservices/BasicPhylogeniesWebserviceClient.java b/forester/java/src/org/forester/archaeopteryx/webservices/BasicPhylogeniesWebserviceClient.java index 3e613e2..f970c64 100644 --- a/forester/java/src/org/forester/archaeopteryx/webservices/BasicPhylogeniesWebserviceClient.java +++ b/forester/java/src/org/forester/archaeopteryx/webservices/BasicPhylogeniesWebserviceClient.java @@ -5,7 +5,7 @@ // // Copyright (C) 2008-2010 Christian M. Zmasek // Copyright (C) 2008-2010 Burnham Institute for Medical Research -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/webservices/PhylogeniesWebserviceClient.java b/forester/java/src/org/forester/archaeopteryx/webservices/PhylogeniesWebserviceClient.java index f8e833e..100bc22 100644 --- a/forester/java/src/org/forester/archaeopteryx/webservices/PhylogeniesWebserviceClient.java +++ b/forester/java/src/org/forester/archaeopteryx/webservices/PhylogeniesWebserviceClient.java @@ -4,7 +4,7 @@ // // Copyright (C) 2008-2010 Christian M. Zmasek // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -14,7 +14,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/archaeopteryx/webservices/WebserviceUtil.java b/forester/java/src/org/forester/archaeopteryx/webservices/WebserviceUtil.java index 9ca03a1..1918587 100644 --- a/forester/java/src/org/forester/archaeopteryx/webservices/WebserviceUtil.java +++ b/forester/java/src/org/forester/archaeopteryx/webservices/WebserviceUtil.java @@ -4,7 +4,7 @@ // // Copyright (C) 2008-2010 Christian M. Zmasek // Copyright (C) 2008-2010 Burnham Institute for Medical Research -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -14,7 +14,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -54,69 +54,64 @@ public final class WebserviceUtil { public static List createDefaultClients() { final List clients = new ArrayList(); - clients - .add( new BasicPhylogeniesWebserviceClient( TOL_NAME, - "Read Tree from Tree of Life...", - "Use ToL webservice to obtain a phylogeny", - "Please enter a Tree of Life node identifier\n(Examples: " - + "19386 for Cephalopoda, 2461 for Cnidaria, 2466 for Deuterostomia)", - WsPhylogenyFormat.TOL_XML_RESPONSE, - PhylogenyNodeField.TAXONOMY_SCIENTIFIC_NAME, - WebserviceUtil.TOL_WEBSERVER, - true, - "http://tolweb.org", - null ) ); - clients - .add( new BasicPhylogeniesWebserviceClient( TREE_BASE_NAME, - "Read Tree from TreeBASE...", - "Use TreeBASE to obtain a phylogeny", - "Please enter a TreeBASE tree identifier\n(Examples: 2654, 825, 4931, 2518, 2406, 4934)", - WsPhylogenyFormat.NEXUS, - PhylogenyNodeField.TAXONOMY_SCIENTIFIC_NAME, - "http://purl.org/phylo/treebase/phylows/tree/TB2:Tr" - + PhylogeniesWebserviceClient.QUERY_PLACEHOLDER - + "?format=nexus", - true, - "http://treebase.nescent.org", - null ) ); - clients - .add( new BasicPhylogeniesWebserviceClient( PFAM_NAME, - "Read Gene Tree from Pfam...", - "Use Pfam to obtain a (full) gene tree", - "Please enter a Pfam (PF) accession number\n(Examples: 01849 for NAC, 00452 for Bcl-2, 00046 for Homeobox)", - WsPhylogenyFormat.PFAM, - null, - PFAM_SERVER + "/family/tree/download?alnType=full&acc=PF" - + PhylogeniesWebserviceClient.QUERY_PLACEHOLDER, - false, - PFAM_SERVER, - PFAM_INST ) ); - clients - .add( new BasicPhylogeniesWebserviceClient( TREE_FAM_NAME, - "Read Full Gene Tree from TreeFam...", - "Use TreeFam to obtain a (full) gene tree", - "Please enter a TreeFam (TF) accession number\n(Examples: 101004 for Cyclin D, 315938 for Hox, 105310 for Wnt)", - WsPhylogenyFormat.NHX, - null, - "http://www.treefam.org/cgi-bin/getdata.pl?ac=TF" - + PhylogeniesWebserviceClient.QUERY_PLACEHOLDER - + "&f=full.nhx", - true, - "http://www.treefam.org", - TREE_FAM_INST ) ); - clients - .add( new BasicPhylogeniesWebserviceClient( TREE_FAM_NAME, - "Read Clean Gene Tree from TreeFam...", - "Use TreeFam to obtain a (\"clean\") gene tree", - "Please enter a TreeFam (TF) accession number\n(Examples: 101004 for Cyclin D, 315938 for Hox, 105310 for Wnt)", - WsPhylogenyFormat.NHX, - null, - "http://www.treefam.org/cgi-bin/getdata.pl?ac=TF" - + PhylogeniesWebserviceClient.QUERY_PLACEHOLDER - + "&f=clean.nhx", - true, - "http://www.treefam.org", - TREE_FAM_INST ) ); + clients.add( new BasicPhylogeniesWebserviceClient( TOL_NAME, + "Read Tree from Tree of Life...", + "Use ToL webservice to obtain a phylogeny", + "Please enter a Tree of Life node identifier\n(Examples: " + + "19386 for Cephalopoda, 2461 for Cnidaria, 2466 for Deuterostomia)", + WsPhylogenyFormat.TOL_XML_RESPONSE, + PhylogenyNodeField.TAXONOMY_SCIENTIFIC_NAME, + WebserviceUtil.TOL_WEBSERVER, + true, + "http://tolweb.org", + null ) ); + clients.add( new BasicPhylogeniesWebserviceClient( TREE_BASE_NAME, + "Read Tree from TreeBASE...", + "Use TreeBASE to obtain a phylogeny", + "Please enter a TreeBASE tree identifier\n(Examples: 2654, 825, 4931, 2518, 2406, 4934)", + WsPhylogenyFormat.NEXUS, + PhylogenyNodeField.TAXONOMY_SCIENTIFIC_NAME, + "http://purl.org/phylo/treebase/phylows/tree/TB2:Tr" + + PhylogeniesWebserviceClient.QUERY_PLACEHOLDER + + "?format=nexus", + true, + "http://treebase.nescent.org", + null ) ); + clients.add( new BasicPhylogeniesWebserviceClient( PFAM_NAME, + "Read Gene Tree from Pfam...", + "Use Pfam to obtain a (full) gene tree", + "Please enter a Pfam (PF) accession number\n(Examples: 01849 for NAC, 00452 for Bcl-2, 00046 for Homeobox)", + WsPhylogenyFormat.PFAM, + null, + PFAM_SERVER + "/family/tree/download?alnType=full&acc=PF" + + PhylogeniesWebserviceClient.QUERY_PLACEHOLDER, + false, + PFAM_SERVER, + PFAM_INST ) ); + clients.add( new BasicPhylogeniesWebserviceClient( TREE_FAM_NAME, + "Read Full Gene Tree from TreeFam...", + "Use TreeFam to obtain a (full) gene tree", + "Please enter a TreeFam (TF) accession number\n(Examples: 101004 for Cyclin D, 315938 for Hox, 105310 for Wnt)", + WsPhylogenyFormat.NHX, + null, + "http://www.treefam.org/cgi-bin/getdata.pl?ac=TF" + + PhylogeniesWebserviceClient.QUERY_PLACEHOLDER + + "&f=full.nhx", + true, + "http://www.treefam.org", + TREE_FAM_INST ) ); + clients.add( new BasicPhylogeniesWebserviceClient( TREE_FAM_NAME, + "Read Clean Gene Tree from TreeFam...", + "Use TreeFam to obtain a (\"clean\") gene tree", + "Please enter a TreeFam (TF) accession number\n(Examples: 101004 for Cyclin D, 315938 for Hox, 105310 for Wnt)", + WsPhylogenyFormat.NHX, + null, + "http://www.treefam.org/cgi-bin/getdata.pl?ac=TF" + + PhylogeniesWebserviceClient.QUERY_PLACEHOLDER + + "&f=clean.nhx", + true, + "http://www.treefam.org", + TREE_FAM_INST ) ); return clients; } @@ -160,8 +155,9 @@ public final class WebserviceUtil { while ( it.hasNext() ) { final PhylogenyNode n = it.next(); if ( n.getNodeData().isHasTaxonomy() && ( n.getNodeData().getTaxonomy().getIdentifier() != null ) ) { - n.getNodeData().getTaxonomy().setIdentifier( new Identifier( n.getNodeData().getTaxonomy() - .getIdentifier().getValue(), type ) ); + n.getNodeData() + .getTaxonomy() + .setIdentifier( new Identifier( n.getNodeData().getTaxonomy().getIdentifier().getValue(), type ) ); } } } diff --git a/forester/java/src/org/forester/archaeopteryx/webservices/WebservicesManager.java b/forester/java/src/org/forester/archaeopteryx/webservices/WebservicesManager.java index 181439b..95e03c2 100644 --- a/forester/java/src/org/forester/archaeopteryx/webservices/WebservicesManager.java +++ b/forester/java/src/org/forester/archaeopteryx/webservices/WebservicesManager.java @@ -4,7 +4,7 @@ // // Copyright (C) 2008-2010 Christian M. Zmasek // Copyright (C) 2008-2010 Burnham Institute for Medical Research -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -14,7 +14,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/datastructures/Queue.java b/forester/java/src/org/forester/datastructures/Queue.java index 77240a6..c0c9c21 100644 --- a/forester/java/src/org/forester/datastructures/Queue.java +++ b/forester/java/src/org/forester/datastructures/Queue.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/development/AbstractRenderer.java b/forester/java/src/org/forester/development/AbstractRenderer.java index dbea137..645735b 100644 --- a/forester/java/src/org/forester/development/AbstractRenderer.java +++ b/forester/java/src/org/forester/development/AbstractRenderer.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/development/DevelopmentTools.java b/forester/java/src/org/forester/development/DevelopmentTools.java index d41194a..9cb5e77 100644 --- a/forester/java/src/org/forester/development/DevelopmentTools.java +++ b/forester/java/src/org/forester/development/DevelopmentTools.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/development/HmmerRest.java b/forester/java/src/org/forester/development/HmmerRest.java index d9e23c9..b77aa23 100644 --- a/forester/java/src/org/forester/development/HmmerRest.java +++ b/forester/java/src/org/forester/development/HmmerRest.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/development/MsaRenderer.java b/forester/java/src/org/forester/development/MsaRenderer.java index 6ee7715..4ad1323 100644 --- a/forester/java/src/org/forester/development/MsaRenderer.java +++ b/forester/java/src/org/forester/development/MsaRenderer.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/development/ResidueRenderer.java b/forester/java/src/org/forester/development/ResidueRenderer.java index da8088c..1d02267 100644 --- a/forester/java/src/org/forester/development/ResidueRenderer.java +++ b/forester/java/src/org/forester/development/ResidueRenderer.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/development/Test.java b/forester/java/src/org/forester/development/Test.java index 5011938..a88d8f2 100644 --- a/forester/java/src/org/forester/development/Test.java +++ b/forester/java/src/org/forester/development/Test.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/evoinference/TestPhylogenyReconstruction.java b/forester/java/src/org/forester/evoinference/TestPhylogenyReconstruction.java index 5849ac1..7726735 100644 --- a/forester/java/src/org/forester/evoinference/TestPhylogenyReconstruction.java +++ b/forester/java/src/org/forester/evoinference/TestPhylogenyReconstruction.java @@ -7,7 +7,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/evoinference/distance/NeighborJoining.java b/forester/java/src/org/forester/evoinference/distance/NeighborJoining.java index 13f99e8..29474c4 100644 --- a/forester/java/src/org/forester/evoinference/distance/NeighborJoining.java +++ b/forester/java/src/org/forester/evoinference/distance/NeighborJoining.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/evoinference/distance/PairwiseDistanceCalculator.java b/forester/java/src/org/forester/evoinference/distance/PairwiseDistanceCalculator.java index 544ac02..961c13a 100644 --- a/forester/java/src/org/forester/evoinference/distance/PairwiseDistanceCalculator.java +++ b/forester/java/src/org/forester/evoinference/distance/PairwiseDistanceCalculator.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/evoinference/matrix/character/BasicCharacterStateMatrix.java b/forester/java/src/org/forester/evoinference/matrix/character/BasicCharacterStateMatrix.java index 6ecfb11..30b5f9b 100644 --- a/forester/java/src/org/forester/evoinference/matrix/character/BasicCharacterStateMatrix.java +++ b/forester/java/src/org/forester/evoinference/matrix/character/BasicCharacterStateMatrix.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -99,6 +99,7 @@ public class BasicCharacterStateMatrix implements CharacterStateMatrix { return _identifier_index_map.containsKey( identifier ); } + @Override public CharacterStateMatrix copy() { final CharacterStateMatrix new_matrix = new BasicCharacterStateMatrix( getNumberOfIdentifiers(), getNumberOfCharacters() ); @@ -243,6 +244,7 @@ public class BasicCharacterStateMatrix implements CharacterStateMatrix { return getNumberOfIdentifiers() <= 0; } + @Override public CharacterStateMatrix pivot() { final CharacterStateMatrix new_matrix = new BasicCharacterStateMatrix( getNumberOfCharacters(), getNumberOfIdentifiers() ); @@ -397,6 +399,7 @@ public class BasicCharacterStateMatrix implements CharacterStateMatrix { //to format for microarray-style clustering // states are ints in this case //TODO + @Override public void toWriter( final Writer writer ) throws IOException { toForester( writer ); } diff --git a/forester/java/src/org/forester/evoinference/matrix/character/CharacterStateMatrix.java b/forester/java/src/org/forester/evoinference/matrix/character/CharacterStateMatrix.java index 5467341..905552c 100644 --- a/forester/java/src/org/forester/evoinference/matrix/character/CharacterStateMatrix.java +++ b/forester/java/src/org/forester/evoinference/matrix/character/CharacterStateMatrix.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/evoinference/matrix/character/DiscreteState.java b/forester/java/src/org/forester/evoinference/matrix/character/DiscreteState.java index 9094d18..a05e93d 100644 --- a/forester/java/src/org/forester/evoinference/matrix/character/DiscreteState.java +++ b/forester/java/src/org/forester/evoinference/matrix/character/DiscreteState.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/evoinference/matrix/distance/BasicSymmetricalDistanceMatrix.java b/forester/java/src/org/forester/evoinference/matrix/distance/BasicSymmetricalDistanceMatrix.java index ac17854..85f9184 100644 --- a/forester/java/src/org/forester/evoinference/matrix/distance/BasicSymmetricalDistanceMatrix.java +++ b/forester/java/src/org/forester/evoinference/matrix/distance/BasicSymmetricalDistanceMatrix.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -47,10 +47,12 @@ public class BasicSymmetricalDistanceMatrix implements DistanceMatrix { _identifiers = new String[ size ]; } + @Override public String getIdentifier( final int i ) { return _identifiers[ i ]; } + @Override public int getIndex( final String identifier ) { for( int i = 0; i < _identifiers.length; i++ ) { if ( getIdentifier( i ).equals( identifier ) ) { @@ -60,10 +62,12 @@ public class BasicSymmetricalDistanceMatrix implements DistanceMatrix { throw new IllegalArgumentException( "identifier [" + identifier + "] not found in distance matrix" ); } + @Override public int getSize() { return _values.length; } + @Override public double getValue( final int col, final int row ) { if ( col == row ) { if ( col >= getSize() ) { @@ -86,6 +90,7 @@ public class BasicSymmetricalDistanceMatrix implements DistanceMatrix { } } + @Override public void setIdentifier( final int i, final String identifier ) { _identifiers[ i ] = identifier; } @@ -99,6 +104,7 @@ public class BasicSymmetricalDistanceMatrix implements DistanceMatrix { } } + @Override public void setValue( final int col, final int row, final double d ) { if ( ( col == row ) && ( d != 0.0 ) ) { throw new IllegalArgumentException( "attempt to set a non-zero value on the diagonal of a symmetrical distance matrix" ); @@ -172,6 +178,7 @@ public class BasicSymmetricalDistanceMatrix implements DistanceMatrix { return toPhylip().toString(); } + @Override public StringBuffer toStringBuffer( final Format format ) { switch ( format ) { case PHYLIP: diff --git a/forester/java/src/org/forester/evoinference/matrix/distance/DistanceMatrix.java b/forester/java/src/org/forester/evoinference/matrix/distance/DistanceMatrix.java index 74f8ff1..1a42fd3 100644 --- a/forester/java/src/org/forester/evoinference/matrix/distance/DistanceMatrix.java +++ b/forester/java/src/org/forester/evoinference/matrix/distance/DistanceMatrix.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/evoinference/parsimony/DolloParsimony.java b/forester/java/src/org/forester/evoinference/parsimony/DolloParsimony.java index a10e865..65c072c 100644 --- a/forester/java/src/org/forester/evoinference/parsimony/DolloParsimony.java +++ b/forester/java/src/org/forester/evoinference/parsimony/DolloParsimony.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -130,8 +130,7 @@ public class DolloParsimony { private Map getStatesForCharacter( final Phylogeny p, final CharacterStateMatrix matrix, final int character_index ) { - final Map states = new HashMap( matrix - .getNumberOfIdentifiers() ); + final Map states = new HashMap( matrix.getNumberOfIdentifiers() ); for( int indentifier_index = 0; indentifier_index < matrix.getNumberOfIdentifiers(); ++indentifier_index ) { final BinaryStates state = matrix.getState( indentifier_index, character_index ); if ( state == null ) { diff --git a/forester/java/src/org/forester/evoinference/parsimony/FitchParsimony.java b/forester/java/src/org/forester/evoinference/parsimony/FitchParsimony.java index 8323167..9d9a602 100644 --- a/forester/java/src/org/forester/evoinference/parsimony/FitchParsimony.java +++ b/forester/java/src/org/forester/evoinference/parsimony/FitchParsimony.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -213,8 +213,7 @@ public class FitchParsimony { private Map getStatesForCharacterForTraceback( final Phylogeny p, final CharacterStateMatrix matrix, final int character_index ) { - final Map states = new HashMap( matrix - .getNumberOfIdentifiers() ); + final Map states = new HashMap( matrix.getNumberOfIdentifiers() ); for( int indentifier_index = 0; indentifier_index < matrix.getNumberOfIdentifiers(); ++indentifier_index ) { final STATE_TYPE state = matrix.getState( indentifier_index, character_index ); if ( state == null ) { @@ -308,8 +307,7 @@ public class FitchParsimony { .getName() ); getInternalStatesMatrixPriorToTraceback().setIdentifier( identifier_index, ForesterUtil.isEmpty( node.getName() ) ? node - .getId() - + "" : node.getName() ); + .getId() + "" : node.getName() ); ++identifier_index; } for( int character_index = 0; character_index < external_node_states_matrix.getNumberOfCharacters(); ++character_index ) { @@ -416,7 +414,7 @@ public class FitchParsimony { else if ( current_binary_state == ABSENT ) {//new setGainLossState( character_state_column, current_node, UNCHANGED_ABSENT );//new }//new - // setGainLossState( character_state_column, current_node, UNKNOWN_GAIN_LOSS ); + // setGainLossState( character_state_column, current_node, UNKNOWN_GAIN_LOSS ); } } } diff --git a/forester/java/src/org/forester/evoinference/parsimony/SankoffParsimony.java b/forester/java/src/org/forester/evoinference/parsimony/SankoffParsimony.java index 195a7e0..ecad514 100644 --- a/forester/java/src/org/forester/evoinference/parsimony/SankoffParsimony.java +++ b/forester/java/src/org/forester/evoinference/parsimony/SankoffParsimony.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -220,8 +220,7 @@ public class SankoffParsimony { private Map getStatesForCharacterForTraceback( final Phylogeny p, final CharacterStateMatrix matrix, final int character_index ) { - final Map states = new HashMap( matrix - .getNumberOfIdentifiers() ); + final Map states = new HashMap( matrix.getNumberOfIdentifiers() ); for( int indentifier_index = 0; indentifier_index < matrix.getNumberOfIdentifiers(); ++indentifier_index ) { final STATE_TYPE state = matrix.getState( indentifier_index, character_index ); if ( state == null ) { @@ -315,8 +314,7 @@ public class SankoffParsimony { .getName() ); getInternalStatesMatrixPriorToTraceback().setIdentifier( identifier_index, ForesterUtil.isEmpty( node.getName() ) ? node - .getId() - + "" : node.getName() ); + .getId() + "" : node.getName() ); ++identifier_index; } for( int character_index = 0; character_index < external_node_states_matrix.getNumberOfCharacters(); ++character_index ) { @@ -423,7 +421,7 @@ public class SankoffParsimony { else if ( current_binary_state == ABSENT ) {//new setGainLossState( character_state_column, current_node, UNCHANGED_ABSENT );//new }//new - // setGainLossState( character_state_column, current_node, UNKNOWN_GAIN_LOSS ); + // setGainLossState( character_state_column, current_node, UNKNOWN_GAIN_LOSS ); } } } diff --git a/forester/java/src/org/forester/evoinference/tools/BootstrapResampler.java b/forester/java/src/org/forester/evoinference/tools/BootstrapResampler.java index 123f77b..7837762 100644 --- a/forester/java/src/org/forester/evoinference/tools/BootstrapResampler.java +++ b/forester/java/src/org/forester/evoinference/tools/BootstrapResampler.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/go/BasicGoRelationship.java b/forester/java/src/org/forester/go/BasicGoRelationship.java index 6f8dd32..69d612f 100644 --- a/forester/java/src/org/forester/go/BasicGoRelationship.java +++ b/forester/java/src/org/forester/go/BasicGoRelationship.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -70,6 +70,7 @@ public class BasicGoRelationship implements GoRelationship { _go_id = go_id; } + @Override public int compareTo( final GoRelationship rel ) { return getGoId().compareTo( rel.getGoId() ); } @@ -97,10 +98,12 @@ public class BasicGoRelationship implements GoRelationship { } } + @Override public GoId getGoId() { return _go_id; } + @Override public Type getType() { return _type; } diff --git a/forester/java/src/org/forester/go/BasicGoSubset.java b/forester/java/src/org/forester/go/BasicGoSubset.java index 19d20ed..de2f65f 100644 --- a/forester/java/src/org/forester/go/BasicGoSubset.java +++ b/forester/java/src/org/forester/go/BasicGoSubset.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -64,6 +64,7 @@ public class BasicGoSubset implements GoSubset { _type = type; } + @Override public int compareTo( final GoSubset sub ) { return getType().compareTo( sub.getType() ); } @@ -85,6 +86,7 @@ public class BasicGoSubset implements GoSubset { } } + @Override public Type getType() { return _type; } diff --git a/forester/java/src/org/forester/go/BasicGoTerm.java b/forester/java/src/org/forester/go/BasicGoTerm.java index 768de1c..4401afe 100644 --- a/forester/java/src/org/forester/go/BasicGoTerm.java +++ b/forester/java/src/org/forester/go/BasicGoTerm.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -69,10 +69,12 @@ public class BasicGoTerm implements GoTerm { init(); } + @Override public StringBuffer asSimpleText() { return new StringBuffer( getGoId().toString() ); } + @Override public StringBuffer asText() { return new StringBuffer( toString() ); } @@ -81,6 +83,7 @@ public class BasicGoTerm implements GoTerm { * Compares based on GO id. * */ + @Override public int compareTo( final GoTerm go_term ) { return getGoId().compareTo( go_term.getGoId() ); } @@ -90,6 +93,7 @@ public class BasicGoTerm implements GoTerm { * * */ + @Override public PhylogenyData copy() { final BasicGoTerm gt = new BasicGoTerm( getGoId(), getName(), getGoNameSpace(), isObsolete() ); gt.setGoXrefs( getGoXRefs() ); @@ -121,6 +125,7 @@ public class BasicGoTerm implements GoTerm { } } + @Override public List getAltIds() { return _alt_ids; } @@ -135,10 +140,12 @@ public class BasicGoTerm implements GoTerm { return _definition; } + @Override public GoId getGoId() { return _id; } + @Override public GoNameSpace getGoNameSpace() { return _namespace; } @@ -153,14 +160,17 @@ public class BasicGoTerm implements GoTerm { return _go_subsets; } + @Override public List getGoXRefs() { return _go_xrefs; } + @Override public String getName() { return _name; } + @Override public List getSuperGoIds() { return _super_go_ids; } @@ -185,10 +195,12 @@ public class BasicGoTerm implements GoTerm { setComment( "" ); } + @Override public boolean isEqual( final PhylogenyData go_term ) { return equals( go_term ); } + @Override public boolean isObsolete() { return _is_obsolete; } @@ -221,10 +233,12 @@ public class BasicGoTerm implements GoTerm { _super_go_ids = super_terms; } + @Override public StringBuffer toNHX() { throw new UnsupportedOperationException(); } + @Override public void toPhyloXML( final Writer writer, final int level, final String indentation ) throws IOException { throw new UnsupportedOperationException(); } diff --git a/forester/java/src/org/forester/go/BasicGoXRef.java b/forester/java/src/org/forester/go/BasicGoXRef.java index 8d5b4ae..3ce65b3 100644 --- a/forester/java/src/org/forester/go/BasicGoXRef.java +++ b/forester/java/src/org/forester/go/BasicGoXRef.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -92,6 +92,7 @@ public class BasicGoXRef implements GoXRef { _xref = xref; } + @Override public int compareTo( final GoXRef xref ) { return getXRef().compareTo( xref.getXRef() ); } @@ -117,6 +118,7 @@ public class BasicGoXRef implements GoXRef { } } + @Override public Type getType() { return _type; } diff --git a/forester/java/src/org/forester/go/GoId.java b/forester/java/src/org/forester/go/GoId.java index 3ba3fe5..cc02247 100644 --- a/forester/java/src/org/forester/go/GoId.java +++ b/forester/java/src/org/forester/go/GoId.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -47,6 +47,7 @@ public class GoId implements Comparable { _id = id.substring( 3 ); } + @Override public int compareTo( final GoId id ) { return getId().compareTo( id.getId() ); } diff --git a/forester/java/src/org/forester/go/GoNameSpace.java b/forester/java/src/org/forester/go/GoNameSpace.java index fa76552..c9dc103 100644 --- a/forester/java/src/org/forester/go/GoNameSpace.java +++ b/forester/java/src/org/forester/go/GoNameSpace.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/go/GoRelationship.java b/forester/java/src/org/forester/go/GoRelationship.java index d7f5e79..2d308ba 100644 --- a/forester/java/src/org/forester/go/GoRelationship.java +++ b/forester/java/src/org/forester/go/GoRelationship.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/go/GoSubset.java b/forester/java/src/org/forester/go/GoSubset.java index c963217..620b15f 100644 --- a/forester/java/src/org/forester/go/GoSubset.java +++ b/forester/java/src/org/forester/go/GoSubset.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/go/GoTerm.java b/forester/java/src/org/forester/go/GoTerm.java index 7068ab6..600cb41 100644 --- a/forester/java/src/org/forester/go/GoTerm.java +++ b/forester/java/src/org/forester/go/GoTerm.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/go/GoUtils.java b/forester/java/src/org/forester/go/GoUtils.java index 680489a..39a778f 100644 --- a/forester/java/src/org/forester/go/GoUtils.java +++ b/forester/java/src/org/forester/go/GoUtils.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/go/GoXRef.java b/forester/java/src/org/forester/go/GoXRef.java index fe96c4b..adab829 100644 --- a/forester/java/src/org/forester/go/GoXRef.java +++ b/forester/java/src/org/forester/go/GoXRef.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/go/Mapping.java b/forester/java/src/org/forester/go/Mapping.java index 9a2fbb5..440094f 100644 --- a/forester/java/src/org/forester/go/Mapping.java +++ b/forester/java/src/org/forester/go/Mapping.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/go/OBOparser.java b/forester/java/src/org/forester/go/OBOparser.java index b79e172..b47a60b 100644 --- a/forester/java/src/org/forester/go/OBOparser.java +++ b/forester/java/src/org/forester/go/OBOparser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/go/PfamToGoMapping.java b/forester/java/src/org/forester/go/PfamToGoMapping.java index 93ee62a..0e6717c 100644 --- a/forester/java/src/org/forester/go/PfamToGoMapping.java +++ b/forester/java/src/org/forester/go/PfamToGoMapping.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/go/TestGo.java b/forester/java/src/org/forester/go/TestGo.java index 4fdcd29..ab66c36 100644 --- a/forester/java/src/org/forester/go/TestGo.java +++ b/forester/java/src/org/forester/go/TestGo.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -212,8 +212,7 @@ public class TestGo { if ( !g0.getComment().equals( "" ) ) { return false; } - if ( !g0 - .getDefinition() + if ( !g0.getDefinition() .equals( "\"The distribution of mitochondria, including the mitochondrial genome, into daughter cells after mitosis or meiosis, mediated by interactions between mitochondria and the cytoskeleton.\" [GOC:mcc, PMID:10873824, PMID:11389764]" ) ) { return false; } @@ -244,8 +243,7 @@ public class TestGo { if ( !g1.getComment().equals( "comment" ) ) { return false; } - if ( !g1 - .getDefinition() + if ( !g1.getDefinition() .equals( "\"The maintenance of the structure and integrity of the mitochondrial genome.\" [GOC:ai]" ) ) { return false; } diff --git a/forester/java/src/org/forester/go/etc/MetaOntologizer.java b/forester/java/src/org/forester/go/etc/MetaOntologizer.java index 970f939..10ac1fd 100644 --- a/forester/java/src/org/forester/go/etc/MetaOntologizer.java +++ b/forester/java/src/org/forester/go/etc/MetaOntologizer.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -438,22 +438,18 @@ public class MetaOntologizer { w.write( ForesterUtil.LINE_SEPARATOR ); w.write( "a.new_type:link { font-size: 7pt; color : #505050; text-decoration : none; }" ); w.write( ForesterUtil.LINE_SEPARATOR ); - w - .write( "a.new_type:hover { font-size: 7pt; color : #000000; background-color : #FFFF00; text-decoration : none; }" ); + w.write( "a.new_type:hover { font-size: 7pt; color : #000000; background-color : #FFFF00; text-decoration : none; }" ); w.write( ForesterUtil.LINE_SEPARATOR ); - w - .write( "a.new_type:hover { font-size: 7pt; color : #000000; background-color : #FFFF00; text-decoration : none; }" ); + w.write( "a.new_type:hover { font-size: 7pt; color : #000000; background-color : #FFFF00; text-decoration : none; }" ); w.write( ForesterUtil.LINE_SEPARATOR ); w.write( "td { text-align: left; vertical-align: top; font-family: Verdana, Arial, Helvetica; font-size: 8pt}" ); w.write( ForesterUtil.LINE_SEPARATOR ); - w - .write( "th { text-align: left; vertical-align: top; font-family: Verdana, Arial, Helvetica; font-size: 10pt; font-weight: bold }" ); + w.write( "th { text-align: left; vertical-align: top; font-family: Verdana, Arial, Helvetica; font-size: 10pt; font-weight: bold }" ); w.write( ForesterUtil.LINE_SEPARATOR ); w.write( "h1 { color : #000000; font-family: Verdana, Arial, Helvetica; font-size: 18pt; font-weight: bold }" ); w.write( ForesterUtil.LINE_SEPARATOR ); w.write( "h2 { color : #000000; font-family: Verdana, Arial, Helvetica; font-size: 16pt; font-weight: bold }" ); - w - .write( "h3 { margin-top: 12px; margin-bottom: 0px; color : #000000; font-family: Verdana, Arial, Helvetica; font-size: 12pt; font-weight: bold }" ); + w.write( "h3 { margin-top: 12px; margin-bottom: 0px; color : #000000; font-family: Verdana, Arial, Helvetica; font-size: 12pt; font-weight: bold }" ); w.write( ForesterUtil.LINE_SEPARATOR ); w.write( "" ); w.write( ForesterUtil.LINE_SEPARATOR ); @@ -592,8 +588,11 @@ public class MetaOntologizer { writer.write( String.valueOf( ontologizer_result.getStudyTerm() ) ); writer.write( "" ); if ( domains_per_species != null ) { - final StringBuilder sb = obtainDomainsForGoId( pfam_to_go, domains_per_species, go_id_to_terms, go_term - .getGoId(), domain_ids_with_go_annot ); + final StringBuilder sb = obtainDomainsForGoId( pfam_to_go, + domains_per_species, + go_id_to_terms, + go_term.getGoId(), + domain_ids_with_go_annot ); writer.write( sb.toString() ); } else { diff --git a/forester/java/src/org/forester/go/etc/OntologizerResult.java b/forester/java/src/org/forester/go/etc/OntologizerResult.java index d7e2be5..47751e8 100644 --- a/forester/java/src/org/forester/go/etc/OntologizerResult.java +++ b/forester/java/src/org/forester/go/etc/OntologizerResult.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/FastaParser.java b/forester/java/src/org/forester/io/parsers/FastaParser.java index 4c6845c..b04e254 100644 --- a/forester/java/src/org/forester/io/parsers/FastaParser.java +++ b/forester/java/src/org/forester/io/parsers/FastaParser.java @@ -6,7 +6,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -144,8 +144,8 @@ public class FastaParser { reader.close(); final List seqs = new ArrayList(); for( int i = 0; i < temp_msa.size(); ++i ) { - seqs.add( BasicSequence.createAaSequence( temp_msa.get( i )[ 0 ].toString(), temp_msa.get( i )[ 1 ] - .toString() ) ); + seqs.add( BasicSequence.createAaSequence( temp_msa.get( i )[ 0 ].toString(), + temp_msa.get( i )[ 1 ].toString() ) ); } return seqs; } diff --git a/forester/java/src/org/forester/io/parsers/GeneralMsaParser.java b/forester/java/src/org/forester/io/parsers/GeneralMsaParser.java index 4b7e920..6e79477 100644 --- a/forester/java/src/org/forester/io/parsers/GeneralMsaParser.java +++ b/forester/java/src/org/forester/io/parsers/GeneralMsaParser.java @@ -6,7 +6,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/HmmPfamOutputParser.java b/forester/java/src/org/forester/io/parsers/HmmPfamOutputParser.java index 42f94ee..15d164a 100644 --- a/forester/java/src/org/forester/io/parsers/HmmPfamOutputParser.java +++ b/forester/java/src/org/forester/io/parsers/HmmPfamOutputParser.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/HmmscanPerDomainTableParser.java b/forester/java/src/org/forester/io/parsers/HmmscanPerDomainTableParser.java index a63ba50..ac6a2bc 100644 --- a/forester/java/src/org/forester/io/parsers/HmmscanPerDomainTableParser.java +++ b/forester/java/src/org/forester/io/parsers/HmmscanPerDomainTableParser.java @@ -7,7 +7,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/PhylogenyParser.java b/forester/java/src/org/forester/io/parsers/PhylogenyParser.java index d319d96..d4bbdb4 100644 --- a/forester/java/src/org/forester/io/parsers/PhylogenyParser.java +++ b/forester/java/src/org/forester/io/parsers/PhylogenyParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/SymmetricalDistanceMatrixParser.java b/forester/java/src/org/forester/io/parsers/SymmetricalDistanceMatrixParser.java index b9df246..991329b 100644 --- a/forester/java/src/org/forester/io/parsers/SymmetricalDistanceMatrixParser.java +++ b/forester/java/src/org/forester/io/parsers/SymmetricalDistanceMatrixParser.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/nexus/NexusCharactersParser.java b/forester/java/src/org/forester/io/parsers/nexus/NexusCharactersParser.java index 5d0ed60..7962717 100644 --- a/forester/java/src/org/forester/io/parsers/nexus/NexusCharactersParser.java +++ b/forester/java/src/org/forester/io/parsers/nexus/NexusCharactersParser.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/nexus/NexusConstants.java b/forester/java/src/org/forester/io/parsers/nexus/NexusConstants.java index 67512d7..4c4f67b 100644 --- a/forester/java/src/org/forester/io/parsers/nexus/NexusConstants.java +++ b/forester/java/src/org/forester/io/parsers/nexus/NexusConstants.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/nexus/NexusFormatException.java b/forester/java/src/org/forester/io/parsers/nexus/NexusFormatException.java index 7e20bee..cbc15db 100644 --- a/forester/java/src/org/forester/io/parsers/nexus/NexusFormatException.java +++ b/forester/java/src/org/forester/io/parsers/nexus/NexusFormatException.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/nexus/NexusPhylogeniesParser.java b/forester/java/src/org/forester/io/parsers/nexus/NexusPhylogeniesParser.java index 879a0e1..4279ade 100644 --- a/forester/java/src/org/forester/io/parsers/nexus/NexusPhylogeniesParser.java +++ b/forester/java/src/org/forester/io/parsers/nexus/NexusPhylogeniesParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -139,6 +139,7 @@ public class NexusPhylogeniesParser implements PhylogenyParser { return _replace_underscores; } + @Override public Phylogeny[] parse() throws IOException, NHXFormatException { reset(); final BufferedReader reader = ParserUtils.createReader( getNexusSource() ); @@ -287,6 +288,7 @@ public class NexusPhylogeniesParser implements PhylogenyParser { _replace_underscores = replace_underscores; } + @Override public void setSource( final Object nexus_source ) throws PhylogenyParserException, IOException { if ( nexus_source == null ) { throw new PhylogenyParserException( getClass() + ": attempt to parse null object." ); diff --git a/forester/java/src/org/forester/io/parsers/nexus/PaupLogParser.java b/forester/java/src/org/forester/io/parsers/nexus/PaupLogParser.java index c4243b4..a1ecfcd 100644 --- a/forester/java/src/org/forester/io/parsers/nexus/PaupLogParser.java +++ b/forester/java/src/org/forester/io/parsers/nexus/PaupLogParser.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/nhx/NHXFormatException.java b/forester/java/src/org/forester/io/parsers/nhx/NHXFormatException.java index b4c18cf..24a11b1 100644 --- a/forester/java/src/org/forester/io/parsers/nhx/NHXFormatException.java +++ b/forester/java/src/org/forester/io/parsers/nhx/NHXFormatException.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/nhx/NHXParser.java b/forester/java/src/org/forester/io/parsers/nhx/NHXParser.java index 8fa5b29..cdde33d 100644 --- a/forester/java/src/org/forester/io/parsers/nhx/NHXParser.java +++ b/forester/java/src/org/forester/io/parsers/nhx/NHXParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -249,6 +249,7 @@ public final class NHXParser implements PhylogenyParser { * @throws NHXFormatException * @throws PhylogenyParserException */ + @Override public Phylogeny[] parse() throws IOException, NHXFormatException { setHasNext( false ); boolean in_comment = false; @@ -539,6 +540,7 @@ public final class NHXParser implements PhylogenyParser { * @throws IOException * @throws PhylogenyParserException */ + @Override public void setSource( final Object nhx_source ) throws PhylogenyParserException, IOException { if ( nhx_source == null ) { throw new PhylogenyParserException( getClass() + ": attempt to parse null object." ); @@ -743,8 +745,8 @@ public final class NHXParser implements PhylogenyParser { if ( !node_to_annotate.getNodeData().isHasSequence() ) { node_to_annotate.getNodeData().setSequence( new Sequence() ); } - node_to_annotate.getNodeData().getSequence().setDomainArchitecture( new DomainArchitecture( s - .substring( 3 ) ) ); + node_to_annotate.getNodeData().getSequence() + .setDomainArchitecture( new DomainArchitecture( s.substring( 3 ) ) ); } else if ( s.startsWith( NHXtags.NODE_IDENTIFIER ) ) { node_to_annotate.getNodeData().setNodeIdentifier( new Identifier( s.substring( 3 ) ) ); diff --git a/forester/java/src/org/forester/io/parsers/nhx/NHXtags.java b/forester/java/src/org/forester/io/parsers/nhx/NHXtags.java index ae884ab..c6a16f9 100644 --- a/forester/java/src/org/forester/io/parsers/nhx/NHXtags.java +++ b/forester/java/src/org/forester/io/parsers/nhx/NHXtags.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlDataFormatException.java b/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlDataFormatException.java index bb80183..e53bf71 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlDataFormatException.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlDataFormatException.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlException.java b/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlException.java index 6c82fa1..3181688 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlException.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlException.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlHandler.java b/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlHandler.java index 6c013f6..a044239 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlHandler.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlHandler.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -60,8 +60,8 @@ import org.forester.phylogeny.data.Property; import org.forester.phylogeny.data.Reference; import org.forester.phylogeny.data.Sequence; import org.forester.phylogeny.data.SequenceRelation; -import org.forester.phylogeny.data.Taxonomy; import org.forester.phylogeny.data.SequenceRelation.SEQUENCE_RELATION_TYPE; +import org.forester.phylogeny.data.Taxonomy; import org.forester.util.FailedConditionCheckException; import org.forester.util.ForesterConstants; import org.forester.util.ForesterUtil; @@ -312,8 +312,8 @@ public final class PhyloXmlHandler extends DefaultHandler { if ( !node.getNodeData().isHasProperties() ) { node.getNodeData().setProperties( new PropertiesMap() ); } - node.getNodeData().getProperties().addProperty( ( Property ) PropertyParser.getInstance() - .parse( element ) ); + node.getNodeData().getProperties() + .addProperty( ( Property ) PropertyParser.getInstance().parse( element ) ); } } } @@ -385,8 +385,8 @@ public final class PhyloXmlHandler extends DefaultHandler { .getAttribute( PhyloXmlMapping.PHYLOGENY_IS_REROOTABLE_ATTR ) ) ); } if ( element.isHasAttribute( PhyloXmlMapping.PHYLOGENY_BRANCHLENGTH_UNIT_ATTR ) ) { - getCurrentPhylogeny().setDistanceUnit( element - .getAttribute( PhyloXmlMapping.PHYLOGENY_BRANCHLENGTH_UNIT_ATTR ) ); + getCurrentPhylogeny() + .setDistanceUnit( element.getAttribute( PhyloXmlMapping.PHYLOGENY_BRANCHLENGTH_UNIT_ATTR ) ); } if ( element.isHasAttribute( PhyloXmlMapping.PHYLOGENY_IS_ROOTED_ATTR ) ) { getCurrentPhylogeny().setRooted( Boolean.parseBoolean( element diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlMapping.java b/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlMapping.java index 04a8cb6..7e2747d 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlMapping.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlMapping.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlParser.java index e5fa2d0..5c08974 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -131,6 +131,7 @@ public class PhyloXmlParser implements PhylogenyParser { return _zipped_inputstream; } + @Override public Phylogeny[] parse() throws IOException, PhylogenyParserException { reset(); final PhyloXmlHandler handler = new PhyloXmlHandler(); @@ -257,6 +258,7 @@ public class PhyloXmlParser implements PhylogenyParser { _warning_messages = new StringBuffer(); } + @Override public void setSource( final Object source ) { _source = source; } diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlUtil.java b/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlUtil.java index 277dfa1..ec20b4d 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlUtil.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/PhyloXmlUtil.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -40,6 +40,7 @@ public final class PhyloXmlUtil { public static final int ROUNDING_DIGITS_FOR_PHYLOXML_DOUBLE_OUTPUT = 9; public static final String VECTOR_PROPERTY_REF = "vector:index="; public static final String VECTOR_PROPERTY_TYPE = "xsd:decimal"; + public static final String UNIPROT_TAX_PROVIDER = "uniprot"; static { SEQUENCE_TYPES.add( "rna" ); SEQUENCE_TYPES.add( "protein" ); diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/XmlElement.java b/forester/java/src/org/forester/io/parsers/phyloxml/XmlElement.java index 442c937..beea81d 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/XmlElement.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/XmlElement.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/data/AccessionParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/data/AccessionParser.java index 01d3c54..e5e5947 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/data/AccessionParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/data/AccessionParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -49,8 +49,8 @@ public class AccessionParser implements PhylogenyDataPhyloXmlParser { @Override public PhylogenyData parse( final XmlElement element ) throws PhylogenyParserException { if ( element.isHasAttribute( PhyloXmlMapping.ACCESSION_SOURCE_ATTR ) ) { - return new Accession( element.getValueAsString(), element - .getAttribute( PhyloXmlMapping.ACCESSION_SOURCE_ATTR ) ); + return new Accession( element.getValueAsString(), + element.getAttribute( PhyloXmlMapping.ACCESSION_SOURCE_ATTR ) ); } else { return new Accession( element.getValueAsString(), "?" ); diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/data/AnnotationParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/data/AnnotationParser.java index 8f25921..00494f5 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/data/AnnotationParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/data/AnnotationParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/data/BinaryCharactersParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/data/BinaryCharactersParser.java index 11469c4..dbd402e 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/data/BinaryCharactersParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/data/BinaryCharactersParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/data/BranchWidthParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/data/BranchWidthParser.java index b65513b..c607603 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/data/BranchWidthParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/data/BranchWidthParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/data/ColorParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/data/ColorParser.java index 02255ef..6d27c65 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/data/ColorParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/data/ColorParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/data/ConfidenceParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/data/ConfidenceParser.java index 92ce6c7..c18d524 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/data/ConfidenceParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/data/ConfidenceParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/data/DateParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/data/DateParser.java index 3f5add7..2e86f28 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/data/DateParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/data/DateParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/data/DistributionParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/data/DistributionParser.java index c211106..93db97e 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/data/DistributionParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/data/DistributionParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/data/EventParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/data/EventParser.java index f58448e..3c6a45f 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/data/EventParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/data/EventParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/data/IdentifierParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/data/IdentifierParser.java index 6d68234..2f64245 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/data/IdentifierParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/data/IdentifierParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -50,8 +50,8 @@ public class IdentifierParser implements PhylogenyDataPhyloXmlParser { @Override public PhylogenyData parse( final XmlElement element ) throws PhylogenyParserException { if ( element.isHasAttribute( PhyloXmlMapping.IDENTIFIER_PROVIDER_ATTR ) ) { - return new Identifier( element.getValueAsString(), element - .getAttribute( PhyloXmlMapping.IDENTIFIER_PROVIDER_ATTR ) ); + return new Identifier( element.getValueAsString(), + element.getAttribute( PhyloXmlMapping.IDENTIFIER_PROVIDER_ATTR ) ); } else if ( element.isHasAttribute( TYPE ) ) { return new Identifier( element.getValueAsString(), element.getAttribute( TYPE ) ); diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/data/PointParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/data/PointParser.java index 8ac0ee5..a2bd3be 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/data/PointParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/data/PointParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/data/PolygonParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/data/PolygonParser.java index 6d5ff38..395e14d 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/data/PolygonParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/data/PolygonParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/data/PropertyParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/data/PropertyParser.java index 38f4dfb..b4baa8f 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/data/PropertyParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/data/PropertyParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/data/ReferenceParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/data/ReferenceParser.java index cad2b26..47f0f17 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/data/ReferenceParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/data/ReferenceParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/data/SequenceRelationParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/data/SequenceRelationParser.java index 6c0a849..edd6d37 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/data/SequenceRelationParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/data/SequenceRelationParser.java @@ -53,22 +53,22 @@ public class SequenceRelationParser implements PhylogenyDataPhyloXmlParser { seqRelation.setType( SequenceRelation.SEQUENCE_RELATION_TYPE.valueOf( sType ) ); } if ( element.isHasAttribute( PhyloXmlMapping.SEQUENCE_RELATION_ID_REF0 ) && ( _phylogeny != null ) ) { - final Sequence ref = PhyloXmlHandler.getSequenceMapByIdForPhylogeny( _phylogeny ).get( element - .getAttribute( PhyloXmlMapping.SEQUENCE_RELATION_ID_REF0 ) ); + final Sequence ref = PhyloXmlHandler.getSequenceMapByIdForPhylogeny( _phylogeny ) + .get( element.getAttribute( PhyloXmlMapping.SEQUENCE_RELATION_ID_REF0 ) ); if ( ref != null ) { seqRelation.setRef0( ref ); } } if ( element.isHasAttribute( PhyloXmlMapping.SEQUENCE_RELATION_ID_REF1 ) && ( _phylogeny != null ) ) { - final Sequence ref = PhyloXmlHandler.getSequenceMapByIdForPhylogeny( _phylogeny ).get( element - .getAttribute( PhyloXmlMapping.SEQUENCE_RELATION_ID_REF1 ) ); + final Sequence ref = PhyloXmlHandler.getSequenceMapByIdForPhylogeny( _phylogeny ) + .get( element.getAttribute( PhyloXmlMapping.SEQUENCE_RELATION_ID_REF1 ) ); if ( ref != null ) { seqRelation.setRef1( ref ); } } if ( element.isHasAttribute( PhyloXmlMapping.SEQUENCE_RELATION_DISTANCE ) ) { - seqRelation.setDistance( Double - .valueOf( element.getAttribute( PhyloXmlMapping.SEQUENCE_RELATION_DISTANCE ) ) ); + seqRelation + .setDistance( Double.valueOf( element.getAttribute( PhyloXmlMapping.SEQUENCE_RELATION_DISTANCE ) ) ); } for( int i = 0; i < element.getNumberOfChildElements(); ++i ) { final XmlElement child_element = element.getChildElement( i ); diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/data/TaxonomyParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/data/TaxonomyParser.java index d124ad0..879cd5a 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/data/TaxonomyParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/data/TaxonomyParser.java @@ -47,6 +47,7 @@ public class TaxonomyParser implements PhylogenyDataPhyloXmlParser { private TaxonomyParser() { } + @Override public Taxonomy parse( final XmlElement element ) throws PhylogenyParserException { final Taxonomy taxonomy = new Taxonomy(); for( int i = 0; i < element.getNumberOfChildElements(); ++i ) { diff --git a/forester/java/src/org/forester/io/parsers/phyloxml/data/UriParser.java b/forester/java/src/org/forester/io/parsers/phyloxml/data/UriParser.java index 57c106e..43404de 100644 --- a/forester/java/src/org/forester/io/parsers/phyloxml/data/UriParser.java +++ b/forester/java/src/org/forester/io/parsers/phyloxml/data/UriParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/tol/TolParser.java b/forester/java/src/org/forester/io/parsers/tol/TolParser.java index 8968885..24aeeba 100644 --- a/forester/java/src/org/forester/io/parsers/tol/TolParser.java +++ b/forester/java/src/org/forester/io/parsers/tol/TolParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -127,6 +127,7 @@ public class TolParser implements PhylogenyParser { return _zipped_inputstream; } + @Override public Phylogeny[] parse() throws IOException, PhylogenyParserException { reset(); final TolXmlHandler handler = new TolXmlHandler(); @@ -246,6 +247,7 @@ public class TolParser implements PhylogenyParser { _warning_messages = new StringBuffer(); } + @Override public void setSource( final Object source ) { _source = source; } diff --git a/forester/java/src/org/forester/io/parsers/tol/TolXmlHandler.java b/forester/java/src/org/forester/io/parsers/tol/TolXmlHandler.java index c3b452d..975ca0d 100644 --- a/forester/java/src/org/forester/io/parsers/tol/TolXmlHandler.java +++ b/forester/java/src/org/forester/io/parsers/tol/TolXmlHandler.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/util/ParserUtils.java b/forester/java/src/org/forester/io/parsers/util/ParserUtils.java index 09d5b24..bb8b6c9 100644 --- a/forester/java/src/org/forester/io/parsers/util/ParserUtils.java +++ b/forester/java/src/org/forester/io/parsers/util/ParserUtils.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/parsers/util/PhylogenyParserException.java b/forester/java/src/org/forester/io/parsers/util/PhylogenyParserException.java index e15472f..c94a60f 100644 --- a/forester/java/src/org/forester/io/parsers/util/PhylogenyParserException.java +++ b/forester/java/src/org/forester/io/parsers/util/PhylogenyParserException.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/writers/PhyloXmlNodeWriter.java b/forester/java/src/org/forester/io/writers/PhyloXmlNodeWriter.java index 586a709..1c11cb0 100644 --- a/forester/java/src/org/forester/io/writers/PhyloXmlNodeWriter.java +++ b/forester/java/src/org/forester/io/writers/PhyloXmlNodeWriter.java @@ -5,7 +5,7 @@ // Copyright (C) 2000-2009 Christian M. Zmasek // Copyright (C) 2007-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/io/writers/PhylogenyWriter.java b/forester/java/src/org/forester/io/writers/PhylogenyWriter.java index 630f057..c443842 100644 --- a/forester/java/src/org/forester/io/writers/PhylogenyWriter.java +++ b/forester/java/src/org/forester/io/writers/PhylogenyWriter.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/msa/BasicMsa.java b/forester/java/src/org/forester/msa/BasicMsa.java index 6e407f8..fa6e321 100644 --- a/forester/java/src/org/forester/msa/BasicMsa.java +++ b/forester/java/src/org/forester/msa/BasicMsa.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -99,10 +99,12 @@ public class BasicMsa implements Msa { return _type; } + @Override public void setIdentifier( final int row, final Object id ) { _identifiers[ row ] = id; } + @Override public void setResidueAt( final int row, final int col, final char residue ) { _data[ row ][ col ] = residue; } @@ -121,6 +123,7 @@ public class BasicMsa implements Msa { return sb.toString(); } + @Override public void write( final Writer w ) throws IOException { final int max = determineMaxIdLength() + 1; for( int row = 0; row < _data.length; ++row ) { diff --git a/forester/java/src/org/forester/msa/Mafft.java b/forester/java/src/org/forester/msa/Mafft.java index 644b5b5..b78cb32 100644 --- a/forester/java/src/org/forester/msa/Mafft.java +++ b/forester/java/src/org/forester/msa/Mafft.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -86,14 +86,17 @@ public final class Mafft implements MsaInferrer { throw new NoSuchMethodError(); } + @Override public String getErrorDescription() { return _error; } + @Override public int getExitCode() { return _exit_code; } + @Override public Msa infer( final File path_to_input_seqs, final List opts ) throws IOException, InterruptedException { init(); final List my_opts = new ArrayList(); diff --git a/forester/java/src/org/forester/msa/MafftOLD.java b/forester/java/src/org/forester/msa/MafftOLD.java index 323d94a..7301cc1 100644 --- a/forester/java/src/org/forester/msa/MafftOLD.java +++ b/forester/java/src/org/forester/msa/MafftOLD.java @@ -32,14 +32,17 @@ public final class MafftOLD implements MsaInferrer { throw new NoSuchMethodError(); } + @Override public String getErrorDescription() { return _error; } + @Override public int getExitCode() { return _exit_code; } + @Override public Msa infer( final File path_to_input_seqs, final List opts ) throws IOException, InterruptedException { init(); final String[] my_opts = new String[ opts.size() + 1 ]; diff --git a/forester/java/src/org/forester/msa/Msa.java b/forester/java/src/org/forester/msa/Msa.java index 2867989..0ee7844 100644 --- a/forester/java/src/org/forester/msa/Msa.java +++ b/forester/java/src/org/forester/msa/Msa.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/msa/MsaFormatException.java b/forester/java/src/org/forester/msa/MsaFormatException.java index 949b072..791ccd9 100644 --- a/forester/java/src/org/forester/msa/MsaFormatException.java +++ b/forester/java/src/org/forester/msa/MsaFormatException.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/msa/MsaInferrer.java b/forester/java/src/org/forester/msa/MsaInferrer.java index 801c247..593dd1f 100644 --- a/forester/java/src/org/forester/msa/MsaInferrer.java +++ b/forester/java/src/org/forester/msa/MsaInferrer.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/msa/MsaTools.java b/forester/java/src/org/forester/msa/MsaTools.java index a2dfa06..7a53d20 100644 --- a/forester/java/src/org/forester/msa/MsaTools.java +++ b/forester/java/src/org/forester/msa/MsaTools.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/msa/ResampleableMsa.java b/forester/java/src/org/forester/msa/ResampleableMsa.java index 7476cad..ad36c53 100644 --- a/forester/java/src/org/forester/msa/ResampleableMsa.java +++ b/forester/java/src/org/forester/msa/ResampleableMsa.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/pccx/BasicExternalNodeBasedCoverageExtender.java b/forester/java/src/org/forester/pccx/BasicExternalNodeBasedCoverageExtender.java index 790518a..9df3549 100644 --- a/forester/java/src/org/forester/pccx/BasicExternalNodeBasedCoverageExtender.java +++ b/forester/java/src/org/forester/pccx/BasicExternalNodeBasedCoverageExtender.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -93,6 +93,7 @@ public class BasicExternalNodeBasedCoverageExtender implements CoverageExtender * org.forester.tools.modeling.CoverageCalculationOptions, * java.io.PrintStream) */ + @Override public List find( final List phylogenies, final List already_covered, int number_names_to_find, diff --git a/forester/java/src/org/forester/pccx/BranchCountingBasedScoringMethod.java b/forester/java/src/org/forester/pccx/BranchCountingBasedScoringMethod.java index 815d13d..f1b2268 100644 --- a/forester/java/src/org/forester/pccx/BranchCountingBasedScoringMethod.java +++ b/forester/java/src/org/forester/pccx/BranchCountingBasedScoringMethod.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -50,6 +50,7 @@ public class BranchCountingBasedScoringMethod implements ScoringMethodForExterna return score_contribution; } + @Override public void calculateScoreForExternalNode( final SortedMap external_node_scores, final Phylogeny phylogeny, final PhylogenyNode external_node, @@ -64,10 +65,12 @@ public class BranchCountingBasedScoringMethod implements ScoringMethodForExterna } } + @Override public String getDesciption() { return "sum of 1/branch-segment-sum"; } + @Override public double getNormalizationFactor( final Phylogeny phylogeny ) { return ( 1.0 / phylogeny.getNumberOfExternalNodes() ); } diff --git a/forester/java/src/org/forester/pccx/BranchLengthBasedScoringMethod.java b/forester/java/src/org/forester/pccx/BranchLengthBasedScoringMethod.java index 7cddfdf..2b14bf4 100644 --- a/forester/java/src/org/forester/pccx/BranchLengthBasedScoringMethod.java +++ b/forester/java/src/org/forester/pccx/BranchLengthBasedScoringMethod.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/pccx/Coverage.java b/forester/java/src/org/forester/pccx/Coverage.java index 59827f9..c5d90ff 100644 --- a/forester/java/src/org/forester/pccx/Coverage.java +++ b/forester/java/src/org/forester/pccx/Coverage.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/pccx/CoverageCalculationMethod.java b/forester/java/src/org/forester/pccx/CoverageCalculationMethod.java index 638ca22..265e284 100644 --- a/forester/java/src/org/forester/pccx/CoverageCalculationMethod.java +++ b/forester/java/src/org/forester/pccx/CoverageCalculationMethod.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/pccx/CoverageCalculationOptions.java b/forester/java/src/org/forester/pccx/CoverageCalculationOptions.java index 1d588ff..c757c3b 100644 --- a/forester/java/src/org/forester/pccx/CoverageCalculationOptions.java +++ b/forester/java/src/org/forester/pccx/CoverageCalculationOptions.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/pccx/CoverageCalculator.java b/forester/java/src/org/forester/pccx/CoverageCalculator.java index 8f60542..2f16ae1 100644 --- a/forester/java/src/org/forester/pccx/CoverageCalculator.java +++ b/forester/java/src/org/forester/pccx/CoverageCalculator.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/pccx/CoverageExtender.java b/forester/java/src/org/forester/pccx/CoverageExtender.java index b882759..335b99b 100644 --- a/forester/java/src/org/forester/pccx/CoverageExtender.java +++ b/forester/java/src/org/forester/pccx/CoverageExtender.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/pccx/ExternalNodeBasedCoverage.java b/forester/java/src/org/forester/pccx/ExternalNodeBasedCoverage.java index ee46c40..d56917b 100644 --- a/forester/java/src/org/forester/pccx/ExternalNodeBasedCoverage.java +++ b/forester/java/src/org/forester/pccx/ExternalNodeBasedCoverage.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -56,6 +56,7 @@ public class ExternalNodeBasedCoverage implements Coverage { _min = stats.getMin(); } + @Override public String asString() { final StringBuffer sb = new StringBuffer(); if ( getN() == 1 ) { @@ -90,6 +91,7 @@ public class ExternalNodeBasedCoverage implements Coverage { return _n; } + @Override public double getScore() { return getAvarageNormalizedScore(); } diff --git a/forester/java/src/org/forester/pccx/ExternalNodeBasedCoverageMethod.java b/forester/java/src/org/forester/pccx/ExternalNodeBasedCoverageMethod.java index 5994bb9..a88018f 100644 --- a/forester/java/src/org/forester/pccx/ExternalNodeBasedCoverageMethod.java +++ b/forester/java/src/org/forester/pccx/ExternalNodeBasedCoverageMethod.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -47,6 +47,7 @@ public class ExternalNodeBasedCoverageMethod implements CoverageCalculationMetho private static final Color MAXIMAL_COV_COLOR = new Color( 0, 255, 0 ); private static final Color MINIMAL_COV_COLOR = new Color( 255, 0, 0 ); + @Override public Coverage calculateCoverage( final List phylogenies, final List names, final CoverageCalculationOptions options, @@ -89,8 +90,10 @@ public class ExternalNodeBasedCoverageMethod implements CoverageCalculationMetho final SortedMap external_node_scores = ModelingUtils .setUpExternalCoverageHashMap( phylogeny ); for( final Object element : names ) { - scoring_method.calculateScoreForExternalNode( external_node_scores, phylogeny, phylogeny - .getNode( ( String ) element ), options ); + scoring_method.calculateScoreForExternalNode( external_node_scores, + phylogeny, + phylogeny.getNode( ( String ) element ), + options ); } if ( annotate_phylogeny ) { colorizePhylogenyAccordingToCoverage( external_node_scores, phylogeny, normalization_factor ); diff --git a/forester/java/src/org/forester/pccx/ExternalNodeBasedCoverageMethodOptions.java b/forester/java/src/org/forester/pccx/ExternalNodeBasedCoverageMethodOptions.java index c88c35e..70b7265 100644 --- a/forester/java/src/org/forester/pccx/ExternalNodeBasedCoverageMethodOptions.java +++ b/forester/java/src/org/forester/pccx/ExternalNodeBasedCoverageMethodOptions.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -41,6 +41,7 @@ public class ExternalNodeBasedCoverageMethodOptions implements CoverageCalculati _scoring_method = scoring_method; } + @Override public String asString() { final StringBuffer sb = new StringBuffer(); sb.append( "scoring method: " ); diff --git a/forester/java/src/org/forester/pccx/LogBranchLengthBasedScoringMethod.java b/forester/java/src/org/forester/pccx/LogBranchLengthBasedScoringMethod.java index 9264e0e..62b4390 100644 --- a/forester/java/src/org/forester/pccx/LogBranchLengthBasedScoringMethod.java +++ b/forester/java/src/org/forester/pccx/LogBranchLengthBasedScoringMethod.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/pccx/ModelingUtils.java b/forester/java/src/org/forester/pccx/ModelingUtils.java index 44eb20f..1614ca6 100644 --- a/forester/java/src/org/forester/pccx/ModelingUtils.java +++ b/forester/java/src/org/forester/pccx/ModelingUtils.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/pccx/ScoringMethodForExternalNode.java b/forester/java/src/org/forester/pccx/ScoringMethodForExternalNode.java index 121bc4e..5fab38a 100644 --- a/forester/java/src/org/forester/pccx/ScoringMethodForExternalNode.java +++ b/forester/java/src/org/forester/pccx/ScoringMethodForExternalNode.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/pccx/TestPccx.java b/forester/java/src/org/forester/pccx/TestPccx.java index d5bdbdc..9cb772f 100644 --- a/forester/java/src/org/forester/pccx/TestPccx.java +++ b/forester/java/src/org/forester/pccx/TestPccx.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -158,12 +158,11 @@ public class TestPccx { already_covered.add( "X" ); already_covered.add( "H" ); already_covered.add( "C" ); - l = ce - .find( phylogenies, - already_covered, - 0, - new ExternalNodeBasedCoverageMethodOptions( "org.forester.pccx.BranchCountingBasedScoringMethod" ), - null ); + l = ce.find( phylogenies, + already_covered, + 0, + new ExternalNodeBasedCoverageMethodOptions( "org.forester.pccx.BranchCountingBasedScoringMethod" ), + null ); if ( !l.get( 0 ).equals( "E" ) ) { return false; } diff --git a/forester/java/src/org/forester/phylogeny/Edge.java b/forester/java/src/org/forester/phylogeny/Edge.java index 234b2c1..c628b93 100644 --- a/forester/java/src/org/forester/phylogeny/Edge.java +++ b/forester/java/src/org/forester/phylogeny/Edge.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/phylogeny/Phylogeny.java b/forester/java/src/org/forester/phylogeny/Phylogeny.java index a3277ba..1a4892d 100644 --- a/forester/java/src/org/forester/phylogeny/Phylogeny.java +++ b/forester/java/src/org/forester/phylogeny/Phylogeny.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/phylogeny/PhylogenyBranch.java b/forester/java/src/org/forester/phylogeny/PhylogenyBranch.java index 214337f..c427c25 100644 --- a/forester/java/src/org/forester/phylogeny/PhylogenyBranch.java +++ b/forester/java/src/org/forester/phylogeny/PhylogenyBranch.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -89,14 +89,17 @@ public class PhylogenyBranch implements Edge { } } + @Override public PhylogenyData getData() { return _data; } + @Override public PhylogenyNode getFirstNode() { return _node_1; } + @Override public PhylogenyNode getSecondNode() { return _node_2; } diff --git a/forester/java/src/org/forester/phylogeny/PhylogenyMethods.java b/forester/java/src/org/forester/phylogeny/PhylogenyMethods.java index 6569c81..f53e41a 100644 --- a/forester/java/src/org/forester/phylogeny/PhylogenyMethods.java +++ b/forester/java/src/org/forester/phylogeny/PhylogenyMethods.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -894,8 +894,10 @@ public class PhylogenyMethods { blue += child_color.getBlue(); } } - setBranchColorValue( node, new Color( ForesterUtil.roundToInt( red / n ), ForesterUtil - .roundToInt( green / n ), ForesterUtil.roundToInt( blue / n ) ) ); + setBranchColorValue( node, + new Color( ForesterUtil.roundToInt( red / n ), + ForesterUtil.roundToInt( green / n ), + ForesterUtil.roundToInt( blue / n ) ) ); } } } @@ -913,8 +915,8 @@ public class PhylogenyMethods { parent.removeChildNode( remove_me ); for( final PhylogenyNode desc : descs ) { parent.addAsChild( desc ); - desc.setDistanceToParent( addPhylogenyDistances( remove_me.getDistanceToParent(), desc - .getDistanceToParent() ) ); + desc.setDistanceToParent( addPhylogenyDistances( remove_me.getDistanceToParent(), + desc.getDistanceToParent() ) ); } remove_me.setParent( null ); phylogeny.setIdHash( null ); diff --git a/forester/java/src/org/forester/phylogeny/PhylogenyNode.java b/forester/java/src/org/forester/phylogeny/PhylogenyNode.java index 3858ea9..253c4c3 100644 --- a/forester/java/src/org/forester/phylogeny/PhylogenyNode.java +++ b/forester/java/src/org/forester/phylogeny/PhylogenyNode.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -110,6 +110,7 @@ public class PhylogenyNode implements PhylogenyNodeI, Comparable * @param n * the PhylogenyNode to add */ + @Override final public void addAsChild( final PhylogenyNodeI node ) { final PhylogenyNode n = ( PhylogenyNode ) node; addChildNode( n ); @@ -128,6 +129,7 @@ public class PhylogenyNode implements PhylogenyNodeI, Comparable getDescendants().add( child ); } + @Override final public int compareTo( final PhylogenyNode o ) { final PhylogenyNode n = o; if ( ( getName() == null ) || ( n.getName() == null ) ) { @@ -300,6 +302,7 @@ public class PhylogenyNode implements PhylogenyNodeI, Comparable * @throws IllegalArgumentException * if n is out of bounds */ + @Override final public PhylogenyNode getChildNode( final int i ) { if ( isExternal() ) { throw new UnsupportedOperationException( "attempt to get the child node of an external node." ); @@ -371,6 +374,7 @@ public class PhylogenyNode implements PhylogenyNodeI, Comparable * Returns the length of the branch leading to the _parent of this * PhylogenyNode (double). */ + @Override final public double getDistanceToParent() { return _distance_parent; } @@ -458,6 +462,7 @@ public class PhylogenyNode implements PhylogenyNodeI, Comparable /** * Returns the ID (int) of this PhylogenyNode. */ + @Override final public int getId() { return _id; } @@ -465,6 +470,7 @@ public class PhylogenyNode implements PhylogenyNodeI, Comparable /** * Returns the name of this node. */ + @Override final public String getName() { return getNodeData().getNodeName(); } @@ -809,6 +815,7 @@ public class PhylogenyNode implements PhylogenyNodeI, Comparable * Sets the length of the branch leading to the _parent of this * PhylogenyNode to double d. */ + @Override final public void setDistanceToParent( final double d ) { _distance_parent = d; } @@ -845,6 +852,7 @@ public class PhylogenyNode implements PhylogenyNodeI, Comparable /** * Sets the name of this node. */ + @Override final public void setName( final String node_name ) { getNodeData().setNodeName( node_name ); } @@ -864,6 +872,7 @@ public class PhylogenyNode implements PhylogenyNodeI, Comparable /** * Sets the _parent PhylogenyNode of this PhylogenyNode to n. */ + @Override final public void setParent( final PhylogenyNode n ) { _parent = n; } diff --git a/forester/java/src/org/forester/phylogeny/PhylogenyNodeI.java b/forester/java/src/org/forester/phylogeny/PhylogenyNodeI.java index 3920875..ca81328 100644 --- a/forester/java/src/org/forester/phylogeny/PhylogenyNodeI.java +++ b/forester/java/src/org/forester/phylogeny/PhylogenyNodeI.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/phylogeny/data/Accession.java b/forester/java/src/org/forester/phylogeny/data/Accession.java index 295b8b7..c2b4435 100644 --- a/forester/java/src/org/forester/phylogeny/data/Accession.java +++ b/forester/java/src/org/forester/phylogeny/data/Accession.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -42,10 +42,12 @@ public class Accession implements PhylogenyData { _source = source; } + @Override public StringBuffer asSimpleText() { return new StringBuffer( getValue() ); } + @Override public StringBuffer asText() { final StringBuffer sb = new StringBuffer(); if ( !ForesterUtil.isEmpty( getSource() ) ) { @@ -57,6 +59,7 @@ public class Accession implements PhylogenyData { return sb; } + @Override public PhylogenyData copy() { return new Accession( new String( getValue() ), new String( getSource() ) ); } @@ -94,6 +97,7 @@ public class Accession implements PhylogenyData { return getValue().hashCode(); } + @Override public boolean isEqual( final PhylogenyData data ) { if ( this == data ) { return true; @@ -108,6 +112,7 @@ public class Accession implements PhylogenyData { return ( a.getValue().equals( getValue() ) ); } + @Override public StringBuffer toNHX() { final StringBuffer sb = new StringBuffer(); sb.append( ":" ); @@ -116,6 +121,7 @@ public class Accession implements PhylogenyData { return sb; } + @Override public void toPhyloXML( final Writer writer, final int level, final String indentation ) throws IOException { if ( ForesterUtil.isEmpty( getSource() ) ) { PhylogenyDataUtil.appendElement( writer, diff --git a/forester/java/src/org/forester/phylogeny/data/Annotation.java b/forester/java/src/org/forester/phylogeny/data/Annotation.java index cba8b55..a1d6b22 100644 --- a/forester/java/src/org/forester/phylogeny/data/Annotation.java +++ b/forester/java/src/org/forester/phylogeny/data/Annotation.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/phylogeny/data/BinaryCharacters.java b/forester/java/src/org/forester/phylogeny/data/BinaryCharacters.java index 4b3bdd1..add1dfa 100644 --- a/forester/java/src/org/forester/phylogeny/data/BinaryCharacters.java +++ b/forester/java/src/org/forester/phylogeny/data/BinaryCharacters.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/phylogeny/data/BranchData.java b/forester/java/src/org/forester/phylogeny/data/BranchData.java index 34a9dc0..6a517b8 100644 --- a/forester/java/src/org/forester/phylogeny/data/BranchData.java +++ b/forester/java/src/org/forester/phylogeny/data/BranchData.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/phylogeny/data/BranchWidth.java b/forester/java/src/org/forester/phylogeny/data/BranchWidth.java index 803fbda..cfdf90d 100644 --- a/forester/java/src/org/forester/phylogeny/data/BranchWidth.java +++ b/forester/java/src/org/forester/phylogeny/data/BranchWidth.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/phylogeny/data/Confidence.java b/forester/java/src/org/forester/phylogeny/data/Confidence.java index dbb9d07..f701f80 100644 --- a/forester/java/src/org/forester/phylogeny/data/Confidence.java +++ b/forester/java/src/org/forester/phylogeny/data/Confidence.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -48,10 +48,12 @@ public class Confidence implements PhylogenyData, Comparable { setType( type ); } + @Override public StringBuffer asSimpleText() { return new StringBuffer().append( ForesterUtil.FORMATTER_6.format( getValue() ) ); } + @Override public StringBuffer asText() { final StringBuffer sb = new StringBuffer(); if ( !ForesterUtil.isEmpty( getType() ) ) { @@ -71,6 +73,7 @@ public class Confidence implements PhylogenyData, Comparable { return getType().compareToIgnoreCase( confidence.getType() ); } + @Override public PhylogenyData copy() { return new Confidence( getValue(), getType() ); } @@ -88,6 +91,7 @@ public class Confidence implements PhylogenyData, Comparable { setType( "" ); } + @Override public boolean isEqual( final PhylogenyData confidence ) { if ( confidence == null ) { return false; @@ -113,6 +117,7 @@ public class Confidence implements PhylogenyData, Comparable { _value = value; } + @Override public StringBuffer toNHX() { final StringBuffer sb = new StringBuffer(); sb.append( NHXtags.SUPPORT ); @@ -120,6 +125,7 @@ public class Confidence implements PhylogenyData, Comparable { return sb; } + @Override public void toPhyloXML( final Writer writer, final int level, final String indentation ) throws IOException { if ( getValue() == CONFIDENCE_DEFAULT_VALUE ) { return; diff --git a/forester/java/src/org/forester/phylogeny/data/Date.java b/forester/java/src/org/forester/phylogeny/data/Date.java index 6e2b814..af70f80 100644 --- a/forester/java/src/org/forester/phylogeny/data/Date.java +++ b/forester/java/src/org/forester/phylogeny/data/Date.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/phylogeny/data/Distribution.java b/forester/java/src/org/forester/phylogeny/data/Distribution.java index 9a6ebdb..92c219d 100644 --- a/forester/java/src/org/forester/phylogeny/data/Distribution.java +++ b/forester/java/src/org/forester/phylogeny/data/Distribution.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/phylogeny/data/DomainArchitecture.java b/forester/java/src/org/forester/phylogeny/data/DomainArchitecture.java index e19c2ef..e93e742 100644 --- a/forester/java/src/org/forester/phylogeny/data/DomainArchitecture.java +++ b/forester/java/src/org/forester/phylogeny/data/DomainArchitecture.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -96,6 +96,7 @@ public class DomainArchitecture implements PhylogenyData { _domains.put( key, pd ); } + @Override public StringBuffer asSimpleText() { final StringBuffer sb = new StringBuffer(); for( int i = 0; i < getDomains().size(); ++i ) { @@ -107,6 +108,7 @@ public class DomainArchitecture implements PhylogenyData { return sb; } + @Override public StringBuffer asText() { final StringBuffer sb = new StringBuffer(); for( int i = 0; i < getDomains().size(); ++i ) { @@ -118,6 +120,7 @@ public class DomainArchitecture implements PhylogenyData { return sb; } + @Override public PhylogenyData copy() { final List domains = new ArrayList( getDomains().size() ); for( int i = 0; i < getDomains().size(); ++i ) { @@ -153,6 +156,7 @@ public class DomainArchitecture implements PhylogenyData { * * */ + @Override public boolean isEqual( final PhylogenyData domain_architecture ) { if ( domain_architecture == null ) { return false; @@ -176,6 +180,7 @@ public class DomainArchitecture implements PhylogenyData { _total_length = total_length; } + @Override public StringBuffer toNHX() { final StringBuffer sb = new StringBuffer(); sb.append( ":" ); @@ -196,6 +201,7 @@ public class DomainArchitecture implements PhylogenyData { return sb; } + @Override public void toPhyloXML( final Writer writer, final int level, final String indentation ) throws IOException { writer.write( ForesterUtil.LINE_SEPARATOR ); writer.write( indentation ); diff --git a/forester/java/src/org/forester/phylogeny/data/Event.java b/forester/java/src/org/forester/phylogeny/data/Event.java index 22dacc9..c362f7c 100644 --- a/forester/java/src/org/forester/phylogeny/data/Event.java +++ b/forester/java/src/org/forester/phylogeny/data/Event.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -107,6 +107,7 @@ public class Event implements PhylogenyData { } } + @Override public StringBuffer asSimpleText() { final StringBuffer sb = new StringBuffer(); if ( isUnassigned() ) { @@ -140,6 +141,7 @@ public class Event implements PhylogenyData { return sb; } + @Override public StringBuffer asText() { final StringBuffer sb = new StringBuffer(); if ( isUnassigned() || isSpeciationOrDuplication() || isOther() || isRoot() || isTransfer() || isFusion() ) { @@ -179,6 +181,7 @@ public class Event implements PhylogenyData { return sb; } + @Override public PhylogenyData copy() { if ( isUnassigned() ) { return new Event(); @@ -220,6 +223,7 @@ public class Event implements PhylogenyData { return ( _duplications > 0 ) && ( _gene_losses < 1 ) && ( _speciations < 1 ); } + @Override public boolean isEqual( final PhylogenyData event ) { if ( ( event == null ) || !( event instanceof Event ) ) { return false; @@ -301,6 +305,7 @@ public class Event implements PhylogenyData { _event_type = EventType.mixed; } + @Override public StringBuffer toNHX() { final StringBuffer sb = new StringBuffer(); if ( !isUnassigned() && ( isSpeciationOrDuplication() || isDuplication() || isSpeciation() ) ) { @@ -319,6 +324,7 @@ public class Event implements PhylogenyData { return sb; } + @Override public void toPhyloXML( final Writer writer, final int level, final String indentation ) throws IOException { writer.write( ForesterUtil.LINE_SEPARATOR ); writer.write( indentation ); diff --git a/forester/java/src/org/forester/phylogeny/data/Identifier.java b/forester/java/src/org/forester/phylogeny/data/Identifier.java index 33c3a8b..62dc722 100644 --- a/forester/java/src/org/forester/phylogeny/data/Identifier.java +++ b/forester/java/src/org/forester/phylogeny/data/Identifier.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -52,10 +52,12 @@ public class Identifier implements PhylogenyData { _provider = provider; } + @Override public StringBuffer asSimpleText() { return new StringBuffer( getValue() ); } + @Override public StringBuffer asText() { final StringBuffer sb = new StringBuffer(); if ( !ForesterUtil.isEmpty( getProvider() ) ) { @@ -67,6 +69,7 @@ public class Identifier implements PhylogenyData { return sb; } + @Override public PhylogenyData copy() { return new Identifier( getValue(), getProvider() ); } @@ -104,6 +107,7 @@ public class Identifier implements PhylogenyData { return getValue().hashCode(); } + @Override public boolean isEqual( final PhylogenyData data ) { if ( this == data ) { return true; @@ -118,6 +122,7 @@ public class Identifier implements PhylogenyData { return ( a.getValue().equals( getValue() ) ); } + @Override public StringBuffer toNHX() { final StringBuffer sb = new StringBuffer(); sb.append( ":" ); @@ -126,6 +131,7 @@ public class Identifier implements PhylogenyData { return sb; } + @Override public void toPhyloXML( final Writer writer, final int level, final String indentation ) throws IOException { if ( !org.forester.util.ForesterUtil.isEmpty( getProvider() ) ) { PhylogenyDataUtil.appendElement( writer, diff --git a/forester/java/src/org/forester/phylogeny/data/MultipleUris.java b/forester/java/src/org/forester/phylogeny/data/MultipleUris.java index cce4be5..acf9ca0 100644 --- a/forester/java/src/org/forester/phylogeny/data/MultipleUris.java +++ b/forester/java/src/org/forester/phylogeny/data/MultipleUris.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/phylogeny/data/NodeData.java b/forester/java/src/org/forester/phylogeny/data/NodeData.java index d1c75e2..89c4a86 100644 --- a/forester/java/src/org/forester/phylogeny/data/NodeData.java +++ b/forester/java/src/org/forester/phylogeny/data/NodeData.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -86,14 +86,17 @@ public class NodeData implements PhylogenyData { _taxonomies.add( taxonomy ); } + @Override public StringBuffer asSimpleText() { throw new UnsupportedOperationException(); } + @Override public StringBuffer asText() { throw new UnsupportedOperationException(); } + @Override public PhylogenyData copy() { final NodeData new_data = new NodeData(); new_data.setNodeName( getNodeName() ); @@ -237,6 +240,7 @@ public class NodeData implements PhylogenyData { return _taxonomies.get( index ); } + @Override public boolean isEqual( final PhylogenyData data ) { throw new UnsupportedOperationException(); } @@ -413,6 +417,7 @@ public class NodeData implements PhylogenyData { } } + @Override public StringBuffer toNHX() { final StringBuffer sb = new StringBuffer(); if ( isHasNodeIdentifier() ) { @@ -433,6 +438,7 @@ public class NodeData implements PhylogenyData { return sb; } + @Override public void toPhyloXML( final Writer writer, final int level, final String indentation ) throws IOException { if ( isHasNodeIdentifier() ) { writer.write( ForesterUtil.LINE_SEPARATOR ); diff --git a/forester/java/src/org/forester/phylogeny/data/PhylogenyData.java b/forester/java/src/org/forester/phylogeny/data/PhylogenyData.java index d5be4d7..0bf8484 100644 --- a/forester/java/src/org/forester/phylogeny/data/PhylogenyData.java +++ b/forester/java/src/org/forester/phylogeny/data/PhylogenyData.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/phylogeny/data/PhylogenyDataUtil.java b/forester/java/src/org/forester/phylogeny/data/PhylogenyDataUtil.java index a90181d..f430477 100644 --- a/forester/java/src/org/forester/phylogeny/data/PhylogenyDataUtil.java +++ b/forester/java/src/org/forester/phylogeny/data/PhylogenyDataUtil.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -357,8 +357,9 @@ public final class PhylogenyDataUtil { } public static void drawString( final String str, final double x, final double y, final Graphics g ) { - g.drawString( str, org.forester.util.ForesterUtil.roundToInt( x ), org.forester.util.ForesterUtil - .roundToInt( y ) ); + g.drawString( str, + org.forester.util.ForesterUtil.roundToInt( x ), + org.forester.util.ForesterUtil.roundToInt( y ) ); } public static String replaceIllegalXmlCharacters( final String value ) { diff --git a/forester/java/src/org/forester/phylogeny/data/Polygon.java b/forester/java/src/org/forester/phylogeny/data/Polygon.java index 427d294..577a532 100644 --- a/forester/java/src/org/forester/phylogeny/data/Polygon.java +++ b/forester/java/src/org/forester/phylogeny/data/Polygon.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/phylogeny/data/PropertiesMap.java b/forester/java/src/org/forester/phylogeny/data/PropertiesMap.java index 195590f..1a9d6a1 100644 --- a/forester/java/src/org/forester/phylogeny/data/PropertiesMap.java +++ b/forester/java/src/org/forester/phylogeny/data/PropertiesMap.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/phylogeny/data/Property.java b/forester/java/src/org/forester/phylogeny/data/Property.java index 9fd9904..d33ed01 100644 --- a/forester/java/src/org/forester/phylogeny/data/Property.java +++ b/forester/java/src/org/forester/phylogeny/data/Property.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/phylogeny/data/ProteinDomain.java b/forester/java/src/org/forester/phylogeny/data/ProteinDomain.java index 81155ff..5bb947a 100644 --- a/forester/java/src/org/forester/phylogeny/data/ProteinDomain.java +++ b/forester/java/src/org/forester/phylogeny/data/ProteinDomain.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -64,10 +64,12 @@ public class ProteinDomain implements PhylogenyData { _confidence = confidence; } + @Override public StringBuffer asSimpleText() { return new StringBuffer( getName() ); } + @Override public StringBuffer asText() { final StringBuffer sb = new StringBuffer( getName() ); sb.append( " [" ); @@ -84,6 +86,7 @@ public class ProteinDomain implements PhylogenyData { return sb; } + @Override public PhylogenyData copy() { if ( getId() == null ) { return new ProteinDomain( getName(), getFrom(), getTo(), getConfidence() ); @@ -115,6 +118,7 @@ public class ProteinDomain implements PhylogenyData { return _to; } + @Override public boolean isEqual( final PhylogenyData protein_domain ) { if ( protein_domain == null ) { return false; @@ -131,10 +135,12 @@ public class ProteinDomain implements PhylogenyData { return true; } + @Override public StringBuffer toNHX() { throw new UnsupportedOperationException(); } + @Override public void toPhyloXML( final Writer writer, final int level, final String indentation ) throws IOException { writer.write( ForesterUtil.LINE_SEPARATOR ); writer.write( indentation ); diff --git a/forester/java/src/org/forester/phylogeny/data/Reference.java b/forester/java/src/org/forester/phylogeny/data/Reference.java index 01118a5..288a862 100644 --- a/forester/java/src/org/forester/phylogeny/data/Reference.java +++ b/forester/java/src/org/forester/phylogeny/data/Reference.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -48,10 +48,12 @@ public class Reference implements PhylogenyData { _doi = doi; } + @Override public StringBuffer asSimpleText() { return new StringBuffer( getDescription() ); } + @Override public StringBuffer asText() { final StringBuffer sb = new StringBuffer(); if ( !ForesterUtil.isEmpty( getDoi() ) ) { @@ -63,6 +65,7 @@ public class Reference implements PhylogenyData { return sb; } + @Override public PhylogenyData copy() { return new Reference( getDescription(), getDoi() ); } @@ -75,6 +78,7 @@ public class Reference implements PhylogenyData { return _desc; } + @Override public boolean isEqual( final PhylogenyData data ) { if ( ( data == null ) || ( getDescription() == null ) ) { return false; @@ -94,10 +98,12 @@ public class Reference implements PhylogenyData { _desc = value; } + @Override public StringBuffer toNHX() { throw new UnsupportedOperationException(); } + @Override public void toPhyloXML( final Writer writer, final int level, final String indentation ) throws IOException { writer.write( ForesterUtil.LINE_SEPARATOR ); writer.write( indentation ); diff --git a/forester/java/src/org/forester/phylogeny/data/Sequence.java b/forester/java/src/org/forester/phylogeny/data/Sequence.java index 27b3b0c..39ff08a 100644 --- a/forester/java/src/org/forester/phylogeny/data/Sequence.java +++ b/forester/java/src/org/forester/phylogeny/data/Sequence.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -70,6 +70,7 @@ public class Sequence implements PhylogenyData, MultipleUris { getAnnotations().add( annotation ); } + @Override public void addUri( final Uri uri ) { if ( getUris() == null ) { setUris( new ArrayList() ); @@ -81,6 +82,7 @@ public class Sequence implements PhylogenyData, MultipleUris { _seq_relations.add( sr ); } + @Override public StringBuffer asSimpleText() { final StringBuffer sb = new StringBuffer(); if ( getAccession() != null ) { @@ -98,6 +100,7 @@ public class Sequence implements PhylogenyData, MultipleUris { return sb; } + @Override public StringBuffer asText() { return asSimpleText(); } @@ -106,6 +109,7 @@ public class Sequence implements PhylogenyData, MultipleUris { * Not a deep copy. * */ + @Override public PhylogenyData copy() { final Sequence seq = new Sequence(); seq.setAnnotations( getAnnotations() ); @@ -213,10 +217,12 @@ public class Sequence implements PhylogenyData, MultipleUris { return _type; } + @Override public List getUris() { return _uris; } + @Override public Uri getUri( final int index ) { return getUris().get( index ); } @@ -255,6 +261,7 @@ public class Sequence implements PhylogenyData, MultipleUris { setSourceId( null ); } + @Override public boolean isEqual( final PhylogenyData data ) { if ( this == data ) { return true; @@ -313,10 +320,12 @@ public class Sequence implements PhylogenyData, MultipleUris { _type = type; } + @Override public void setUris( final List uris ) { _uris = uris; } + @Override public StringBuffer toNHX() { final StringBuffer sb = new StringBuffer(); if ( getName().length() > 0 ) { @@ -333,6 +342,7 @@ public class Sequence implements PhylogenyData, MultipleUris { return sb; } + @Override public void toPhyloXML( final Writer writer, final int level, final String indentation ) throws IOException { if ( isEmpty() ) { return; diff --git a/forester/java/src/org/forester/phylogeny/data/SequenceRelation.java b/forester/java/src/org/forester/phylogeny/data/SequenceRelation.java index de50d59..b8ba724 100644 --- a/forester/java/src/org/forester/phylogeny/data/SequenceRelation.java +++ b/forester/java/src/org/forester/phylogeny/data/SequenceRelation.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/phylogeny/data/Taxonomy.java b/forester/java/src/org/forester/phylogeny/data/Taxonomy.java index 026d68b..5d4411d 100644 --- a/forester/java/src/org/forester/phylogeny/data/Taxonomy.java +++ b/forester/java/src/org/forester/phylogeny/data/Taxonomy.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -51,14 +51,17 @@ public class Taxonomy implements PhylogenyData, MultipleUris, Comparable() ); @@ -66,6 +69,7 @@ public class Taxonomy implements PhylogenyData, MultipleUris, Comparable getUris() { return _uris; } @@ -228,6 +234,7 @@ public class Taxonomy implements PhylogenyData, MultipleUris, Comparable uris ) { _uris = uris; } + @Override public StringBuffer toNHX() { final StringBuffer sb = new StringBuffer(); if ( getIdentifier() != null ) { @@ -322,6 +331,7 @@ public class Taxonomy implements PhylogenyData, MultipleUris, Comparable parameters ) throws IOException { if ( !( parser instanceof PhylogenyParser ) ) { diff --git a/forester/java/src/org/forester/phylogeny/factories/PhylogenyFactory.java b/forester/java/src/org/forester/phylogeny/factories/PhylogenyFactory.java index ce90f03..565e31a 100644 --- a/forester/java/src/org/forester/phylogeny/factories/PhylogenyFactory.java +++ b/forester/java/src/org/forester/phylogeny/factories/PhylogenyFactory.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/phylogeny/iterators/ChildNodeIteratorForward.java b/forester/java/src/org/forester/phylogeny/iterators/ChildNodeIteratorForward.java index 98bbf59..264f515 100644 --- a/forester/java/src/org/forester/phylogeny/iterators/ChildNodeIteratorForward.java +++ b/forester/java/src/org/forester/phylogeny/iterators/ChildNodeIteratorForward.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -90,6 +90,7 @@ public class ChildNodeIteratorForward implements PhylogenyNodeIterator { * @return true is this iterator has at least one more element, false * otherwise */ + @Override public boolean hasNext() { return ( getI() < getNode().getNumberOfDescendants() ); } @@ -108,6 +109,7 @@ public class ChildNodeIteratorForward implements PhylogenyNodeIterator { * @throws NoSuchElementException * if iteration is complete */ + @Override public PhylogenyNode next() throws NoSuchElementException { if ( !hasNext() ) { throw new NoSuchElementException( "Attempt to call \"next()\" on iterator which has no more next elements." ); @@ -121,6 +123,7 @@ public class ChildNodeIteratorForward implements PhylogenyNodeIterator { * Not supported. * */ + @Override public void remove() { throw new UnsupportedOperationException(); } @@ -128,6 +131,7 @@ public class ChildNodeIteratorForward implements PhylogenyNodeIterator { /** * Resets the iterator. */ + @Override public void reset() { setI( 0 ); } diff --git a/forester/java/src/org/forester/phylogeny/iterators/ExternalForwardIterator.java b/forester/java/src/org/forester/phylogeny/iterators/ExternalForwardIterator.java index f75e6f7..bf68269 100644 --- a/forester/java/src/org/forester/phylogeny/iterators/ExternalForwardIterator.java +++ b/forester/java/src/org/forester/phylogeny/iterators/ExternalForwardIterator.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -75,6 +75,7 @@ public class ExternalForwardIterator implements PhylogenyNodeIterator { * * @see java.util.Iterator#hasNext() */ + @Override public boolean hasNext() { return getCurrentNode() != null; } @@ -84,6 +85,7 @@ public class ExternalForwardIterator implements PhylogenyNodeIterator { * * @see java.util.Iterator#next() */ + @Override public PhylogenyNode next() throws NoSuchElementException { if ( !hasNext() ) { throw new NoSuchElementException( "Attempt to call \"next()\" on iterator which has no more next elements." ); @@ -102,6 +104,7 @@ public class ExternalForwardIterator implements PhylogenyNodeIterator { * Not supported. * */ + @Override public void remove() { throw new UnsupportedOperationException(); } @@ -109,6 +112,7 @@ public class ExternalForwardIterator implements PhylogenyNodeIterator { /** * DOCUMENT ME! */ + @Override public void reset() { setCurrentNode( getFirstExtNode() ); } diff --git a/forester/java/src/org/forester/phylogeny/iterators/LevelOrderTreeIterator.java b/forester/java/src/org/forester/phylogeny/iterators/LevelOrderTreeIterator.java index 1b1450f..f5ab499 100644 --- a/forester/java/src/org/forester/phylogeny/iterators/LevelOrderTreeIterator.java +++ b/forester/java/src/org/forester/phylogeny/iterators/LevelOrderTreeIterator.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -107,6 +107,7 @@ public class LevelOrderTreeIterator implements PhylogenyNodeIterator { * @return true is this iterator has at least one more element, false * otherwise */ + @Override public boolean hasNext() { return !getQueue().isEmpty(); } @@ -118,6 +119,7 @@ public class LevelOrderTreeIterator implements PhylogenyNodeIterator { * @throws NoSuchElementException * if iteration is complete */ + @Override public PhylogenyNode next() throws NoSuchElementException { if ( !hasNext() ) { throw new NoSuchElementException( "Attempt to call \"next()\" on iterator which has no more next elements." ); @@ -133,6 +135,7 @@ public class LevelOrderTreeIterator implements PhylogenyNodeIterator { * Not supported. * */ + @Override public void remove() { throw new UnsupportedOperationException(); } @@ -140,6 +143,7 @@ public class LevelOrderTreeIterator implements PhylogenyNodeIterator { /** * Resets the iterator. */ + @Override public void reset() { getQueue().clear(); getQueue().enqueue( getRoot() ); diff --git a/forester/java/src/org/forester/phylogeny/iterators/PhylogenyNodeIterator.java b/forester/java/src/org/forester/phylogeny/iterators/PhylogenyNodeIterator.java index 587ab51..f10aecd 100644 --- a/forester/java/src/org/forester/phylogeny/iterators/PhylogenyNodeIterator.java +++ b/forester/java/src/org/forester/phylogeny/iterators/PhylogenyNodeIterator.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -38,8 +38,10 @@ import org.forester.phylogeny.PhylogenyNode; */ public interface PhylogenyNodeIterator extends Iterator { + @Override public boolean hasNext(); + @Override public PhylogenyNode next() throws NoSuchElementException; public void reset(); diff --git a/forester/java/src/org/forester/phylogeny/iterators/PostOrderStackObject.java b/forester/java/src/org/forester/phylogeny/iterators/PostOrderStackObject.java index 9f06e50..b18562a 100644 --- a/forester/java/src/org/forester/phylogeny/iterators/PostOrderStackObject.java +++ b/forester/java/src/org/forester/phylogeny/iterators/PostOrderStackObject.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/phylogeny/iterators/PostorderTreeIterator.java b/forester/java/src/org/forester/phylogeny/iterators/PostorderTreeIterator.java index 1405476..0d06ff9 100644 --- a/forester/java/src/org/forester/phylogeny/iterators/PostorderTreeIterator.java +++ b/forester/java/src/org/forester/phylogeny/iterators/PostorderTreeIterator.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -72,6 +72,7 @@ public class PostorderTreeIterator implements PhylogenyNodeIterator { * * @return DOCUMENT ME! */ + @Override public boolean hasNext() { return _has_next; } @@ -79,6 +80,7 @@ public class PostorderTreeIterator implements PhylogenyNodeIterator { /** * Advances the Iterator by one. */ + @Override public PhylogenyNode next() throws NoSuchElementException { if ( !hasNext() ) { throw new NoSuchElementException( "Attempt to call \"next()\" on iterator which has no more next elements." ); @@ -109,6 +111,7 @@ public class PostorderTreeIterator implements PhylogenyNodeIterator { * Not supported. * */ + @Override public void remove() { throw new UnsupportedOperationException(); } @@ -116,6 +119,7 @@ public class PostorderTreeIterator implements PhylogenyNodeIterator { /** * DOCUMENT ME! */ + @Override public void reset() { setHasNext( true ); getStack().clear(); diff --git a/forester/java/src/org/forester/phylogeny/iterators/PreorderTreeIterator.java b/forester/java/src/org/forester/phylogeny/iterators/PreorderTreeIterator.java index 18928db..c01434b 100644 --- a/forester/java/src/org/forester/phylogeny/iterators/PreorderTreeIterator.java +++ b/forester/java/src/org/forester/phylogeny/iterators/PreorderTreeIterator.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -75,6 +75,7 @@ public class PreorderTreeIterator implements PhylogenyNodeIterator { * * @see java.util.Iterator#hasNext() */ + @Override public boolean hasNext() { return !getStack().isEmpty(); } @@ -82,6 +83,7 @@ public class PreorderTreeIterator implements PhylogenyNodeIterator { /** * Advances the Iterator by one. */ + @Override public PhylogenyNode next() throws NoSuchElementException { if ( !hasNext() ) { throw new NoSuchElementException( "Attempt to call \"next()\" on iterator which has no more next elements." ); @@ -99,10 +101,12 @@ public class PreorderTreeIterator implements PhylogenyNodeIterator { * Not supported. * */ + @Override public void remove() { throw new UnsupportedOperationException(); } + @Override public void reset() { getStack().clear(); getStack().push( getTree().getRoot() ); diff --git a/forester/java/src/org/forester/sdi/DistanceCalculator.java b/forester/java/src/org/forester/sdi/DistanceCalculator.java index 51b4201..dc72099 100644 --- a/forester/java/src/org/forester/sdi/DistanceCalculator.java +++ b/forester/java/src/org/forester/sdi/DistanceCalculator.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/sdi/GSDI.java b/forester/java/src/org/forester/sdi/GSDI.java index b6641bb..9b18e81 100644 --- a/forester/java/src/org/forester/sdi/GSDI.java +++ b/forester/java/src/org/forester/sdi/GSDI.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/sdi/ORcount.java b/forester/java/src/org/forester/sdi/ORcount.java index 4271890..a64fbad 100644 --- a/forester/java/src/org/forester/sdi/ORcount.java +++ b/forester/java/src/org/forester/sdi/ORcount.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/sdi/RIO.java b/forester/java/src/org/forester/sdi/RIO.java index d2c79ee..2da3a70 100644 --- a/forester/java/src/org/forester/sdi/RIO.java +++ b/forester/java/src/org/forester/sdi/RIO.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/sdi/RIOn.java b/forester/java/src/org/forester/sdi/RIOn.java index 7855473..f6dda23 100644 --- a/forester/java/src/org/forester/sdi/RIOn.java +++ b/forester/java/src/org/forester/sdi/RIOn.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/sdi/SDI.java b/forester/java/src/org/forester/sdi/SDI.java index b21b9b5..6f163cc 100644 --- a/forester/java/src/org/forester/sdi/SDI.java +++ b/forester/java/src/org/forester/sdi/SDI.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/sdi/SDIR.java b/forester/java/src/org/forester/sdi/SDIR.java index f75f6f8..98f1cc5 100644 --- a/forester/java/src/org/forester/sdi/SDIR.java +++ b/forester/java/src/org/forester/sdi/SDIR.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/sdi/SDIse.java b/forester/java/src/org/forester/sdi/SDIse.java index 4509685..af6653a 100644 --- a/forester/java/src/org/forester/sdi/SDIse.java +++ b/forester/java/src/org/forester/sdi/SDIse.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/sdi/SDIx.java b/forester/java/src/org/forester/sdi/SDIx.java index d7786c0..b7ef358 100644 --- a/forester/java/src/org/forester/sdi/SDIx.java +++ b/forester/java/src/org/forester/sdi/SDIx.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/sdi/TaxonomyAssigner.java b/forester/java/src/org/forester/sdi/TaxonomyAssigner.java index 3e3fe86..6e4a2a8 100644 --- a/forester/java/src/org/forester/sdi/TaxonomyAssigner.java +++ b/forester/java/src/org/forester/sdi/TaxonomyAssigner.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/sdi/TestGSDI.java b/forester/java/src/org/forester/sdi/TestGSDI.java index 6cf3c72..0c67a61 100644 --- a/forester/java/src/org/forester/sdi/TestGSDI.java +++ b/forester/java/src/org/forester/sdi/TestGSDI.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/sdi/Tuplet.java b/forester/java/src/org/forester/sdi/Tuplet.java index 37426e4..20bfe6f 100644 --- a/forester/java/src/org/forester/sdi/Tuplet.java +++ b/forester/java/src/org/forester/sdi/Tuplet.java @@ -7,7 +7,7 @@ // Copyright (C) 2000-2001 Washington University School of Medicine // and Howard Hughes Medical Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -105,6 +105,7 @@ class Tuplet implements Comparable { } } + @Override public int compareTo( final Tuplet n ) { if ( ( getValue1() != Tuplet.DEFAULT ) && ( n.getValue1() != Tuplet.DEFAULT ) ) { if ( getValue1() < n.getValue1() ) { diff --git a/forester/java/src/org/forester/sequence/BasicSequence.java b/forester/java/src/org/forester/sequence/BasicSequence.java index 4cc03a7..ed56ed8 100644 --- a/forester/java/src/org/forester/sequence/BasicSequence.java +++ b/forester/java/src/org/forester/sequence/BasicSequence.java @@ -6,7 +6,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -45,22 +45,27 @@ public class BasicSequence implements Sequence { _type = type; } + @Override public Object getIdentifier() { return _identifier; } + @Override public int getLength() { return _mol_sequence.length; } + @Override public char[] getMolecularSequence() { return _mol_sequence; } + @Override public char getResidueAt( final int position ) { return _mol_sequence[ position ]; } + @Override public TYPE getType() { return _type; } diff --git a/forester/java/src/org/forester/sequence/Sequence.java b/forester/java/src/org/forester/sequence/Sequence.java index 3ee5893..b794af9 100644 --- a/forester/java/src/org/forester/sequence/Sequence.java +++ b/forester/java/src/org/forester/sequence/Sequence.java @@ -6,7 +6,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/surfacing/AdjactantDirectedBinaryDomainCombination.java b/forester/java/src/org/forester/surfacing/AdjactantDirectedBinaryDomainCombination.java index 43bb0e3..bb3a8a9 100644 --- a/forester/java/src/org/forester/surfacing/AdjactantDirectedBinaryDomainCombination.java +++ b/forester/java/src/org/forester/surfacing/AdjactantDirectedBinaryDomainCombination.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/surfacing/AdjactantDirectedCombinableDomains.java b/forester/java/src/org/forester/surfacing/AdjactantDirectedCombinableDomains.java index adfd02c..d760297 100644 --- a/forester/java/src/org/forester/surfacing/AdjactantDirectedCombinableDomains.java +++ b/forester/java/src/org/forester/surfacing/AdjactantDirectedCombinableDomains.java @@ -7,7 +7,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/surfacing/BasicBinaryDomainCombination.java b/forester/java/src/org/forester/surfacing/BasicBinaryDomainCombination.java index 9436ce9..6861942 100644 --- a/forester/java/src/org/forester/surfacing/BasicBinaryDomainCombination.java +++ b/forester/java/src/org/forester/surfacing/BasicBinaryDomainCombination.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -92,10 +92,12 @@ public class BasicBinaryDomainCombination implements BinaryDomainCombination { } } + @Override public DomainId getId0() { return _id_0; } + @Override public DomainId getId1() { return _id_1; } @@ -105,6 +107,7 @@ public class BasicBinaryDomainCombination implements BinaryDomainCombination { return getId0().hashCode() + ( 19 * getId1().hashCode() ); } + @Override public StringBuffer toGraphDescribingLanguage( final OutputFormat format, final String node_attribute, final String edge_attribute ) { diff --git a/forester/java/src/org/forester/surfacing/BasicCombinableDomains.java b/forester/java/src/org/forester/surfacing/BasicCombinableDomains.java index 9f108cc..bfc13ce 100644 --- a/forester/java/src/org/forester/surfacing/BasicCombinableDomains.java +++ b/forester/java/src/org/forester/surfacing/BasicCombinableDomains.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -50,6 +50,7 @@ public class BasicCombinableDomains implements CombinableDomains { init(); } + @Override public void addCombinableDomain( final DomainId protein_domain ) { if ( getCombiningDomains().containsKey( protein_domain ) ) { getCombiningDomains().put( protein_domain, getCombiningDomains().get( protein_domain ) + 1 ); @@ -59,6 +60,7 @@ public class BasicCombinableDomains implements CombinableDomains { } } + @Override public List getAllDomains() { final List domains = getCombinableDomains(); if ( !domains.contains( getKeyDomain() ) ) { @@ -67,6 +69,7 @@ public class BasicCombinableDomains implements CombinableDomains { return domains; } + @Override public List getCombinableDomains() { final List domains = new ArrayList( getNumberOfCombinableDomains() ); for( final DomainId domain : getCombiningDomains().keySet() ) { @@ -75,6 +78,7 @@ public class BasicCombinableDomains implements CombinableDomains { return domains; } + @Override public SortedMap getCombinableDomainsIds() { final SortedMap ids = new TreeMap(); for( final DomainId domain : getCombiningDomains().keySet() ) { @@ -84,6 +88,7 @@ public class BasicCombinableDomains implements CombinableDomains { return ids; } + @Override public StringBuilder getCombiningDomainIdsAsStringBuilder() { final StringBuilder sb = new StringBuilder(); for( final Iterator iter = getCombiningDomains().keySet().iterator(); iter.hasNext(); ) { @@ -104,26 +109,32 @@ public class BasicCombinableDomains implements CombinableDomains { return _combining_domains; } + @Override public DomainId getKeyDomain() { return _key_domain; } + @Override public DescriptiveStatistics getKeyDomainConfidenceDescriptiveStatistics() { return _key_domain_confidence_statistics; } + @Override public int getKeyDomainCount() { return _key_domain_count; } + @Override public int getKeyDomainProteinsCount() { return _key_domain_proteins_count; } + @Override public int getNumberOfCombinableDomains() { return _combining_domains.size(); } + @Override public int getNumberOfProteinsExhibitingCombination( final DomainId protein_domain ) { if ( getCombiningDomains().containsKey( protein_domain ) ) { return getCombiningDomains().get( protein_domain ); @@ -133,6 +144,7 @@ public class BasicCombinableDomains implements CombinableDomains { } } + @Override public Species getSpecies() { return _species; } @@ -143,18 +155,22 @@ public class BasicCombinableDomains implements CombinableDomains { _key_domain_confidence_statistics = null; } + @Override public boolean isCombinable( final DomainId protein_domain ) { return getCombiningDomains().containsKey( protein_domain ); } + @Override public void setKeyDomainConfidenceDescriptiveStatistics( final DescriptiveStatistics key_domain_confidence_statistics ) { _key_domain_confidence_statistics = key_domain_confidence_statistics; } + @Override public void setKeyDomainCount( final int key_domain_count ) { _key_domain_count = key_domain_count; } + @Override public void setKeyDomainProteinsCount( final int key_domain_proteins_count ) { _key_domain_proteins_count = key_domain_proteins_count; } diff --git a/forester/java/src/org/forester/surfacing/BasicDomain.java b/forester/java/src/org/forester/surfacing/BasicDomain.java index a5a2da5..1c9ba39 100644 --- a/forester/java/src/org/forester/surfacing/BasicDomain.java +++ b/forester/java/src/org/forester/surfacing/BasicDomain.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -120,6 +120,7 @@ public class BasicDomain implements Domain { _per_domain_score = per_domain_score; } + @Override public void addGoId( final GoId go_id ) { getDomainId().getGoIds().add( go_id ); } @@ -129,6 +130,7 @@ public class BasicDomain implements Domain { * insensitive) and their numbers. * */ + @Override public int compareTo( final Domain domain ) { if ( domain.getClass() != this.getClass() ) { throw new IllegalArgumentException( "attempt to compare [" + domain.getClass() + "] to " + "[" @@ -162,22 +164,27 @@ public class BasicDomain implements Domain { } } + @Override public DomainId getDomainId() { return _id; } + @Override public int getFrom() { return _from; } + @Override public GoId getGoId( final int i ) { return getDomainId().getGoIds().get( i ); } + @Override public short getNumber() { return _number; } + @Override public int getNumberOfGoIds() { return getDomainId().getGoIds().size(); } @@ -192,18 +199,22 @@ public class BasicDomain implements Domain { return _per_domain_score; } + @Override public double getPerSequenceEvalue() { return _per_sequence_evalue; } + @Override public double getPerSequenceScore() { return _per_sequence_score; } + @Override public int getTo() { return _to; } + @Override public short getTotalCount() { return _total_count; } diff --git a/forester/java/src/org/forester/surfacing/BasicDomainSimilarityCalculator.java b/forester/java/src/org/forester/surfacing/BasicDomainSimilarityCalculator.java index 5b5a91e..3b7b587 100644 --- a/forester/java/src/org/forester/surfacing/BasicDomainSimilarityCalculator.java +++ b/forester/java/src/org/forester/surfacing/BasicDomainSimilarityCalculator.java @@ -7,7 +7,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -51,6 +51,7 @@ public class BasicDomainSimilarityCalculator implements DomainSimilarityCalculat _treat_as_binary_comparison = treat_as_binary_comparison; } + @Override public SortedSet calculateSimilarities( final PairwiseDomainSimilarityCalculator pairwise_calculator, final List cdc_list, final boolean ignore_domains_without_combinations_in_any_genome, @@ -142,8 +143,8 @@ public class BasicDomainSimilarityCalculator implements DomainSimilarityCalculat } final DescriptiveStatistics stat = new BasicDescriptiveStatistics(); final SortedMap species_data = new TreeMap(); - species_data.put( domains_list.get( 0 ).getSpecies(), createSpeciesSpecificDomainSimilariyData( domains_list - .get( 0 ) ) ); + species_data.put( domains_list.get( 0 ).getSpecies(), + createSpeciesSpecificDomainSimilariyData( domains_list.get( 0 ) ) ); int max_difference_in_counts = 0; int max_difference = 0; final boolean is_domain_combination_based = pairwise_calculator instanceof CombinationsBasedPairwiseDomainSimilarityCalculator; @@ -231,9 +232,10 @@ public class BasicDomainSimilarityCalculator implements DomainSimilarityCalculat } private static SpeciesSpecificDomainSimilariyData createSpeciesSpecificDomainSimilariyData( final CombinableDomains cd ) { - final SpeciesSpecificDomainSimilariyData sd = new PrintableSpeciesSpecificDomainSimilariyData( cd - .getKeyDomainProteinsCount(), cd.getKeyDomainCount(), cd.getNumberOfCombinableDomains(), cd - .getKeyDomainConfidenceDescriptiveStatistics() ); + final SpeciesSpecificDomainSimilariyData sd = new PrintableSpeciesSpecificDomainSimilariyData( cd.getKeyDomainProteinsCount(), + cd.getKeyDomainCount(), + cd.getNumberOfCombinableDomains(), + cd.getKeyDomainConfidenceDescriptiveStatistics() ); for( final DomainId domain : cd.getCombinableDomains() ) { sd.addProteinsExhibitingCombinationCount( domain, cd.getNumberOfProteinsExhibitingCombination( domain ) ); } diff --git a/forester/java/src/org/forester/surfacing/BasicGenomeWideCombinableDomains.java b/forester/java/src/org/forester/surfacing/BasicGenomeWideCombinableDomains.java index ca8bff0..d70f915 100644 --- a/forester/java/src/org/forester/surfacing/BasicGenomeWideCombinableDomains.java +++ b/forester/java/src/org/forester/surfacing/BasicGenomeWideCombinableDomains.java @@ -27,10 +27,10 @@ public class BasicGenomeWideCombinableDomains implements GenomeWideCombinableDom private final static NumberFormat FORMATTER = new DecimalFormat( "0.0E0" ); private static final Comparator DESCENDING_KEY_DOMAIN_COUNT_ORDER = new Comparator() { + @Override public int compare( final CombinableDomains d1, final CombinableDomains d2 ) { - if ( d1 - .getKeyDomainCount() < d2 + if ( d1.getKeyDomainCount() < d2 .getKeyDomainCount() ) { return 1; } @@ -51,10 +51,10 @@ public class BasicGenomeWideCombinableDomains implements GenomeWideCombinableDom }; private static final Comparator DESCENDING_KEY_DOMAIN_PROTEINS_COUNT_ORDER = new Comparator() { + @Override public int compare( final CombinableDomains d1, final CombinableDomains d2 ) { - if ( d1 - .getKeyDomainProteinsCount() < d2 + if ( d1.getKeyDomainProteinsCount() < d2 .getKeyDomainProteinsCount() ) { return 1; } @@ -75,10 +75,10 @@ public class BasicGenomeWideCombinableDomains implements GenomeWideCombinableDom }; private static final Comparator DESCENDING_COMBINATIONS_COUNT_ORDER = new Comparator() { + @Override public int compare( final CombinableDomains d1, final CombinableDomains d2 ) { - if ( d1 - .getNumberOfCombinableDomains() < d2 + if ( d1.getNumberOfCombinableDomains() < d2 .getNumberOfCombinableDomains() ) { return 1; } @@ -111,14 +111,17 @@ public class BasicGenomeWideCombinableDomains implements GenomeWideCombinableDom _combinable_domains_map.put( key, cdc ); } + @Override public boolean contains( final DomainId key_id ) { return _combinable_domains_map.containsKey( key_id ); } + @Override public CombinableDomains get( final DomainId key_id ) { return _combinable_domains_map.get( key_id ); } + @Override public SortedMap getAllCombinableDomainsIds() { return _combinable_domains_map; } @@ -164,10 +167,12 @@ public class BasicGenomeWideCombinableDomains implements GenomeWideCombinableDom return stats; } + @Override public int getSize() { return _combinable_domains_map.size(); } + @Override public Species getSpecies() { return _species; } @@ -191,6 +196,7 @@ public class BasicGenomeWideCombinableDomains implements GenomeWideCombinableDom // Produces something like: // 2-oxoacid_dh 5 5 2 4.8E-67 Biotin_lipoyl [4], E3_binding [3] + @Override public StringBuilder toStringBuilder( final GenomeWideCombinableDomainsSortOrder sort_order ) { final StringBuilder sb = new StringBuilder(); final List combinable_domains = new ArrayList(); @@ -213,14 +219,12 @@ public class BasicGenomeWideCombinableDomains implements GenomeWideCombinableDom sb.append( ForesterUtil.pad( new StringBuffer( "" + cb.getKeyDomainCount() ), 8, ' ', false ) ); sb.append( ForesterUtil.pad( new StringBuffer( "" + cb.getKeyDomainProteinsCount() ), 8, ' ', false ) ); sb.append( ForesterUtil.pad( new StringBuffer( "" + cb.getNumberOfCombinableDomains() ), 8, ' ', false ) ); - sb - .append( ForesterUtil - .pad( new StringBuffer( "" - + FORMATTER - .format( cb.getKeyDomainConfidenceDescriptiveStatistics().median() ) ), - 10, - ' ', - false ) ); + sb.append( ForesterUtil.pad( new StringBuffer( "" + + FORMATTER.format( cb.getKeyDomainConfidenceDescriptiveStatistics() + .median() ) ), + 10, + ' ', + false ) ); sb.append( cb.getCombiningDomainIdsAsStringBuilder() ); sb.append( ForesterUtil.getLineSeparator() ); } diff --git a/forester/java/src/org/forester/surfacing/BasicProtein.java b/forester/java/src/org/forester/surfacing/BasicProtein.java index bc67c18..93949d1 100644 --- a/forester/java/src/org/forester/surfacing/BasicProtein.java +++ b/forester/java/src/org/forester/surfacing/BasicProtein.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -47,6 +47,7 @@ public class BasicProtein implements Protein { init(); } + @Override public void addProteinDomain( final Domain protein_domain ) { getProteinDomains().add( protein_domain ); } @@ -113,14 +114,17 @@ public class BasicProtein implements Protein { return _name; } + @Override public int getNumberOfProteinDomains() { return getProteinDomains().size(); } + @Override public Domain getProteinDomain( final int index ) { return _protein_domains.get( index ); } + @Override public int getProteinDomainCount( final DomainId domain_id ) { return getProteinDomains( domain_id ).size(); } @@ -133,10 +137,12 @@ public class BasicProtein implements Protein { return ids; } + @Override public List getProteinDomains() { return _protein_domains; } + @Override public List getProteinDomains( final DomainId domain_id ) { final List domains = new ArrayList(); for( final Domain domain : getProteinDomains() ) { @@ -147,10 +153,12 @@ public class BasicProtein implements Protein { return domains; } + @Override public ProteinId getProteinId() { return _id; } + @Override public Species getSpecies() { return _species; } diff --git a/forester/java/src/org/forester/surfacing/BasicSpecies.java b/forester/java/src/org/forester/surfacing/BasicSpecies.java index e425b39..282109e 100644 --- a/forester/java/src/org/forester/surfacing/BasicSpecies.java +++ b/forester/java/src/org/forester/surfacing/BasicSpecies.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -67,6 +67,7 @@ public class BasicSpecies implements Species { /* (non-Javadoc) * @see org.forester.surfacing.Species#getSpeciesId() */ + @Override public String getSpeciesId() { return _species_id; } diff --git a/forester/java/src/org/forester/surfacing/BinaryDomainCombination.java b/forester/java/src/org/forester/surfacing/BinaryDomainCombination.java index 3637dfe..352211a 100644 --- a/forester/java/src/org/forester/surfacing/BinaryDomainCombination.java +++ b/forester/java/src/org/forester/surfacing/BinaryDomainCombination.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -44,6 +44,7 @@ public interface BinaryDomainCombination extends Comparable" ); if ( bdcs_per_genome.get( species ).contains( bdc ) && ( copy_means.get( bdc ) > 0 ) ) { - final int count = ( ( BasicCombinableDomains ) genome.get( bdc.getId0() ) ).getCombiningDomains().get( bdc - .getId1() ); + final int count = ( ( BasicCombinableDomains ) genome.get( bdc.getId0() ) ).getCombiningDomains() + .get( bdc.getId1() ); html_writer.write( count + "" ); } else { diff --git a/forester/java/src/org/forester/surfacing/DomainId.java b/forester/java/src/org/forester/surfacing/DomainId.java index 18a4a4d..0ab1039 100644 --- a/forester/java/src/org/forester/surfacing/DomainId.java +++ b/forester/java/src/org/forester/surfacing/DomainId.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/surfacing/DomainLengths.java b/forester/java/src/org/forester/surfacing/DomainLengths.java index 9e39b9e..0e96aca 100644 --- a/forester/java/src/org/forester/surfacing/DomainLengths.java +++ b/forester/java/src/org/forester/surfacing/DomainLengths.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2010 Christian M. Zmasek // Copyright (C) 2008-2010 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/surfacing/DomainLengthsTable.java b/forester/java/src/org/forester/surfacing/DomainLengthsTable.java index 4b6ca22..f154f1d 100644 --- a/forester/java/src/org/forester/surfacing/DomainLengthsTable.java +++ b/forester/java/src/org/forester/surfacing/DomainLengthsTable.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2010 Christian M. Zmasek // Copyright (C) 2008-2010 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/surfacing/DomainParsimonyCalculator.java b/forester/java/src/org/forester/surfacing/DomainParsimonyCalculator.java index 82de445..2396b90 100644 --- a/forester/java/src/org/forester/surfacing/DomainParsimonyCalculator.java +++ b/forester/java/src/org/forester/surfacing/DomainParsimonyCalculator.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/surfacing/DomainSimilarity.java b/forester/java/src/org/forester/surfacing/DomainSimilarity.java index bdf227c..724aa70 100644 --- a/forester/java/src/org/forester/surfacing/DomainSimilarity.java +++ b/forester/java/src/org/forester/surfacing/DomainSimilarity.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/surfacing/DomainSimilarityCalculator.java b/forester/java/src/org/forester/surfacing/DomainSimilarityCalculator.java index 4a4c91f..27ea841 100644 --- a/forester/java/src/org/forester/surfacing/DomainSimilarityCalculator.java +++ b/forester/java/src/org/forester/surfacing/DomainSimilarityCalculator.java @@ -7,7 +7,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/surfacing/GenomeWideCombinableDomains.java b/forester/java/src/org/forester/surfacing/GenomeWideCombinableDomains.java index e1c6cc6..537f44f 100644 --- a/forester/java/src/org/forester/surfacing/GenomeWideCombinableDomains.java +++ b/forester/java/src/org/forester/surfacing/GenomeWideCombinableDomains.java @@ -7,7 +7,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/surfacing/MappingResults.java b/forester/java/src/org/forester/surfacing/MappingResults.java index 8204dbc..69a6a31 100644 --- a/forester/java/src/org/forester/surfacing/MappingResults.java +++ b/forester/java/src/org/forester/surfacing/MappingResults.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/surfacing/PairwiseDomainSimilarity.java b/forester/java/src/org/forester/surfacing/PairwiseDomainSimilarity.java index d1f67d0..8880b05 100644 --- a/forester/java/src/org/forester/surfacing/PairwiseDomainSimilarity.java +++ b/forester/java/src/org/forester/surfacing/PairwiseDomainSimilarity.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/surfacing/PairwiseDomainSimilarityCalculator.java b/forester/java/src/org/forester/surfacing/PairwiseDomainSimilarityCalculator.java index f0e04ca..291a350 100644 --- a/forester/java/src/org/forester/surfacing/PairwiseDomainSimilarityCalculator.java +++ b/forester/java/src/org/forester/surfacing/PairwiseDomainSimilarityCalculator.java @@ -7,7 +7,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/surfacing/PairwiseGenomeComparator.java b/forester/java/src/org/forester/surfacing/PairwiseGenomeComparator.java index ae94f81..789574a 100644 --- a/forester/java/src/org/forester/surfacing/PairwiseGenomeComparator.java +++ b/forester/java/src/org/forester/surfacing/PairwiseGenomeComparator.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -233,9 +233,11 @@ public class PairwiseGenomeComparator { // - 1 ) ); if ( pw_stats != null ) { if ( pw_stats.getMin() >= pw_stats.getMax() ) { - ForesterUtil.printWarningMessage( command_line_prg_name, "for [" + species_i + "-" + species_j - + "] score minimum is [" + pw_stats.getMin() + "] while score maximum is [" - + pw_stats.getMax() + "], possibly indicating that a genome is compared to itself" ); + ForesterUtil + .printWarningMessage( command_line_prg_name, "for [" + species_i + "-" + species_j + + "] score minimum is [" + pw_stats.getMin() + "] while score maximum is [" + + pw_stats.getMax() + + "], possibly indicating that a genome is compared to itself" ); } if ( display_histograms && ( pw_stats.getMin() < pw_stats.getMax() ) ) { //final double[] values = pw_stats.getDataAsDoubleArray(); diff --git a/forester/java/src/org/forester/surfacing/PrintableDomainSimilarity.java b/forester/java/src/org/forester/surfacing/PrintableDomainSimilarity.java index 0fb075e..d5b6b4de 100644 --- a/forester/java/src/org/forester/surfacing/PrintableDomainSimilarity.java +++ b/forester/java/src/org/forester/surfacing/PrintableDomainSimilarity.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -273,6 +273,7 @@ public class PrintableDomainSimilarity implements DomainSimilarity { } } + @Override public int compareTo( final DomainSimilarity domain_similarity ) { if ( this == domain_similarity ) { return PrintableDomainSimilarity.EQUAL; @@ -418,6 +419,7 @@ public class PrintableDomainSimilarity implements DomainSimilarity { throw new AssertionError( "Unknown sort method: " + getSortField() ); } + @Override public SortedSet getCombinableDomainIds( final Species species_of_combinable_domain ) { final SortedSet sorted_ids = new TreeSet(); if ( getSpeciesData().containsKey( species_of_combinable_domain ) ) { @@ -437,6 +439,7 @@ public class PrintableDomainSimilarity implements DomainSimilarity { return _detailedness; } + @Override public DomainId getDomainId() { return getCombinableDomains().getKeyDomain(); } @@ -453,6 +456,7 @@ public class PrintableDomainSimilarity implements DomainSimilarity { return _go_namespace_limit; } + @Override public int getMaximalDifference() { return _max_difference; } @@ -462,18 +466,22 @@ public class PrintableDomainSimilarity implements DomainSimilarity { return _max_difference_in_counts; } + @Override public double getMaximalSimilarityScore() { return _max; } + @Override public double getMeanSimilarityScore() { return _mean; } + @Override public double getMinimalSimilarityScore() { return _min; } + @Override public int getN() { return _n; } @@ -482,6 +490,7 @@ public class PrintableDomainSimilarity implements DomainSimilarity { return _sort_field; } + @Override public SortedSet getSpecies() { final SortedSet species = new TreeSet(); for( final Species s : getSpeciesData().keySet() ) { @@ -494,6 +503,7 @@ public class PrintableDomainSimilarity implements DomainSimilarity { return _species_order; } + @Override public SortedMap getSpeciesData() { return _species_data; } @@ -520,6 +530,7 @@ public class PrintableDomainSimilarity implements DomainSimilarity { return sb; } + @Override public double getStandardDeviationOfSimilarityScore() { return _sd; } @@ -566,6 +577,7 @@ public class PrintableDomainSimilarity implements DomainSimilarity { return toStringBuffer( null ).toString(); } + @Override public StringBuffer toStringBuffer( final PrintableDomainSimilarity.PRINT_OPTION print_option ) { switch ( print_option ) { case SIMPLE_TAB_DELIMITED: diff --git a/forester/java/src/org/forester/surfacing/PrintableSpeciesSpecificDomainSimilariyData.java b/forester/java/src/org/forester/surfacing/PrintableSpeciesSpecificDomainSimilariyData.java index 9c36890..6733e4f 100644 --- a/forester/java/src/org/forester/surfacing/PrintableSpeciesSpecificDomainSimilariyData.java +++ b/forester/java/src/org/forester/surfacing/PrintableSpeciesSpecificDomainSimilariyData.java @@ -7,7 +7,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -55,6 +55,7 @@ class PrintableSpeciesSpecificDomainSimilariyData implements SpeciesSpecificDoma _combinable_domain_id_to_count_map = new TreeMap(); } + @Override public void addProteinsExhibitingCombinationCount( final DomainId domain_id, final int count ) { if ( getCombinableDomainIdToCountsMap().containsKey( domain_id ) ) { throw new IllegalArgumentException( "Domain with id " + domain_id + " already exists" ); @@ -62,6 +63,7 @@ class PrintableSpeciesSpecificDomainSimilariyData implements SpeciesSpecificDoma getCombinableDomainIdToCountsMap().put( domain_id, count ); } + @Override public SortedMap getCombinableDomainIdToCountsMap() { return _combinable_domain_id_to_count_map; } @@ -82,6 +84,7 @@ class PrintableSpeciesSpecificDomainSimilariyData implements SpeciesSpecificDoma return _key_domain_proteins_count; } + @Override public int getNumberOfProteinsExhibitingCombinationWith( final DomainId domain_id ) { if ( !getCombinableDomainIdToCountsMap().containsKey( domain_id ) ) { throw new IllegalArgumentException( "Domain with id " + domain_id + " not found" ); @@ -95,6 +98,7 @@ class PrintableSpeciesSpecificDomainSimilariyData implements SpeciesSpecificDoma .toString(); } + @Override public StringBuffer toStringBuffer( final DomainSimilarityCalculator.Detailedness detailedness, final boolean html ) { final StringBuffer sb = new StringBuffer(); if ( detailedness == DomainSimilarityCalculator.Detailedness.PUNCTILIOUS ) { diff --git a/forester/java/src/org/forester/surfacing/Protein.java b/forester/java/src/org/forester/surfacing/Protein.java index ecfd1e8..44d5b47 100644 --- a/forester/java/src/org/forester/surfacing/Protein.java +++ b/forester/java/src/org/forester/surfacing/Protein.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/surfacing/ProteinCountsBasedPairwiseDomainSimilarityCalculator.java b/forester/java/src/org/forester/surfacing/ProteinCountsBasedPairwiseDomainSimilarityCalculator.java index d61252c..fbcedb6 100644 --- a/forester/java/src/org/forester/surfacing/ProteinCountsBasedPairwiseDomainSimilarityCalculator.java +++ b/forester/java/src/org/forester/surfacing/ProteinCountsBasedPairwiseDomainSimilarityCalculator.java @@ -7,7 +7,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -29,6 +29,7 @@ package org.forester.surfacing; public class ProteinCountsBasedPairwiseDomainSimilarityCalculator implements PairwiseDomainSimilarityCalculator { + @Override public PairwiseDomainSimilarity calculateSimilarity( final CombinableDomains domains_1, final CombinableDomains domains_2 ) { if ( !domains_1.getKeyDomain().equals( domains_2.getKeyDomain() ) ) { diff --git a/forester/java/src/org/forester/surfacing/ProteinId.java b/forester/java/src/org/forester/surfacing/ProteinId.java index afaf661..b1f72cc 100644 --- a/forester/java/src/org/forester/surfacing/ProteinId.java +++ b/forester/java/src/org/forester/surfacing/ProteinId.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/surfacing/SimpleDomain.java b/forester/java/src/org/forester/surfacing/SimpleDomain.java index 76d73bf..9200eb8 100644 --- a/forester/java/src/org/forester/surfacing/SimpleDomain.java +++ b/forester/java/src/org/forester/surfacing/SimpleDomain.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -49,6 +49,7 @@ public class SimpleDomain implements Domain { throw new RuntimeException( "method not implemented" ); } + @Override public int compareTo( final Domain domain ) { if ( this == domain ) { return 0; @@ -56,10 +57,12 @@ public class SimpleDomain implements Domain { return getDomainId().compareTo( domain.getDomainId() ); } + @Override public DomainId getDomainId() { return _id; } + @Override public int getFrom() { throw new RuntimeException( "method not implemented" ); } @@ -73,6 +76,7 @@ public class SimpleDomain implements Domain { throw new RuntimeException( "method not implemented" ); } + @Override public short getNumber() { throw new RuntimeException( "method not implemented" ); } @@ -92,10 +96,12 @@ public class SimpleDomain implements Domain { throw new RuntimeException( "method not implemented" ); } + @Override public double getPerSequenceEvalue() { throw new RuntimeException( "method not implemented" ); } + @Override public double getPerSequenceScore() { throw new RuntimeException( "method not implemented" ); } @@ -104,10 +110,12 @@ public class SimpleDomain implements Domain { throw new RuntimeException( "method not implemented" ); } + @Override public int getTo() { throw new RuntimeException( "method not implemented" ); } + @Override public short getTotalCount() { throw new RuntimeException( "method not implemented" ); } diff --git a/forester/java/src/org/forester/surfacing/Species.java b/forester/java/src/org/forester/surfacing/Species.java index fb387f6..34fec0c 100644 --- a/forester/java/src/org/forester/surfacing/Species.java +++ b/forester/java/src/org/forester/surfacing/Species.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/surfacing/SpeciesSpecificDomainSimilariyData.java b/forester/java/src/org/forester/surfacing/SpeciesSpecificDomainSimilariyData.java index 8c5908d..dcfa04c 100644 --- a/forester/java/src/org/forester/surfacing/SpeciesSpecificDomainSimilariyData.java +++ b/forester/java/src/org/forester/surfacing/SpeciesSpecificDomainSimilariyData.java @@ -7,7 +7,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/surfacing/SurfacingConstants.java b/forester/java/src/org/forester/surfacing/SurfacingConstants.java index 6bfd208..ac29712 100644 --- a/forester/java/src/org/forester/surfacing/SurfacingConstants.java +++ b/forester/java/src/org/forester/surfacing/SurfacingConstants.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/surfacing/SurfacingUtil.java b/forester/java/src/org/forester/surfacing/SurfacingUtil.java index 119d014..a8e966d 100644 --- a/forester/java/src/org/forester/surfacing/SurfacingUtil.java +++ b/forester/java/src/org/forester/surfacing/SurfacingUtil.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -85,6 +85,7 @@ public final class SurfacingUtil { private final static NumberFormat FORMATTER_3 = new DecimalFormat( "0.000" ); private static final Comparator ASCENDING_CONFIDENCE_VALUE_ORDER = new Comparator() { + @Override public int compare( final Domain d1, final Domain d2 ) { if ( d1.getPerSequenceEvalue() < d2 @@ -549,12 +550,16 @@ public final class SurfacingUtil { SurfacingUtil.writeBinaryStatesMatrixAsListToFile( domain_parsimony.getGainLossMatrix(), null, outfile_name + surfacing_old.PARSIMONY_OUTPUT_FITCH_PRESENT_BC, sep, ForesterUtil.LINE_SEPARATOR, null ); if ( all_binary_domains_combination_gained_fitch != null ) { - collectChangedDomainCombinationsFromBinaryStatesMatrixAsListToFile( domain_parsimony - .getGainLossMatrix(), dc_type, all_binary_domains_combination_gained_fitch, true ); + collectChangedDomainCombinationsFromBinaryStatesMatrixAsListToFile( domain_parsimony.getGainLossMatrix(), + dc_type, + all_binary_domains_combination_gained_fitch, + true ); } if ( all_binary_domains_combination_lost_fitch != null ) { - collectChangedDomainCombinationsFromBinaryStatesMatrixAsListToFile( domain_parsimony - .getGainLossMatrix(), dc_type, all_binary_domains_combination_lost_fitch, false ); + collectChangedDomainCombinationsFromBinaryStatesMatrixAsListToFile( domain_parsimony.getGainLossMatrix(), + dc_type, + all_binary_domains_combination_lost_fitch, + false ); } if ( output_binary_domain_combinations_for_graphs ) { SurfacingUtil @@ -644,8 +649,9 @@ public final class SurfacingUtil { final String sep = ForesterUtil.LINE_SEPARATOR + "###################" + ForesterUtil.LINE_SEPARATOR; final String date_time = ForesterUtil.getCurrentDateTime(); System.out.println(); - writeToNexus( outfile_name + surfacing_old.NEXUS_SECONDARY_FEATURES, secondary_features_parsimony - .createMatrixOfSecondaryFeaturePresenceOrAbsence( null ), phylogeny ); + writeToNexus( outfile_name + surfacing_old.NEXUS_SECONDARY_FEATURES, + secondary_features_parsimony.createMatrixOfSecondaryFeaturePresenceOrAbsence( null ), + phylogeny ); final Phylogeny local_phylogeny_copy = phylogeny.copy(); secondary_features_parsimony.executeDolloParsimonyOnSecondaryFeatures( mapping_results_map ); SurfacingUtil.writeMatrixToFile( secondary_features_parsimony.getGainLossMatrix(), outfile_name @@ -1027,21 +1033,29 @@ public final class SurfacingUtil { ForesterUtil.programMessage( surfacing_old.PRG_NAME, "Pfams without mapping to proc. or func. : " + pfams_without_mappings_to_bp_or_mf_counter + " [" + ( 100 * pfams_without_mappings_to_bp_or_mf_counter / all_pfams_encountered.size() ) + "%]" ); - ForesterUtil.programMessage( surfacing_old.PRG_NAME, "Pfams with a mapping : " - + pfams_with_mappings_counter + " [" - + ( 100 * pfams_with_mappings_counter / all_pfams_encountered.size() ) + "%]" ); + ForesterUtil.programMessage( surfacing_old.PRG_NAME, + "Pfams with a mapping : " + pfams_with_mappings_counter + + " [" + + ( 100 * pfams_with_mappings_counter / all_pfams_encountered.size() ) + + "%]" ); ForesterUtil.programMessage( surfacing_old.PRG_NAME, "Pfams with a mapping to proc. or func. : " + pfams_with_mappings_to_bp_or_mf_counter + " [" + ( 100 * pfams_with_mappings_to_bp_or_mf_counter / all_pfams_encountered.size() ) + "%]" ); - ForesterUtil.programMessage( surfacing_old.PRG_NAME, "Pfams with mapping to biological process: " - + biological_process_counter + " [" - + ( 100 * biological_process_counter / all_pfams_encountered.size() ) + "%]" ); - ForesterUtil.programMessage( surfacing_old.PRG_NAME, "Pfams with mapping to molecular function: " - + molecular_function_counter + " [" - + ( 100 * molecular_function_counter / all_pfams_encountered.size() ) + "%]" ); - ForesterUtil.programMessage( surfacing_old.PRG_NAME, "Pfams with mapping to cellular component: " - + cellular_component_counter + " [" - + ( 100 * cellular_component_counter / all_pfams_encountered.size() ) + "%]" ); + ForesterUtil.programMessage( surfacing_old.PRG_NAME, + "Pfams with mapping to biological process: " + biological_process_counter + + " [" + + ( 100 * biological_process_counter / all_pfams_encountered.size() ) + + "%]" ); + ForesterUtil.programMessage( surfacing_old.PRG_NAME, + "Pfams with mapping to molecular function: " + molecular_function_counter + + " [" + + ( 100 * molecular_function_counter / all_pfams_encountered.size() ) + + "%]" ); + ForesterUtil.programMessage( surfacing_old.PRG_NAME, + "Pfams with mapping to cellular component: " + cellular_component_counter + + " [" + + ( 100 * cellular_component_counter / all_pfams_encountered.size() ) + + "%]" ); summary_writer.write( ForesterUtil.LINE_SEPARATOR ); summary_writer.write( "# Sum of Pfams encountered : " + all_pfams_encountered.size() ); summary_writer.write( ForesterUtil.LINE_SEPARATOR ); @@ -1662,8 +1676,7 @@ public final class SurfacingUtil { } else { per_genome_domain_promiscuity_statistics_writer.write( FORMATTER_3.format( stats - .sampleStandardDeviation() ) - + "\t" ); + .sampleStandardDeviation() ) + "\t" ); } per_genome_domain_promiscuity_statistics_writer.write( FORMATTER_3.format( stats.median() ) + "\t" ); per_genome_domain_promiscuity_statistics_writer.write( ( int ) stats.getMin() + "\t" ); @@ -2397,18 +2410,20 @@ public final class SurfacingUtil { } private static void writeToNexus( final String outfile_name, final DomainParsimonyCalculator domain_parsimony ) { - writeToNexus( outfile_name + surfacing_old.NEXUS_EXTERNAL_DOMAINS, domain_parsimony - .createMatrixOfDomainPresenceOrAbsence() ); - writeToNexus( outfile_name + surfacing_old.NEXUS_EXTERNAL_DOMAIN_COMBINATIONS, domain_parsimony - .createMatrixOfBinaryDomainCombinationPresenceOrAbsence() ); + writeToNexus( outfile_name + surfacing_old.NEXUS_EXTERNAL_DOMAINS, + domain_parsimony.createMatrixOfDomainPresenceOrAbsence() ); + writeToNexus( outfile_name + surfacing_old.NEXUS_EXTERNAL_DOMAIN_COMBINATIONS, + domain_parsimony.createMatrixOfBinaryDomainCombinationPresenceOrAbsence() ); } private static void writeToNexus( final String outfile_name, final DomainParsimonyCalculator domain_parsimony, final Phylogeny phylogeny ) { - writeToNexus( outfile_name + surfacing_old.NEXUS_EXTERNAL_DOMAINS, domain_parsimony - .createMatrixOfDomainPresenceOrAbsence(), phylogeny ); - writeToNexus( outfile_name + surfacing_old.NEXUS_EXTERNAL_DOMAIN_COMBINATIONS, domain_parsimony - .createMatrixOfBinaryDomainCombinationPresenceOrAbsence(), phylogeny ); + writeToNexus( outfile_name + surfacing_old.NEXUS_EXTERNAL_DOMAINS, + domain_parsimony.createMatrixOfDomainPresenceOrAbsence(), + phylogeny ); + writeToNexus( outfile_name + surfacing_old.NEXUS_EXTERNAL_DOMAIN_COMBINATIONS, + domain_parsimony.createMatrixOfBinaryDomainCombinationPresenceOrAbsence(), + phylogeny ); } } diff --git a/forester/java/src/org/forester/surfacing/TestSurfacing.java b/forester/java/src/org/forester/surfacing/TestSurfacing.java index 678259e..56bb6fa 100644 --- a/forester/java/src/org/forester/surfacing/TestSurfacing.java +++ b/forester/java/src/org/forester/surfacing/TestSurfacing.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/test/Test.java b/forester/java/src/org/forester/test/Test.java index d27c23c..8a09ac8 100644 --- a/forester/java/src/org/forester/test/Test.java +++ b/forester/java/src/org/forester/test/Test.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -73,9 +73,9 @@ import org.forester.phylogeny.data.PhylogenyData; import org.forester.phylogeny.data.Polygon; import org.forester.phylogeny.data.PropertiesMap; import org.forester.phylogeny.data.Property; +import org.forester.phylogeny.data.Property.AppliesTo; import org.forester.phylogeny.data.ProteinDomain; import org.forester.phylogeny.data.Taxonomy; -import org.forester.phylogeny.data.Property.AppliesTo; import org.forester.phylogeny.factories.ParserBasedPhylogenyFactory; import org.forester.phylogeny.factories.PhylogenyFactory; import org.forester.phylogeny.iterators.PhylogenyNodeIterator; diff --git a/forester/java/src/org/forester/tools/ConfidenceAssessor.java b/forester/java/src/org/forester/tools/ConfidenceAssessor.java index 7fc7c90..1a9d85e 100644 --- a/forester/java/src/org/forester/tools/ConfidenceAssessor.java +++ b/forester/java/src/org/forester/tools/ConfidenceAssessor.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/tools/PhylogenyDecorator.java b/forester/java/src/org/forester/tools/PhylogenyDecorator.java index 086e51a..ebc1a6a 100644 --- a/forester/java/src/org/forester/tools/PhylogenyDecorator.java +++ b/forester/java/src/org/forester/tools/PhylogenyDecorator.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -96,13 +96,15 @@ public final class PhylogenyDecorator { if ( new_values.containsKey( TP_TAXONOMY_ID ) && new_values.containsKey( TP_TAXONOMY_ID_PROVIDER ) ) { ForesterUtil.ensurePresenceOfTaxonomy( node ); - node.getNodeData().getTaxonomy().setIdentifier( new Identifier( new_values - .get( TP_TAXONOMY_ID ), new_values.get( TP_TAXONOMY_ID_PROVIDER ) ) ); + node.getNodeData() + .getTaxonomy() + .setIdentifier( new Identifier( new_values.get( TP_TAXONOMY_ID ), + new_values.get( TP_TAXONOMY_ID_PROVIDER ) ) ); } else if ( new_values.containsKey( TP_TAXONOMY_ID ) ) { ForesterUtil.ensurePresenceOfTaxonomy( node ); - node.getNodeData().getTaxonomy().setIdentifier( new Identifier( new_values - .get( TP_TAXONOMY_ID ) ) ); + node.getNodeData().getTaxonomy() + .setIdentifier( new Identifier( new_values.get( TP_TAXONOMY_ID ) ) ); } if ( new_values.containsKey( TP_TAXONOMY_SN ) ) { ForesterUtil.ensurePresenceOfTaxonomy( node ); @@ -119,8 +121,10 @@ public final class PhylogenyDecorator { if ( new_values.containsKey( TP_SEQ_ACCESSION ) && new_values.containsKey( TP_SEQ_ACCESSION_SOURCE ) ) { ForesterUtil.ensurePresenceOfSequence( node ); - node.getNodeData().getSequence().setAccession( new Accession( new_values - .get( TP_SEQ_ACCESSION ), new_values.get( TP_SEQ_ACCESSION_SOURCE ) ) ); + node.getNodeData() + .getSequence() + .setAccession( new Accession( new_values.get( TP_SEQ_ACCESSION ), + new_values.get( TP_SEQ_ACCESSION_SOURCE ) ) ); } if ( new_values.containsKey( TP_SEQ_ANNOTATION_DESC ) ) { ForesterUtil.ensurePresenceOfSequence( node ); diff --git a/forester/java/src/org/forester/tools/SupportCount.java b/forester/java/src/org/forester/tools/SupportCount.java index a3c7fa8..0014915 100644 --- a/forester/java/src/org/forester/tools/SupportCount.java +++ b/forester/java/src/org/forester/tools/SupportCount.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/tools/TreeSplitMatrix.java b/forester/java/src/org/forester/tools/TreeSplitMatrix.java index d1e015b..29bd2dd 100644 --- a/forester/java/src/org/forester/tools/TreeSplitMatrix.java +++ b/forester/java/src/org/forester/tools/TreeSplitMatrix.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/util/AsciiHistogram.java b/forester/java/src/org/forester/util/AsciiHistogram.java index 07d3da8..3d295cf 100644 --- a/forester/java/src/org/forester/util/AsciiHistogram.java +++ b/forester/java/src/org/forester/util/AsciiHistogram.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/util/BasicDescriptiveStatistics.java b/forester/java/src/org/forester/util/BasicDescriptiveStatistics.java index 699526f..8ec95e7 100644 --- a/forester/java/src/org/forester/util/BasicDescriptiveStatistics.java +++ b/forester/java/src/org/forester/util/BasicDescriptiveStatistics.java @@ -7,7 +7,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,7 +17,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -47,6 +47,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#addValue(double) */ + @Override public void addValue( final double d ) { _recalc_sigma = true; _sum += d; @@ -62,6 +63,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#arithmeticMean() */ + @Override public double arithmeticMean() { validate(); return getSum() / getN(); @@ -70,6 +72,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#asSummary() */ + @Override public String asSummary() { if ( getN() > 1 ) { return arithmeticMean() + DescriptiveStatistics.PLUS_MINUS + sampleStandardDeviation() + " [" + getMin() @@ -83,6 +86,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#coefficientOfVariation() */ + @Override public double coefficientOfVariation() { validate(); return ( sampleStandardDeviation() / arithmeticMean() ); @@ -91,6 +95,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#getDataAsDoubleArray() */ + @Override public double[] getDataAsDoubleArray() { validate(); final double[] data_array = new double[ getN() ]; @@ -103,6 +108,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#getMax() */ + @Override public double getMax() { validate(); return _max; @@ -111,6 +117,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#getMin() */ + @Override public double getMin() { validate(); return _min; @@ -119,6 +126,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#getN() */ + @Override public int getN() { return _data.size(); } @@ -126,6 +134,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#getSum() */ + @Override public double getSum() { validate(); return _sum; @@ -134,6 +143,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#getSummaryAsString() */ + @Override public String getSummaryAsString() { validate(); final double mean = arithmeticMean(); @@ -144,6 +154,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#getValue(int) */ + @Override public double getValue( final int index ) { validate(); return ( ( ( _data.get( index ) ) ).doubleValue() ); @@ -161,6 +172,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#median() */ + @Override public double median() { validate(); double median = 0.0; @@ -185,6 +197,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#midrange() */ + @Override public double midrange() { validate(); return ( _min + _max ) / 2.0; @@ -193,6 +206,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#pearsonianSkewness() */ + @Override public double pearsonianSkewness() { validate(); final double mean = arithmeticMean(); @@ -204,6 +218,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#sampleStandardDeviation() */ + @Override public double sampleStandardDeviation() { return Math.sqrt( sampleVariance() ); } @@ -211,6 +226,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#sampleStandardUnit(double) */ + @Override public double sampleStandardUnit( final double value ) { validate(); return BasicDescriptiveStatistics.sampleStandardUnit( value, arithmeticMean(), sampleStandardDeviation() ); @@ -219,6 +235,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#sampleVariance() */ + @Override public double sampleVariance() { validate(); if ( getN() < 2 ) { @@ -230,6 +247,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#standardErrorOfMean() */ + @Override public double standardErrorOfMean() { validate(); return ( sampleStandardDeviation() / Math.sqrt( getN() ) ); @@ -238,6 +256,7 @@ public class BasicDescriptiveStatistics implements DescriptiveStatistics { /* (non-Javadoc) * @see org.forester.util.DescriptiveStatisticsI#sumDeviations() */ + @Override public double sumDeviations() { validate(); if ( _recalc_sigma ) { diff --git a/forester/java/src/org/forester/util/BasicTable.java b/forester/java/src/org/forester/util/BasicTable.java index 2469129..6f6d0a8 100644 --- a/forester/java/src/org/forester/util/BasicTable.java +++ b/forester/java/src/org/forester/util/BasicTable.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/util/BasicTableParser.java b/forester/java/src/org/forester/util/BasicTableParser.java index 9ebae2b..8ab9622 100644 --- a/forester/java/src/org/forester/util/BasicTableParser.java +++ b/forester/java/src/org/forester/util/BasicTableParser.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/util/CommandLineArguments.java b/forester/java/src/org/forester/util/CommandLineArguments.java index 0fc0485..e3b9276 100644 --- a/forester/java/src/org/forester/util/CommandLineArguments.java +++ b/forester/java/src/org/forester/util/CommandLineArguments.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/util/CommandProcessBuilder.java b/forester/java/src/org/forester/util/CommandProcessBuilder.java index 054f12c..645a6cd 100644 --- a/forester/java/src/org/forester/util/CommandProcessBuilder.java +++ b/forester/java/src/org/forester/util/CommandProcessBuilder.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/util/DescriptiveStatistics.java b/forester/java/src/org/forester/util/DescriptiveStatistics.java index 83b2f4f..f5a8a7f 100644 --- a/forester/java/src/org/forester/util/DescriptiveStatistics.java +++ b/forester/java/src/org/forester/util/DescriptiveStatistics.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -79,5 +79,6 @@ public interface DescriptiveStatistics { public abstract double sumDeviations(); + @Override public abstract String toString(); } \ No newline at end of file diff --git a/forester/java/src/org/forester/util/ExternalProgram.java b/forester/java/src/org/forester/util/ExternalProgram.java index 54aafe8..7a76b6b 100644 --- a/forester/java/src/org/forester/util/ExternalProgram.java +++ b/forester/java/src/org/forester/util/ExternalProgram.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/util/FailedConditionCheckException.java b/forester/java/src/org/forester/util/FailedConditionCheckException.java index d297377..cad5191 100644 --- a/forester/java/src/org/forester/util/FailedConditionCheckException.java +++ b/forester/java/src/org/forester/util/FailedConditionCheckException.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,7 +16,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/util/ForesterConstants.java b/forester/java/src/org/forester/util/ForesterConstants.java index 3edec56..7fd5c84 100644 --- a/forester/java/src/org/forester/util/ForesterConstants.java +++ b/forester/java/src/org/forester/util/ForesterConstants.java @@ -5,7 +5,7 @@ // Copyright (C) 2000-2009 Christian M. Zmasek // Copyright (C) 2007-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/util/ForesterUtil.java b/forester/java/src/org/forester/util/ForesterUtil.java index ada203b..957480b 100644 --- a/forester/java/src/org/forester/util/ForesterUtil.java +++ b/forester/java/src/org/forester/util/ForesterUtil.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -64,12 +64,14 @@ import org.forester.io.parsers.PhylogenyParser; import org.forester.io.parsers.nexus.NexusPhylogeniesParser; import org.forester.io.parsers.nhx.NHXParser; import org.forester.io.parsers.phyloxml.PhyloXmlParser; +import org.forester.io.parsers.phyloxml.PhyloXmlUtil; import org.forester.io.parsers.tol.TolParser; import org.forester.phylogeny.Phylogeny; import org.forester.phylogeny.PhylogenyMethods; import org.forester.phylogeny.PhylogenyNode; import org.forester.phylogeny.data.Confidence; import org.forester.phylogeny.data.Distribution; +import org.forester.phylogeny.data.Identifier; import org.forester.phylogeny.data.Sequence; import org.forester.phylogeny.data.Taxonomy; import org.forester.phylogeny.iterators.PhylogenyNodeIterator; @@ -1173,6 +1175,38 @@ public final class ForesterUtil { } n.getNodeData().getSequence().setName( name ); break; + case TAXONOMY_ID_UNIPROT_1: { + if ( !n.getNodeData().isHasTaxonomy() ) { + n.getNodeData().setTaxonomy( new Taxonomy() ); + } + String id = name; + final int i = name.indexOf( '_' ); + if ( i > 0 ) { + id = name.substring( i, name.length() ); + } + else { + n.setName( "" ); + } + n.getNodeData().getTaxonomy() + .setIdentifier( new Identifier( id, PhyloXmlUtil.UNIPROT_TAX_PROVIDER ) ); + break; + } + case TAXONOMY_ID_UNIPROT_2: { + if ( !n.getNodeData().isHasTaxonomy() ) { + n.getNodeData().setTaxonomy( new Taxonomy() ); + } + String id = name; + final int i = name.indexOf( '_' ); + if ( i > 0 ) { + id = name.substring( 0, i ); + } + else { + n.setName( "" ); + } + n.getNodeData().getTaxonomy() + .setIdentifier( new Identifier( id, PhyloXmlUtil.UNIPROT_TAX_PROVIDER ) ); + break; + } } } } @@ -1236,7 +1270,14 @@ public final class ForesterUtil { } public static enum PhylogenyNodeField { - CLADE_NAME, TAXONOMY_CODE, TAXONOMY_SCIENTIFIC_NAME, TAXONOMY_COMMON_NAME, SEQUENCE_SYMBOL, SEQUENCE_NAME; + CLADE_NAME, + TAXONOMY_CODE, + TAXONOMY_SCIENTIFIC_NAME, + TAXONOMY_COMMON_NAME, + SEQUENCE_SYMBOL, + SEQUENCE_NAME, + TAXONOMY_ID_UNIPROT_1, + TAXONOMY_ID_UNIPROT_2; } public static enum TAXONOMY_EXTRACTION { diff --git a/forester/java/src/org/forester/util/GeneralTable.java b/forester/java/src/org/forester/util/GeneralTable.java index 7b0a655..a00c914 100644 --- a/forester/java/src/org/forester/util/GeneralTable.java +++ b/forester/java/src/org/forester/util/GeneralTable.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/util/IllegalFormatUseException.java b/forester/java/src/org/forester/util/IllegalFormatUseException.java index 7b3704b..437d548 100644 --- a/forester/java/src/org/forester/util/IllegalFormatUseException.java +++ b/forester/java/src/org/forester/util/IllegalFormatUseException.java @@ -5,7 +5,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/util/WindowsUtils.java b/forester/java/src/org/forester/util/WindowsUtils.java index b62906d..9fa599f 100644 --- a/forester/java/src/org/forester/util/WindowsUtils.java +++ b/forester/java/src/org/forester/util/WindowsUtils.java @@ -13,7 +13,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/ws/uniprot/UniProtTaxonomy.java b/forester/java/src/org/forester/ws/uniprot/UniProtTaxonomy.java index d4b0b75..6a1ec5a 100644 --- a/forester/java/src/org/forester/ws/uniprot/UniProtTaxonomy.java +++ b/forester/java/src/org/forester/ws/uniprot/UniProtTaxonomy.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/ws/uniprot/UniProtWsTools.java b/forester/java/src/org/forester/ws/uniprot/UniProtWsTools.java index 623f837..1ecf5ea 100644 --- a/forester/java/src/org/forester/ws/uniprot/UniProtWsTools.java +++ b/forester/java/src/org/forester/ws/uniprot/UniProtWsTools.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/ws/wabi/RestUtil.java b/forester/java/src/org/forester/ws/wabi/RestUtil.java index b4f723d..fe4a8ee 100644 --- a/forester/java/src/org/forester/ws/wabi/RestUtil.java +++ b/forester/java/src/org/forester/ws/wabi/RestUtil.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/ws/wabi/TxSearch.java b/forester/java/src/org/forester/ws/wabi/TxSearch.java index ed3bc29..e4a5b25 100644 --- a/forester/java/src/org/forester/ws/wabi/TxSearch.java +++ b/forester/java/src/org/forester/ws/wabi/TxSearch.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/forester/java/src/org/forester/ws/wabi/WabiTools.java b/forester/java/src/org/forester/ws/wabi/WabiTools.java index c9445f4..c1a2e79 100644 --- a/forester/java/src/org/forester/ws/wabi/WabiTools.java +++ b/forester/java/src/org/forester/ws/wabi/WabiTools.java @@ -5,7 +5,7 @@ // Copyright (C) 2010 Christian M Zmasek // Copyright (C) 2010 Sanford-Burnham Medical Research Institute // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -15,7 +15,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -- 1.7.10.2