From: cmzmasek@gmail.com Date: Thu, 24 Oct 2013 02:59:44 +0000 (+0000) Subject: inprogress X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=380f98efacccdaeff5a86ba6b9b05367df133b79;p=jalview.git inprogress --- diff --git a/forester/java/src/org/forester/application/surfacing.java b/forester/java/src/org/forester/application/surfacing.java index 616135a..97c04d3 100644 --- a/forester/java/src/org/forester/application/surfacing.java +++ b/forester/java/src/org/forester/application/surfacing.java @@ -180,7 +180,7 @@ public class surfacing { final static private String PERFORM_DC_REGAIN_PROTEINS_STATS_OPTION = "dc_regain_stats"; final static private String DA_ANALYSIS_OPTION = "DA_analyis"; final static private String USE_LAST_IN_FITCH_OPTION = "last"; - public final static String PAIRWISE_DOMAIN_COMPARISONS_PREFIX = "pwc_"; + public final static String PAIRWISE_DOMAIN_COMPARISONS_PREFIX = "pwc_"; final static private String PAIRWISE_DOMAIN_COMPARISONS_OPTION = "pwc"; final static private String OUTPUT_FILE_OPTION = "o"; final static private String PFAM_TO_GO_FILE_USE_OPTION = "p2g"; @@ -222,22 +222,22 @@ public class surfacing { final static private boolean IGNORE_DUFS_DEFAULT = true; final static private boolean IGNORE_COMBINATION_WITH_SAME_DEFAULLT = false; final static private double MAX_E_VALUE_DEFAULT = -1; - public final static int MAX_ALLOWED_OVERLAP_DEFAULT = -1; + public final static int MAX_ALLOWED_OVERLAP_DEFAULT = -1; private static final String RANDOM_SEED_FOR_FITCH_PARSIMONY_OPTION = "random_seed"; private static final String CONSIDER_DOMAIN_COMBINATION_DIRECTEDNESS = "consider_bdc_direction"; private static final String CONSIDER_DOMAIN_COMBINATION_DIRECTEDNESS_AND_ADJACENCY = "consider_bdc_adj"; - public static final String SEQ_EXTRACT_SUFFIX = ".prot"; - public static final String PLUS_MINUS_ANALYSIS_OPTION = "plus_minus"; - public static final String PLUS_MINUS_DOM_SUFFIX = "_plus_minus_dom.txt"; - public static final String PLUS_MINUS_DOM_SUFFIX_HTML = "_plus_minus_dom.html"; - public static final String PLUS_MINUS_DC_SUFFIX_HTML = "_plus_minus_dc.html"; - public static final int PLUS_MINUS_ANALYSIS_MIN_DIFF_DEFAULT = 0; - public static final double PLUS_MINUS_ANALYSIS_FACTOR_DEFAULT = 1.0; - public static final String PLUS_MINUS_ALL_GO_IDS_DOM_SUFFIX = "_plus_minus_go_ids_all.txt"; - public static final String PLUS_MINUS_PASSING_GO_IDS_DOM_SUFFIX = "_plus_minus_go_ids_passing.txt"; + public static final String SEQ_EXTRACT_SUFFIX = ".prot"; + public static final String PLUS_MINUS_ANALYSIS_OPTION = "plus_minus"; + public static final String PLUS_MINUS_DOM_SUFFIX = "_plus_minus_dom.txt"; + public static final String PLUS_MINUS_DOM_SUFFIX_HTML = "_plus_minus_dom.html"; + public static final String PLUS_MINUS_DC_SUFFIX_HTML = "_plus_minus_dc.html"; + public static final int PLUS_MINUS_ANALYSIS_MIN_DIFF_DEFAULT = 0; + public static final double PLUS_MINUS_ANALYSIS_FACTOR_DEFAULT = 1.0; + public static final String PLUS_MINUS_ALL_GO_IDS_DOM_SUFFIX = "_plus_minus_go_ids_all.txt"; + public static final String PLUS_MINUS_PASSING_GO_IDS_DOM_SUFFIX = "_plus_minus_go_ids_passing.txt"; private static final String OUTPUT_LIST_OF_ALL_PROTEINS_OPTIONS = "all_prot"; final static private String OUTPUT_LIST_OF_ALL_PROTEINS_PER_DOMAIN_E_VALUE_OPTION = "all_prot_e"; - public static final boolean VERBOSE = false; + public static final boolean VERBOSE = false; private static final String OUTPUT_DOMAIN_COMBINATIONS_GAINED_MORE_THAN_ONCE_ANALYSIS_SUFFIX = "_fitch_dc_gains_counts"; private static final String OUTPUT_DOMAIN_COMBINATIONS_LOST_MORE_THAN_ONCE_ANALYSIS_SUFFIX = "_fitch_dc_losses_counts"; private static final String DOMAIN_LENGTHS_ANALYSIS_SUFFIX = "_domain_lengths_analysis"; @@ -407,17 +407,10 @@ public class surfacing { if ( cla.isOptionSet( surfacing.IGNORE_DOMAINS_SPECIFIC_TO_ONE_SPECIES_OPTION ) ) { ignore_species_specific_domains = true; } - - - if ( !cla.isOptionValueSet( surfacing.INPUT_SPECIES_TREE_OPTION ) ) { ForesterUtil.fatalError( surfacing.PRG_NAME, "no input species tree file given: " + surfacing.INPUT_SPECIES_TREE_OPTION + "=" ); } - - - - File output_file = null; if ( cla.isOptionSet( surfacing.OUTPUT_FILE_OPTION ) ) { if ( !cla.isOptionValueSet( surfacing.OUTPUT_FILE_OPTION ) ) { @@ -530,10 +523,10 @@ public class surfacing { final List plus_minus_analysis_high_low_copy_species = new ArrayList(); final List plus_minus_analysis_numbers = new ArrayList(); SurfacingUtil.processPlusMinusAnalysisOption( cla, - plus_minus_analysis_high_copy_base_species, - plus_minus_analysis_high_copy_target_species, - plus_minus_analysis_high_low_copy_species, - plus_minus_analysis_numbers ); + plus_minus_analysis_high_copy_base_species, + plus_minus_analysis_high_copy_target_species, + plus_minus_analysis_high_low_copy_species, + plus_minus_analysis_numbers ); File input_genomes_file = null; if ( cla.isOptionSet( surfacing.INPUT_GENOMES_FILE_OPTION ) ) { if ( !cla.isOptionValueSet( surfacing.INPUT_GENOMES_FILE_OPTION ) ) { @@ -551,9 +544,6 @@ public class surfacing { ForesterUtil.fatalError( surfacing.PRG_NAME, "no input genomes file given: " + surfacing.INPUT_GENOMES_FILE_OPTION + "=" ); } - - - DomainSimilarity.DomainSimilarityScoring scoring = SCORING_DEFAULT; if ( cla.isOptionSet( surfacing.SCORING_OPTION ) ) { if ( !cla.isOptionValueSet( surfacing.SCORING_OPTION ) ) { @@ -779,9 +769,9 @@ public class surfacing { + "= to turn on pairwise analyses with less than three input files" ); } SurfacingUtil.checkWriteabilityForPairwiseComparisons( domain_similarity_print_option, - input_file_properties, - automated_pairwise_comparison_suffix, - out_dir ); + input_file_properties, + automated_pairwise_comparison_suffix, + out_dir ); for( int i = 0; i < number_of_genomes; i++ ) { File dcc_outfile = new File( input_file_properties[ i ][ 1 ] + surfacing.DOMAIN_COMBINITON_COUNTS_OUTPUTFILE_SUFFIX ); @@ -916,9 +906,8 @@ public class surfacing { intree_files[ 0 ] = new File( intrees_str ); } intrees = SurfacingUtil.obtainAndPreProcessIntrees( intree_files, number_of_genomes, input_file_properties ); - } - final Phylogeny intree_0_orig = SurfacingUtil.obtainFirstIntree( intree_files[ 0 ]); + final Phylogeny intree_0_orig = SurfacingUtil.obtainFirstIntree( intree_files[ 0 ] ); long random_number_seed_for_fitch_parsimony = 0l; boolean radomize_fitch_parsimony = false; if ( cla.isOptionSet( surfacing.RANDOM_SEED_FOR_FITCH_PARSIMONY_OPTION ) ) { @@ -1450,8 +1439,8 @@ public class surfacing { SurfacingUtil.log( ( i + 1 ) + "/" + number_of_genomes, log_writer ); System.out.println( "Processing : " + input_file_properties[ i ][ 1 ] + " [" + input_file_properties[ i ][ 0 ] + "]" ); - SurfacingUtil.log( "Genome : " + input_file_properties[ i ][ 1 ] + " [" - + input_file_properties[ i ][ 0 ] + "]", log_writer ); + SurfacingUtil.log( "Genome : " + input_file_properties[ i ][ 1 ] + + " [" + input_file_properties[ i ][ 0 ] + "]", log_writer ); HmmscanPerDomainTableParser parser = null; INDIVIDUAL_SCORE_CUTOFF ind_score_cutoff = INDIVIDUAL_SCORE_CUTOFF.NONE; if ( individual_score_cutoffs != null ) { @@ -1522,57 +1511,70 @@ public class surfacing { distinct_domain_architecuture_counts ); } System.out.println( "Number of proteins encountered : " + parser.getProteinsEncountered() ); - SurfacingUtil.log( "Number of proteins encountered : " + parser.getProteinsEncountered(), log_writer ); + SurfacingUtil.log( "Number of proteins encountered : " + parser.getProteinsEncountered(), + log_writer ); System.out.println( "Number of proteins stored : " + protein_list.size() ); SurfacingUtil.log( "Number of proteins stored : " + protein_list.size(), log_writer ); System.out.println( "Coverage : " + ForesterUtil.roundToInt( 100.0 * coverage ) + "%" ); - SurfacingUtil.log( "Coverage : " + ForesterUtil.roundToInt( 100.0 * coverage ) - + "%", log_writer ); + SurfacingUtil.log( "Coverage : " + + ForesterUtil.roundToInt( 100.0 * coverage ) + "%", + log_writer ); System.out.println( "Domains encountered : " + parser.getDomainsEncountered() ); - SurfacingUtil.log( "Domains encountered : " + parser.getDomainsEncountered(), log_writer ); + SurfacingUtil.log( "Domains encountered : " + parser.getDomainsEncountered(), + log_writer ); System.out.println( "Domains stored : " + parser.getDomainsStored() ); - SurfacingUtil.log( "Domains stored : " + parser.getDomainsStored(), log_writer ); + SurfacingUtil.log( "Domains stored : " + parser.getDomainsStored(), + log_writer ); System.out.println( "Distinct domains stored : " + parser.getDomainsStoredSet().size() ); - SurfacingUtil.log( "Distinct domains stored : " + parser.getDomainsStoredSet().size(), log_writer ); + SurfacingUtil.log( "Distinct domains stored : " + + parser.getDomainsStoredSet().size(), log_writer ); System.out.println( "Domains ignored due to individual score cutoffs: " + parser.getDomainsIgnoredDueToIndividualScoreCutoff() ); SurfacingUtil.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() ); - SurfacingUtil.log( "Domains ignored due to E-value : " + parser.getDomainsIgnoredDueToEval(), log_writer ); + SurfacingUtil.log( "Domains ignored due to E-value : " + + parser.getDomainsIgnoredDueToEval(), + log_writer ); System.out.println( "Domains ignored due to DUF designation : " + parser.getDomainsIgnoredDueToDuf() ); - SurfacingUtil.log( "Domains ignored due to DUF designation : " + parser.getDomainsIgnoredDueToDuf(), log_writer ); + SurfacingUtil + .log( "Domains ignored due to DUF designation : " + parser.getDomainsIgnoredDueToDuf(), + log_writer ); if ( ignore_virus_like_ids ) { System.out.println( "Domains ignored due virus like ids : " + parser.getDomainsIgnoredDueToVirusLikeIds() ); - SurfacingUtil.log( "Domains ignored due virus like ids : " + parser.getDomainsIgnoredDueToVirusLikeIds(), - log_writer ); + SurfacingUtil.log( "Domains ignored due virus like ids : " + + parser.getDomainsIgnoredDueToVirusLikeIds(), + log_writer ); } System.out.println( "Domains ignored due negative domain filter : " + parser.getDomainsIgnoredDueToNegativeDomainFilter() ); SurfacingUtil.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() ); - SurfacingUtil.log( "Domains ignored due to overlap : " + parser.getDomainsIgnoredDueToOverlap(), - log_writer ); + SurfacingUtil.log( "Domains ignored due to overlap : " + + parser.getDomainsIgnoredDueToOverlap(), + log_writer ); if ( negative_filter_file != null ) { System.out.println( "Proteins ignored due to negative filter : " + parser.getProteinsIgnoredDueToFilter() ); - SurfacingUtil.log( "Proteins ignored due to negative filter : " + parser.getProteinsIgnoredDueToFilter(), - log_writer ); + SurfacingUtil.log( "Proteins ignored due to negative filter : " + + parser.getProteinsIgnoredDueToFilter(), + log_writer ); } if ( positive_filter_file != null ) { System.out.println( "Proteins ignored due to positive filter : " + parser.getProteinsIgnoredDueToFilter() ); - SurfacingUtil.log( "Proteins ignored due to positive filter : " + parser.getProteinsIgnoredDueToFilter(), - log_writer ); + SurfacingUtil.log( "Proteins ignored due to positive filter : " + + parser.getProteinsIgnoredDueToFilter(), + log_writer ); } if ( da_analysis ) { System.out.println( "Distinct domain architectures stored : " + distinct_das ); @@ -1708,10 +1710,14 @@ public class surfacing { ForesterUtil.programMessage( PRG_NAME, "Range of proteins with a least one domain assigned: " + ( 100 * protein_coverage_stats.getMin() ) + "%-" + ( 100 * protein_coverage_stats.getMax() ) + "%" ); - SurfacingUtil.log( "Average of prot with a least one dom assigned : " + ( 100 * protein_coverage_stats.arithmeticMean() ) - + "% (+/-" + ( 100 * protein_coverage_stats.sampleStandardDeviation() ) + "%)", log_writer ); - SurfacingUtil.log( "Range of prot with a least one dom assigned : " + ( 100 * protein_coverage_stats.getMin() ) + "%-" - + ( 100 * protein_coverage_stats.getMax() ) + "%", log_writer ); + SurfacingUtil.log( "Average of prot with a least one dom assigned : " + + ( 100 * protein_coverage_stats.arithmeticMean() ) + "% (+/-" + + ( 100 * protein_coverage_stats.sampleStandardDeviation() ) + "%)", + log_writer ); + SurfacingUtil.log( "Range of prot with a least one dom assigned : " + + ( 100 * protein_coverage_stats.getMin() ) + "%-" + + ( 100 * protein_coverage_stats.getMax() ) + "%", + log_writer ); } catch ( final IOException e2 ) { ForesterUtil.fatalError( surfacing.PRG_NAME, e2.getLocalizedMessage() ); @@ -1903,11 +1909,11 @@ public class surfacing { } if ( ( ( intrees != null ) && ( intrees.length > 0 ) ) && ( number_of_genomes > 2 ) ) { final StringBuilder parameters_sb = SurfacingUtil.createParametersAsString( ignore_dufs, - e_value_max, - max_allowed_overlap, - no_engulfing_overlaps, - cutoff_scores_file, - dc_type ); + e_value_max, + max_allowed_overlap, + no_engulfing_overlaps, + cutoff_scores_file, + dc_type ); String s = "_"; if ( radomize_fitch_parsimony ) { s += random_number_seed_for_fitch_parsimony + "_"; @@ -1982,30 +1988,31 @@ public class surfacing { } if ( plus_minus_analysis_high_copy_base_species.size() > 0 ) { SurfacingUtil.executePlusMinusAnalysis( output_file, - plus_minus_analysis_high_copy_base_species, - plus_minus_analysis_high_copy_target_species, - plus_minus_analysis_high_low_copy_species, - gwcd_list, - protein_lists_per_species, - domain_id_to_go_ids_map, - go_id_to_term_map, - plus_minus_analysis_numbers ); + plus_minus_analysis_high_copy_base_species, + plus_minus_analysis_high_copy_target_species, + plus_minus_analysis_high_low_copy_species, + gwcd_list, + protein_lists_per_species, + domain_id_to_go_ids_map, + go_id_to_term_map, + plus_minus_analysis_numbers ); } if ( output_protein_lists_for_all_domains ) { SurfacingUtil.writeProteinListsForAllSpecies( out_dir, - protein_lists_per_species, - gwcd_list, - output_list_of_all_proteins_per_domain_e_value_max ); + protein_lists_per_species, + gwcd_list, + output_list_of_all_proteins_per_domain_e_value_max ); } gwcd_list = null; if ( all_bin_domain_combinations_gained_fitch != null ) { try { - SurfacingUtil.executeFitchGainsAnalysis( new File( output_file - + surfacing.OUTPUT_DOMAIN_COMBINATIONS_GAINED_MORE_THAN_ONCE_ANALYSIS_SUFFIX ), - all_bin_domain_combinations_gained_fitch, - all_domains_encountered.size(), - all_bin_domain_combinations_encountered, - true ); + SurfacingUtil + .executeFitchGainsAnalysis( new File( output_file + + surfacing.OUTPUT_DOMAIN_COMBINATIONS_GAINED_MORE_THAN_ONCE_ANALYSIS_SUFFIX ), + all_bin_domain_combinations_gained_fitch, + all_domains_encountered.size(), + all_bin_domain_combinations_encountered, + true ); } catch ( final IOException e ) { ForesterUtil.fatalError( PRG_NAME, e.getLocalizedMessage() ); @@ -2013,12 +2020,13 @@ public class surfacing { } if ( all_bin_domain_combinations_lost_fitch != null ) { try { - SurfacingUtil.executeFitchGainsAnalysis( new File( output_file - + surfacing.OUTPUT_DOMAIN_COMBINATIONS_LOST_MORE_THAN_ONCE_ANALYSIS_SUFFIX ), - all_bin_domain_combinations_lost_fitch, - all_domains_encountered.size(), - all_bin_domain_combinations_encountered, - false ); + SurfacingUtil + .executeFitchGainsAnalysis( new File( output_file + + surfacing.OUTPUT_DOMAIN_COMBINATIONS_LOST_MORE_THAN_ONCE_ANALYSIS_SUFFIX ), + all_bin_domain_combinations_lost_fitch, + all_domains_encountered.size(), + all_bin_domain_combinations_encountered, + false ); } catch ( final IOException e ) { ForesterUtil.fatalError( PRG_NAME, e.getLocalizedMessage() ); diff --git a/forester/java/src/org/forester/phylogeny/Phylogeny.java b/forester/java/src/org/forester/phylogeny/Phylogeny.java index eda37d3..3eac2bd 100644 --- a/forester/java/src/org/forester/phylogeny/Phylogeny.java +++ b/forester/java/src/org/forester/phylogeny/Phylogeny.java @@ -309,14 +309,9 @@ public class Phylogeny { public final static Phylogeny createInstanceFromNhxString( final String nhx ) throws IOException { final PhylogenyFactory factory = ParserBasedPhylogenyFactory.getInstance(); - return factory.create( nhx, new NHXParser() )[ 0 ]; - - - } - - + /** * * Warning. The order of the returned nodes is random diff --git a/forester/java/src/org/forester/surfacing/PairwiseGenomeComparator.java b/forester/java/src/org/forester/surfacing/PairwiseGenomeComparator.java index 4699869..07ece5b 100644 --- a/forester/java/src/org/forester/surfacing/PairwiseGenomeComparator.java +++ b/forester/java/src/org/forester/surfacing/PairwiseGenomeComparator.java @@ -100,7 +100,7 @@ public class PairwiseGenomeComparator { final boolean write_pairwise_comparisons, final Map tax_code_to_id_map, final boolean calc_similarity_scores, - Phylogeny phy ) { + final Phylogeny phy ) { init(); final BasicSymmetricalDistanceMatrix domain_distance_scores_means = new BasicSymmetricalDistanceMatrix( number_of_genomes ); final BasicSymmetricalDistanceMatrix shared_domains_based_distances = new BasicSymmetricalDistanceMatrix( number_of_genomes ); diff --git a/forester/java/src/org/forester/surfacing/PrintableDomainSimilarity.java b/forester/java/src/org/forester/surfacing/PrintableDomainSimilarity.java index 9abbe22..c8c30d6 100644 --- a/forester/java/src/org/forester/surfacing/PrintableDomainSimilarity.java +++ b/forester/java/src/org/forester/surfacing/PrintableDomainSimilarity.java @@ -189,7 +189,7 @@ public class PrintableDomainSimilarity implements DomainSimilarity { final Map tax_code_to_id_map, final Phylogeny phy ) { String hex = null; - if ( phy != null && !phy.isEmpty() ) { + if ( ( phy != null ) && !phy.isEmpty() ) { hex = obtainHexColorStringDependingOnTaxonomyGroup( tax_code, phy ); } sb.append( "" ); @@ -212,10 +212,10 @@ public class PrintableDomainSimilarity implements DomainSimilarity { } private String obtainHexColorStringDependingOnTaxonomyGroup( final String tax_code, final Phylogeny phy ) { - if ( phy != null && !_TAXCODE_HEXCOLORSTRING_MAP.containsKey( tax_code ) ) { - List nodes = phy.getNodesViaTaxonomyCode( tax_code ); + if ( ( phy != null ) && !_TAXCODE_HEXCOLORSTRING_MAP.containsKey( tax_code ) ) { + final List nodes = phy.getNodesViaTaxonomyCode( tax_code ); Color c = null; - if ( nodes == null || nodes.isEmpty() ) { + if ( ( nodes == null ) || nodes.isEmpty() ) { throw new RuntimeException( tax_code + " is not found" ); } if ( nodes.size() != 1 ) { @@ -228,7 +228,7 @@ public class PrintableDomainSimilarity implements DomainSimilarity { c = ForesterUtil.obtainColorDependingOnTaxonomyGroup( n.getNodeData().getTaxonomy() .getScientificName() ); } - if ( c == null && !ForesterUtil.isEmpty( n.getName() ) ) { + if ( ( c == null ) && !ForesterUtil.isEmpty( n.getName() ) ) { c = ForesterUtil.obtainColorDependingOnTaxonomyGroup( n.getName() ); } if ( c != null ) { @@ -419,7 +419,7 @@ public class PrintableDomainSimilarity implements DomainSimilarity { @Override public StringBuffer toStringBuffer( final PrintableDomainSimilarity.PRINT_OPTION print_option, final Map tax_code_to_id_map, - Phylogeny phy ) { + final Phylogeny phy ) { switch ( print_option ) { case SIMPLE_TAB_DELIMITED: return toStringBufferSimpleTabDelimited(); @@ -430,7 +430,7 @@ public class PrintableDomainSimilarity implements DomainSimilarity { } } - private StringBuffer toStringBufferDetailedHTML( final Map tax_code_to_id_map, Phylogeny phy ) { + private StringBuffer toStringBufferDetailedHTML( final Map tax_code_to_id_map, final Phylogeny phy ) { final StringBuffer sb = new StringBuffer(); sb.append( "" ); sb.append( "" ); diff --git a/forester/java/src/org/forester/surfacing/PrintableSpeciesSpecificDcData.java b/forester/java/src/org/forester/surfacing/PrintableSpeciesSpecificDcData.java index 55db1bd..92de951 100644 --- a/forester/java/src/org/forester/surfacing/PrintableSpeciesSpecificDcData.java +++ b/forester/java/src/org/forester/surfacing/PrintableSpeciesSpecificDcData.java @@ -121,9 +121,7 @@ class PrintableSpeciesSpecificDcData implements SpeciesSpecificDcData { } if ( html ) { final Set ids = getCombinableDomainIdToCountsMap().keySet(); - for( final String domain_id : ids ) { - sb.append( " " ); if ( html ) { sb.append( "" + domain_id diff --git a/forester/java/src/org/forester/surfacing/SurfacingUtil.java b/forester/java/src/org/forester/surfacing/SurfacingUtil.java index 599fd73..1618c4f 100644 --- a/forester/java/src/org/forester/surfacing/SurfacingUtil.java +++ b/forester/java/src/org/forester/surfacing/SurfacingUtil.java @@ -2912,7 +2912,7 @@ public final class SurfacingUtil { final DomainSimilarity.DomainSimilarityScoring scoring, final boolean verbose, final Map tax_code_to_id_map, - Phylogeny phy ) throws IOException { + final Phylogeny phy ) throws IOException { if ( ( single_writer != null ) && ( ( split_writers == null ) || split_writers.isEmpty() ) ) { split_writers = new HashMap(); split_writers.put( '_', single_writer ); diff --git a/forester/java/src/org/forester/test/Test.java b/forester/java/src/org/forester/test/Test.java index 68777de..66bff3d 100644 --- a/forester/java/src/org/forester/test/Test.java +++ b/forester/java/src/org/forester/test/Test.java @@ -759,9 +759,6 @@ public final class Test { System.out.println( "failed." ); failed++; } - - - System.out.print( "Tree copy: " ); if ( Test.testTreeCopy() ) { System.out.println( "OK." ); @@ -771,12 +768,6 @@ public final class Test { System.out.println( "failed." ); failed++; } - - - - - - System.out.print( "Basic tree methods: " ); if ( Test.testBasicTreeMethods() ) { System.out.println( "OK." ); @@ -2782,35 +2773,32 @@ public final class Test { } return true; } - - + private static boolean testTreeCopy() { try { final String str_0 = "((((a,b),c),d)[&&NHX:S=lizards],e[&&NHX:S=reptiles])"; final Phylogeny t0 = Phylogeny.createInstanceFromNhxString( str_0 ); final Phylogeny t1 = t0.copy(); - if ( !t1.toNewHampshireX().equals( t0.toNewHampshireX() ) ) { + if ( !t1.toNewHampshireX().equals( t0.toNewHampshireX() ) ) { return false; } - if ( !t1.toNewHampshireX().equals( str_0 )) { + if ( !t1.toNewHampshireX().equals( str_0 ) ) { return false; } t0.deleteSubtree( t0.getNode( "c" ), true ); t0.deleteSubtree( t0.getNode( "a" ), true ); t0.deleteSubtree( t0.getNode( "e" ), true ); - if ( !t0.toNewHampshireX().equals( "(b,d)[&&NHX:S=lizards]" )) { + if ( !t0.toNewHampshireX().equals( "(b,d)[&&NHX:S=lizards]" ) ) { return false; } - - if ( !t1.toNewHampshireX().equals( str_0 )) { + if ( !t1.toNewHampshireX().equals( str_0 ) ) { return false; } t0.deleteSubtree( t0.getNode( "b" ), true ); t0.deleteSubtree( t0.getNode( "d" ), true ); - if ( !t1.toNewHampshireX().equals( str_0 )) { + if ( !t1.toNewHampshireX().equals( str_0 ) ) { return false; } - } catch ( final Exception e ) { e.printStackTrace(); @@ -2818,7 +2806,6 @@ public final class Test { } return true; } - private static boolean testCreateBalancedPhylogeny() { try { diff --git a/forester/java/src/org/forester/ws/hmmer/Test.java b/forester/java/src/org/forester/ws/hmmer/Test.java index f040d2b..7d53e61 100644 --- a/forester/java/src/org/forester/ws/hmmer/Test.java +++ b/forester/java/src/org/forester/ws/hmmer/Test.java @@ -8,7 +8,6 @@ import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; - public class Test { public static void main( final String[] args ) {