X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fsurfacing%2FTestSurfacing.java;h=168b6a47a89fd461bf25dc5fc0fc0b09fe2f4d27;hb=0898ccf757a9e1b3c10f0a8ad51829eb809d3062;hp=3efaccb15a8d99499c41c1daafe1886d88ba4dce;hpb=663daba455e534e015bd56bae070e9248e3a4533;p=jalview.git diff --git a/forester/java/src/org/forester/surfacing/TestSurfacing.java b/forester/java/src/org/forester/surfacing/TestSurfacing.java index 3efaccb..168b6a4 100644 --- a/forester/java/src/org/forester/surfacing/TestSurfacing.java +++ b/forester/java/src/org/forester/surfacing/TestSurfacing.java @@ -53,7 +53,6 @@ import org.forester.protein.BasicProtein; import org.forester.protein.BinaryDomainCombination; import org.forester.protein.BinaryDomainCombination.DomainCombinationType; import org.forester.protein.Domain; -import org.forester.protein.DomainId; import org.forester.protein.Protein; import org.forester.protein.ProteinId; import org.forester.species.BasicSpecies; @@ -148,18 +147,6 @@ public class TestSurfacing { return false; } System.out.println( "OK." ); - System.out.print( " Overlap removal: " ); - if ( !TestSurfacing.testOverlapRemoval() ) { - System.out.println( "failed." ); - return false; - } - System.out.println( "OK." ); - System.out.print( " Engulfing overlap removal: " ); - if ( !TestSurfacing.testEngulfingOverlapRemoval() ) { - System.out.println( "failed." ); - return false; - } - System.out.println( "OK." ); System.out.print( " Binary domain combination: " ); if ( !TestSurfacing.testBinaryDomainCombination() ) { System.out.println( "failed." ); @@ -328,7 +315,8 @@ public class TestSurfacing { new BasicSpecies( "nemve" ) ) ); final DomainSimilarityCalculator calc = new BasicDomainSimilarityCalculator( DomainSimilarity.DomainSimilaritySortField.DOMAIN_ID, false, - false ); + false, + true ); final SortedSet sims = calc .calculateSimilarities( new CombinationsBasedPairwiseDomainSimilarityCalculator(), cdc_list, @@ -336,7 +324,7 @@ public class TestSurfacing { true ); final Iterator sims_it = sims.iterator(); final DomainSimilarity sa = sims_it.next(); - if ( !sa.getDomainId().getId().equals( "A" ) ) { + if ( !sa.getDomainId().equals( "A" ) ) { return false; } if ( sa.getSpeciesData().size() != 4 ) { @@ -377,7 +365,7 @@ public class TestSurfacing { return false; } final DomainSimilarity sb = sims_it.next(); - if ( !sb.getDomainId().getId().equals( "B" ) ) { + if ( !sb.getDomainId().equals( "B" ) ) { return false; } if ( sb.getSpeciesData().size() != 2 ) { @@ -411,7 +399,7 @@ public class TestSurfacing { return false; } final DomainSimilarity sc = sims_it.next(); - if ( !sc.getDomainId().getId().equals( "C" ) ) { + if ( !sc.getDomainId().equals( "C" ) ) { return false; } if ( sc.getSpeciesData().size() != 3 ) { @@ -478,7 +466,8 @@ public class TestSurfacing { new BasicSpecies( "nemve" ) ) ); final DomainSimilarityCalculator calc2 = new BasicDomainSimilarityCalculator( DomainSimilarity.DomainSimilaritySortField.DOMAIN_ID, false, - false ); + false, + true ); final SortedSet sims2 = calc2 .calculateSimilarities( new CombinationsBasedPairwiseDomainSimilarityCalculator(), cdc_list2, @@ -486,7 +475,7 @@ public class TestSurfacing { true ); final Iterator sims_it2 = sims2.iterator(); final DomainSimilarity sa2 = sims_it2.next(); - if ( !sa2.getDomainId().getId().equals( "A" ) ) { + if ( !sa2.getDomainId().equals( "A" ) ) { return false; } if ( sa2.getSpeciesData().size() != 4 ) { @@ -565,7 +554,8 @@ public class TestSurfacing { new BasicSpecies( "nemve" ) ) ); final DomainSimilarityCalculator calc3 = new BasicDomainSimilarityCalculator( DomainSimilarity.DomainSimilaritySortField.DOMAIN_ID, false, - false ); + false, + true ); final SortedSet sims3 = calc3 .calculateSimilarities( new CombinationsBasedPairwiseDomainSimilarityCalculator(), cdc_list3, @@ -573,23 +563,23 @@ public class TestSurfacing { true ); final Iterator sims_it3 = sims3.iterator(); final DomainSimilarity sa3 = sims_it3.next(); - if ( !sa3.getDomainId().getId().equals( "A" ) ) { + if ( !sa3.getDomainId().equals( "A" ) ) { return false; } - final SpeciesSpecificDomainSimilariyData ssdsd = sa3.getSpeciesData().get( new BasicSpecies( "ciona" ) ); + final SpeciesSpecificDcData ssdsd = sa3.getSpeciesData().get( new BasicSpecies( "ciona" ) ); if ( ssdsd.getCombinableDomainIdToCountsMap().size() != 4 ) { return false; } - if ( ssdsd.getNumberOfProteinsExhibitingCombinationWith( new DomainId( "B" ) ) != 2 ) { + if ( ssdsd.getNumberOfProteinsExhibitingCombinationWith( "B" ) != 2 ) { return false; } - if ( ssdsd.getNumberOfProteinsExhibitingCombinationWith( new DomainId( "F" ) ) != 2 ) { + if ( ssdsd.getNumberOfProteinsExhibitingCombinationWith( "F" ) != 2 ) { return false; } - if ( ssdsd.getNumberOfProteinsExhibitingCombinationWith( new DomainId( "G" ) ) != 2 ) { + if ( ssdsd.getNumberOfProteinsExhibitingCombinationWith( "G" ) != 2 ) { return false; } - if ( ssdsd.getNumberOfProteinsExhibitingCombinationWith( new DomainId( "X" ) ) != 3 ) { + if ( ssdsd.getNumberOfProteinsExhibitingCombinationWith( "X" ) != 3 ) { return false; } final List cdc_list4 = new ArrayList(); @@ -608,7 +598,8 @@ public class TestSurfacing { new BasicSpecies( "nemve" ) ) ); final DomainSimilarityCalculator calc4 = new BasicDomainSimilarityCalculator( DomainSimilarity.DomainSimilaritySortField.DOMAIN_ID, true, - false ); + false, + true ); final SortedSet sims4 = calc4 .calculateSimilarities( new CombinationsBasedPairwiseDomainSimilarityCalculator(), cdc_list4, @@ -616,33 +607,33 @@ public class TestSurfacing { true ); final Iterator sims_it4 = sims4.iterator(); final DomainSimilarity sa4 = sims_it4.next(); - if ( !sa4.getDomainId().getId().equals( "A" ) ) { + if ( !sa4.getDomainId().equals( "A" ) ) { return false; } - final SpeciesSpecificDomainSimilariyData ssdsd4 = sa4.getSpeciesData().get( new BasicSpecies( "ciona" ) ); + final SpeciesSpecificDcData ssdsd4 = sa4.getSpeciesData().get( new BasicSpecies( "ciona" ) ); if ( ssdsd4.getCombinableDomainIdToCountsMap().size() != 5 ) { return false; } - if ( ssdsd4.getNumberOfProteinsExhibitingCombinationWith( new DomainId( "A" ) ) != 3 ) { + if ( ssdsd4.getNumberOfProteinsExhibitingCombinationWith( "A" ) != 3 ) { return false; } - if ( ssdsd4.getNumberOfProteinsExhibitingCombinationWith( new DomainId( "B" ) ) != 2 ) { + if ( ssdsd4.getNumberOfProteinsExhibitingCombinationWith( "B" ) != 2 ) { return false; } - if ( ssdsd4.getNumberOfProteinsExhibitingCombinationWith( new DomainId( "F" ) ) != 2 ) { + if ( ssdsd4.getNumberOfProteinsExhibitingCombinationWith( "F" ) != 2 ) { return false; } - if ( ssdsd4.getNumberOfProteinsExhibitingCombinationWith( new DomainId( "G" ) ) != 2 ) { + if ( ssdsd4.getNumberOfProteinsExhibitingCombinationWith( "G" ) != 2 ) { return false; } - if ( ssdsd4.getNumberOfProteinsExhibitingCombinationWith( new DomainId( "X" ) ) != 3 ) { + if ( ssdsd4.getNumberOfProteinsExhibitingCombinationWith( "X" ) != 3 ) { return false; } final SortedSet sims4_d = calc4 .calculateSimilarities( new DomainCountsBasedPairwiseSimilarityCalculator(), cdc_list4, false, true ); final Iterator sims_it4_d = sims4_d.iterator(); final DomainSimilarity sa4_d = sims_it4_d.next(); - if ( !sa4_d.getDomainId().getId().equals( "A" ) ) { + if ( !sa4_d.getDomainId().equals( "A" ) ) { return false; } if ( sa4_d.getCombinableDomainIds( new BasicSpecies( "ciona" ) ).size() != 5 ) { @@ -669,25 +660,25 @@ public class TestSurfacing { true ); final Iterator sims_it4_p = sims4_p.iterator(); final DomainSimilarity sa4_p = sims_it4_p.next(); - if ( !sa4_p.getDomainId().getId().equals( "A" ) ) { + if ( !sa4_p.getDomainId().equals( "A" ) ) { return false; } if ( sa4_p.getCombinableDomainIds( new BasicSpecies( "ciona" ) ).size() != 5 ) { return false; } - if ( !sa4_p.getCombinableDomainIds( new BasicSpecies( "ciona" ) ).contains( new DomainId( "A" ) ) ) { + if ( !sa4_p.getCombinableDomainIds( new BasicSpecies( "ciona" ) ).contains( "A" ) ) { return false; } - if ( !sa4_p.getCombinableDomainIds( new BasicSpecies( "ciona" ) ).contains( new DomainId( "B" ) ) ) { + if ( !sa4_p.getCombinableDomainIds( new BasicSpecies( "ciona" ) ).contains( "B" ) ) { return false; } - if ( !sa4_p.getCombinableDomainIds( new BasicSpecies( "ciona" ) ).contains( new DomainId( "F" ) ) ) { + if ( !sa4_p.getCombinableDomainIds( new BasicSpecies( "ciona" ) ).contains( "F" ) ) { return false; } - if ( !sa4_p.getCombinableDomainIds( new BasicSpecies( "ciona" ) ).contains( new DomainId( "G" ) ) ) { + if ( !sa4_p.getCombinableDomainIds( new BasicSpecies( "ciona" ) ).contains( "G" ) ) { return false; } - if ( !sa4_p.getCombinableDomainIds( new BasicSpecies( "ciona" ) ).contains( new DomainId( "X" ) ) ) { + if ( !sa4_p.getCombinableDomainIds( new BasicSpecies( "ciona" ) ).contains( "X" ) ) { return false; } if ( !TestSurfacing @@ -727,42 +718,42 @@ public class TestSurfacing { if ( !sa5_d.getSpecies().last().equals( new BasicSpecies( "rabbit" ) ) ) { return false; } - final SpeciesSpecificDomainSimilariyData ssdsd5 = sa5_d.getSpeciesData().get( new BasicSpecies( "ciona" ) ); + final SpeciesSpecificDcData ssdsd5 = sa5_d.getSpeciesData().get( new BasicSpecies( "ciona" ) ); if ( ssdsd5.getCombinableDomainIdToCountsMap().size() != 4 ) { return false; } - if ( ssdsd5.getNumberOfProteinsExhibitingCombinationWith( new DomainId( "B" ) ) != 2 ) { + if ( ssdsd5.getNumberOfProteinsExhibitingCombinationWith( "B" ) != 2 ) { return false; } - if ( ssdsd5.getNumberOfProteinsExhibitingCombinationWith( new DomainId( "F" ) ) != 2 ) { + if ( ssdsd5.getNumberOfProteinsExhibitingCombinationWith( "F" ) != 2 ) { return false; } - if ( ssdsd5.getNumberOfProteinsExhibitingCombinationWith( new DomainId( "G" ) ) != 2 ) { + if ( ssdsd5.getNumberOfProteinsExhibitingCombinationWith( "G" ) != 2 ) { return false; } - if ( ssdsd5.getNumberOfProteinsExhibitingCombinationWith( new DomainId( "X" ) ) != 3 ) { + if ( ssdsd5.getNumberOfProteinsExhibitingCombinationWith( "X" ) != 3 ) { return false; } - if ( !sa5_d.getDomainId().getId().equals( "A" ) ) { + if ( !sa5_d.getDomainId().equals( "A" ) ) { return false; } final Species ciona = new BasicSpecies( "ciona" ); if ( sa5_d.getCombinableDomainIds( ciona ).size() != 4 ) { return false; } - if ( sa5_d.getCombinableDomainIds( ciona ).contains( new DomainId( "A" ) ) ) { + if ( sa5_d.getCombinableDomainIds( ciona ).contains( "A" ) ) { return false; } - if ( !sa5_d.getCombinableDomainIds( ciona ).contains( new DomainId( "B" ) ) ) { + if ( !sa5_d.getCombinableDomainIds( ciona ).contains( "B" ) ) { return false; } - if ( !sa5_d.getCombinableDomainIds( ciona ).contains( new DomainId( "F" ) ) ) { + if ( !sa5_d.getCombinableDomainIds( ciona ).contains( "F" ) ) { return false; } - if ( !sa5_d.getCombinableDomainIds( ciona ).contains( new DomainId( "G" ) ) ) { + if ( !sa5_d.getCombinableDomainIds( ciona ).contains( "G" ) ) { return false; } - if ( !sa5_d.getCombinableDomainIds( ciona ).contains( new DomainId( "X" ) ) ) { + if ( !sa5_d.getCombinableDomainIds( ciona ).contains( "X" ) ) { return false; } if ( !TestSurfacing @@ -795,25 +786,25 @@ public class TestSurfacing { true ); final Iterator sims_it5_p = sims5_p.iterator(); final DomainSimilarity sa5_p = sims_it5_p.next(); - if ( !sa5_p.getDomainId().getId().equals( "A" ) ) { + if ( !sa5_p.getDomainId().equals( "A" ) ) { return false; } if ( sa5_p.getCombinableDomainIds( ciona ).size() != 4 ) { return false; } - if ( sa5_p.getCombinableDomainIds( ciona ).contains( new DomainId( "A" ) ) ) { + if ( sa5_p.getCombinableDomainIds( ciona ).contains( "A" ) ) { return false; } - if ( !sa5_p.getCombinableDomainIds( ciona ).contains( new DomainId( "B" ) ) ) { + if ( !sa5_p.getCombinableDomainIds( ciona ).contains( "B" ) ) { return false; } - if ( !sa5_p.getCombinableDomainIds( ciona ).contains( new DomainId( "F" ) ) ) { + if ( !sa5_p.getCombinableDomainIds( ciona ).contains( "F" ) ) { return false; } - if ( !sa5_p.getCombinableDomainIds( ciona ).contains( new DomainId( "G" ) ) ) { + if ( !sa5_p.getCombinableDomainIds( ciona ).contains( "G" ) ) { return false; } - if ( !sa5_p.getCombinableDomainIds( ciona ).contains( new DomainId( "X" ) ) ) { + if ( !sa5_p.getCombinableDomainIds( ciona ).contains( "X" ) ) { return false; } if ( !TestSurfacing @@ -862,42 +853,42 @@ public class TestSurfacing { if ( !sa6_d.getSpecies().last().equals( new BasicSpecies( "rabbit" ) ) ) { return false; } - final SpeciesSpecificDomainSimilariyData ssdsd6 = sa6_d.getSpeciesData().get( new BasicSpecies( "ciona" ) ); + final SpeciesSpecificDcData ssdsd6 = sa6_d.getSpeciesData().get( new BasicSpecies( "ciona" ) ); if ( ssdsd6.getCombinableDomainIdToCountsMap().size() != 5 ) { return false; } - if ( ssdsd6.getNumberOfProteinsExhibitingCombinationWith( new DomainId( "B" ) ) != 2 ) { + if ( ssdsd6.getNumberOfProteinsExhibitingCombinationWith( "B" ) != 2 ) { return false; } - if ( ssdsd6.getNumberOfProteinsExhibitingCombinationWith( new DomainId( "F" ) ) != 2 ) { + if ( ssdsd6.getNumberOfProteinsExhibitingCombinationWith( "F" ) != 2 ) { return false; } - if ( ssdsd6.getNumberOfProteinsExhibitingCombinationWith( new DomainId( "G" ) ) != 2 ) { + if ( ssdsd6.getNumberOfProteinsExhibitingCombinationWith( "G" ) != 2 ) { return false; } - if ( ssdsd6.getNumberOfProteinsExhibitingCombinationWith( new DomainId( "X" ) ) != 3 ) { + if ( ssdsd6.getNumberOfProteinsExhibitingCombinationWith( "X" ) != 3 ) { return false; } - if ( !sa5_d.getDomainId().getId().equals( "A" ) ) { + if ( !sa5_d.getDomainId().equals( "A" ) ) { return false; } final Species ciona6 = new BasicSpecies( "ciona" ); if ( sa6_d.getCombinableDomainIds( ciona6 ).size() != 5 ) { return false; } - if ( !sa6_d.getCombinableDomainIds( ciona6 ).contains( new DomainId( "A" ) ) ) { + if ( !sa6_d.getCombinableDomainIds( ciona6 ).contains( "A" ) ) { return false; } - if ( !sa6_d.getCombinableDomainIds( ciona6 ).contains( new DomainId( "B" ) ) ) { + if ( !sa6_d.getCombinableDomainIds( ciona6 ).contains( "B" ) ) { return false; } - if ( !sa6_d.getCombinableDomainIds( ciona6 ).contains( new DomainId( "F" ) ) ) { + if ( !sa6_d.getCombinableDomainIds( ciona6 ).contains( "F" ) ) { return false; } - if ( !sa6_d.getCombinableDomainIds( ciona6 ).contains( new DomainId( "G" ) ) ) { + if ( !sa6_d.getCombinableDomainIds( ciona6 ).contains( "G" ) ) { return false; } - if ( !sa6_d.getCombinableDomainIds( ciona6 ).contains( new DomainId( "X" ) ) ) { + if ( !sa6_d.getCombinableDomainIds( ciona6 ).contains( "X" ) ) { return false; } if ( !TestSurfacing @@ -930,25 +921,25 @@ public class TestSurfacing { true ); final Iterator sims_it6_p = sims6_p.iterator(); final DomainSimilarity sa6_p = sims_it6_p.next(); - if ( !sa6_p.getDomainId().getId().equals( "A" ) ) { + if ( !sa6_p.getDomainId().equals( "A" ) ) { return false; } if ( sa6_p.getCombinableDomainIds( ciona ).size() != 5 ) { return false; } - if ( !sa6_p.getCombinableDomainIds( ciona ).contains( new DomainId( "A" ) ) ) { + if ( !sa6_p.getCombinableDomainIds( ciona ).contains( "A" ) ) { return false; } - if ( !sa6_p.getCombinableDomainIds( ciona ).contains( new DomainId( "B" ) ) ) { + if ( !sa6_p.getCombinableDomainIds( ciona ).contains( "B" ) ) { return false; } - if ( !sa6_p.getCombinableDomainIds( ciona ).contains( new DomainId( "F" ) ) ) { + if ( !sa6_p.getCombinableDomainIds( ciona ).contains( "F" ) ) { return false; } - if ( !sa6_p.getCombinableDomainIds( ciona ).contains( new DomainId( "G" ) ) ) { + if ( !sa6_p.getCombinableDomainIds( ciona ).contains( "G" ) ) { return false; } - if ( !sa6_p.getCombinableDomainIds( ciona ).contains( new DomainId( "X" ) ) ) { + if ( !sa6_p.getCombinableDomainIds( ciona ).contains( "X" ) ) { return false; } if ( !TestSurfacing @@ -1039,7 +1030,8 @@ public class TestSurfacing { new BasicSpecies( "nemve" ) ) ); final DomainSimilarityCalculator calc = new BasicDomainSimilarityCalculator( DomainSimilarity.DomainSimilaritySortField.DOMAIN_ID, false, - false ); + false, + true ); final SortedSet sims = calc .calculateSimilarities( new CombinationsBasedPairwiseDomainSimilarityCalculator(), cdc_list, @@ -1047,7 +1039,7 @@ public class TestSurfacing { false ); final Iterator sims_it = sims.iterator(); final DomainSimilarity sa = sims_it.next(); - if ( !sa.getDomainId().getId().equals( "A" ) ) { + if ( !sa.getDomainId().equals( "A" ) ) { return false; } if ( sa.getSpeciesData().size() != 1 ) { @@ -1078,7 +1070,7 @@ public class TestSurfacing { return false; } final DomainSimilarity sb = sims_it.next(); - if ( !sb.getDomainId().getId().equals( "B" ) ) { + if ( !sb.getDomainId().equals( "B" ) ) { return false; } if ( sb.getSpeciesData().size() != 1 ) { @@ -1094,7 +1086,7 @@ public class TestSurfacing { true ); final Iterator sims_it2 = sims2.iterator(); final DomainSimilarity sa2 = sims_it2.next(); - if ( !sa2.getDomainId().getId().equals( "D" ) ) { + if ( !sa2.getDomainId().equals( "D" ) ) { return false; } if ( sa2.getSpeciesData().size() != 2 ) { @@ -1147,7 +1139,8 @@ public class TestSurfacing { new BasicSpecies( "nemve" ) ) ); final DomainSimilarityCalculator calc = new BasicDomainSimilarityCalculator( DomainSimilarity.DomainSimilaritySortField.DOMAIN_ID, false, - false ); + false, + true ); final SortedSet sims = calc .calculateSimilarities( new CombinationsBasedPairwiseDomainSimilarityCalculator(), cdc_list, @@ -1158,7 +1151,7 @@ public class TestSurfacing { } final Iterator sims_it = sims.iterator(); final DomainSimilarity sa = sims_it.next(); - if ( !sa.getDomainId().getId().equals( "A" ) ) { + if ( !sa.getDomainId().equals( "A" ) ) { return false; } if ( sa.getSpeciesData().size() != 4 ) { @@ -1277,17 +1270,18 @@ public class TestSurfacing { final SortedSet sorted = new TreeSet(); sorted.add( s0 ); sorted.add( s1 ); - sorted.add( s2 ); - sorted.add( s3 ); + sorted.add( s2 );// sorted.add( s3 ); - sorted.add( s3 ); - sorted.add( s4 ); + sorted.add( s3 );// + sorted.add( s3 );// + sorted.add( s4 );// sorted.add( s5 ); sorted.add( s6 ); sorted.add( s7 ); - sorted.add( s7 ); + sorted.add( s7 );// sorted.add( s8 ); - if ( sorted.size() != 6 ) { + if ( sorted.size() != 7 ) { + System.out.println( sorted.size() ); return false; } final DirectedBinaryDomainCombination aa = new DirectedBinaryDomainCombination( "a", "a" ); @@ -2751,7 +2745,7 @@ public class TestSurfacing { if ( !calc_i.getSharedDomains().contains( f.getDomainId() ) ) { return false; } - final Set all = calc_ni.getAllDomains(); + final Set all = calc_ni.getAllDomains(); if ( !all.contains( a.getDomainId() ) ) { return false; } @@ -3226,8 +3220,8 @@ public class TestSurfacing { } calc_u.setAllowDomainsToBeIgnored( true ); calc_u.addDomainIdToIgnore( u.getDomainId() ); - calc_u.addDomainIdToIgnore( new DomainId( "other" ) ); - calc_u.addDomainIdToIgnore( new DomainId( "other_too" ) ); + calc_u.addDomainIdToIgnore( "other" ); + calc_u.addDomainIdToIgnore( "other_too" ); if ( calc_u.getAllDomains().size() != 5 ) { return false; } @@ -3331,10 +3325,10 @@ public class TestSurfacing { //------------ calc_u.setAllowDomainsToBeIgnored( true ); calc_u.deleteAllDomainIdsToIgnore(); - calc_u.addDomainIdToIgnore( new DomainId( "v" ) ); - calc_u.addDomainIdToIgnore( new DomainId( "w" ) ); - calc_u.addDomainIdToIgnore( new DomainId( "other" ) ); - calc_u.addDomainIdToIgnore( new DomainId( "other_too" ) ); + calc_u.addDomainIdToIgnore( "v" ); + calc_u.addDomainIdToIgnore( "w" ); + calc_u.addDomainIdToIgnore( "other" ); + calc_u.addDomainIdToIgnore( "other_too" ); if ( calc_u.getAllDomains().size() != 4 ) { return false; } @@ -3453,7 +3447,7 @@ public class TestSurfacing { final List domain_collections = parser.parse(); final BasicGenomeWideCombinableDomains cdcc = BasicGenomeWideCombinableDomains .createInstance( domain_collections, false, new BasicSpecies( "human" ) ); - CombinableDomains cd = cdcc.get( new DomainId( "A" ) ); + CombinableDomains cd = cdcc.get( "A" ); if ( cd.getKeyDomainCount() != 9 ) { return false; } @@ -3502,7 +3496,7 @@ public class TestSurfacing { if ( cd.getKeyDomainCount() != 9 ) { return false; } - cd = cdcc.get( new DomainId( "B" ) ); + cd = cdcc.get( "B" ); if ( cd.getKeyDomainCount() != 12 ) { return false; } @@ -3551,7 +3545,7 @@ public class TestSurfacing { if ( cd.getKeyDomainCount() != 12 ) { return false; } - cd = cdcc.get( new DomainId( "C" ) ); + cd = cdcc.get( "C" ); if ( cd.getKeyDomainCount() != 10 ) { return false; } @@ -3597,7 +3591,7 @@ public class TestSurfacing { if ( cd.getNumberOfProteinsExhibitingCombination( new SimpleDomain( "NN" ).getDomainId() ) != 0 ) { return false; } - cd = cdcc.get( new DomainId( "D" ) ); + cd = cdcc.get( "D" ); if ( cd.getKeyDomainCount() != 15 ) { return false; } @@ -3607,7 +3601,7 @@ public class TestSurfacing { if ( cd.getNumberOfCombinableDomains() != 11 ) { return false; } - cd = cdcc.get( new DomainId( "E" ) ); + cd = cdcc.get( "E" ); if ( cd.getNumberOfCombinableDomains() != 10 ) { return false; } @@ -3617,7 +3611,7 @@ public class TestSurfacing { if ( cd.getKeyDomainProteinsCount() != 1 ) { return false; } - cd = cdcc.get( new DomainId( "U" ) ); + cd = cdcc.get( "U" ); if ( cd.getNumberOfCombinableDomains() != 11 ) { return false; } @@ -3627,7 +3621,7 @@ public class TestSurfacing { if ( cd.getKeyDomainProteinsCount() != 3 ) { return false; } - cd = cdcc.get( new DomainId( "V" ) ); + cd = cdcc.get( "V" ); if ( cd.getNumberOfCombinableDomains() != 11 ) { return false; } @@ -3637,7 +3631,7 @@ public class TestSurfacing { if ( cd.getKeyDomainProteinsCount() != 2 ) { return false; } - cd = cdcc.get( new DomainId( "W" ) ); + cd = cdcc.get( "W" ); if ( cd.getNumberOfCombinableDomains() != 10 ) { return false; } @@ -3647,22 +3641,22 @@ public class TestSurfacing { if ( cd.getKeyDomainProteinsCount() != 2 ) { return false; } - cd = cdcc.get( new DomainId( "X" ) ); + cd = cdcc.get( "X" ); if ( cd.getNumberOfCombinableDomains() != 10 ) { return false; } if ( cd.getKeyDomainCount() != 2 ) { return false; } - cd = cdcc.get( new DomainId( "Y" ) ); + cd = cdcc.get( "Y" ); if ( cd.getNumberOfCombinableDomains() != 10 ) { return false; } - cd = cdcc.get( new DomainId( "Z" ) ); + cd = cdcc.get( "Z" ); if ( cd.getNumberOfCombinableDomains() != 10 ) { return false; } - cd = cdcc.get( new DomainId( "NN" ) ); + cd = cdcc.get( "NN" ); if ( cd.getKeyDomainCount() != 1 ) { return false; } @@ -3675,7 +3669,7 @@ public class TestSurfacing { if ( cd.getNumberOfProteinsExhibitingCombination( new SimpleDomain( "NN" ).getDomainId() ) != 0 ) { return false; } - cd = cdcc.get( new DomainId( "MM" ) ); + cd = cdcc.get( "MM" ); if ( cd.getNumberOfCombinableDomains() != 1 ) { return false; } @@ -3685,7 +3679,7 @@ public class TestSurfacing { if ( cd.getNumberOfProteinsExhibitingCombination( new SimpleDomain( "OO" ).getDomainId() ) != 1 ) { return false; } - cd = cdcc.get( new DomainId( "OO" ) ); + cd = cdcc.get( "OO" ); if ( cd.getNumberOfCombinableDomains() != 2 ) { return false; } @@ -3695,7 +3689,7 @@ public class TestSurfacing { if ( cd.getNumberOfProteinsExhibitingCombination( new SimpleDomain( "MM" ).getDomainId() ) != 1 ) { return false; } - cd = cdcc.get( new DomainId( "QQ" ) ); + cd = cdcc.get( "QQ" ); if ( cd.getNumberOfCombinableDomains() != 1 ) { return false; } @@ -3708,7 +3702,7 @@ public class TestSurfacing { if ( cd.getNumberOfProteinsExhibitingCombination( new SimpleDomain( "QQ" ).getDomainId() ) != 3 ) { return false; } - cd = cdcc.get( new DomainId( "PP" ) ); + cd = cdcc.get( "PP" ); if ( cd.getNumberOfCombinableDomains() != 0 ) { return false; } @@ -3718,7 +3712,7 @@ public class TestSurfacing { if ( cd.getKeyDomainProteinsCount() != 2 ) { return false; } - cd = cdcc.get( new DomainId( "singlet" ) ); + cd = cdcc.get( "singlet" ); if ( cd.getKeyDomainCount() != 1 ) { return false; } @@ -3731,7 +3725,7 @@ public class TestSurfacing { if ( cd.getNumberOfProteinsExhibitingCombination( new SimpleDomain( "singlet" ).getDomainId() ) != 0 ) { return false; } - cd = cdcc.get( new DomainId( "three" ) ); + cd = cdcc.get( "three" ); if ( cd.getKeyDomainCount() != 3 ) { return false; } @@ -3741,10 +3735,10 @@ public class TestSurfacing { if ( cd.getNumberOfCombinableDomains() != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "three" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "three" ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "so_far_so_bad" ) ) != 0 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "so_far_so_bad" ) != 0 ) { return false; } // Ignore combinations with same: @@ -3756,7 +3750,7 @@ public class TestSurfacing { DomainCombinationType.BASIC, null, null ); - cd = cdcc2.get( new DomainId( "A" ) ); + cd = cdcc2.get( "A" ); if ( cd.getKeyDomainCount() != 9 ) { return false; } @@ -3781,28 +3775,28 @@ public class TestSurfacing { if ( cd.getNumberOfProteinsExhibitingCombination( new SimpleDomain( "E" ).getDomainId() ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "U" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "U" ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "V" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "V" ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "W" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "W" ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "X" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "X" ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "Y" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "Y" ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "Z" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "Z" ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "NN" ) ) != 0 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "NN" ) != 0 ) { return false; } - cd = cdcc2.get( new DomainId( "B" ) ); + cd = cdcc2.get( "B" ); if ( cd.getKeyDomainCount() != 12 ) { return false; } @@ -3812,43 +3806,43 @@ public class TestSurfacing { if ( cd.getNumberOfCombinableDomains() != 10 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "A" ) ) != 6 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "A" ) != 6 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "B" ) ) != 0 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "B" ) != 0 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "C" ) ) != 4 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "C" ) != 4 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "D" ) ) != 3 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "D" ) != 3 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "E" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "E" ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "U" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "U" ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "V" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "V" ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "W" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "W" ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "X" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "X" ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "Y" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "Y" ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "Z" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "Z" ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "NN" ) ) != 0 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "NN" ) != 0 ) { return false; } - cd = cdcc2.get( new DomainId( "C" ) ); + cd = cdcc2.get( "C" ); if ( cd.getKeyDomainCount() != 10 ) { return false; } @@ -3858,112 +3852,112 @@ public class TestSurfacing { if ( cd.getNumberOfCombinableDomains() != 10 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "A" ) ) != 4 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "A" ) != 4 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "B" ) ) != 4 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "B" ) != 4 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "C" ) ) != 0 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "C" ) != 0 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "D" ) ) != 3 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "D" ) != 3 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "E" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "E" ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "U" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "U" ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "V" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "V" ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "W" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "W" ) != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "X" ) ) != 2 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "X" ) != 2 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "Y" ) ) != 2 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "Y" ) != 2 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "Z" ) ) != 2 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "Z" ) != 2 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "NN" ) ) != 0 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "NN" ) != 0 ) { return false; } - cd = cdcc2.get( new DomainId( "D" ) ); + cd = cdcc2.get( "D" ); if ( cd.getNumberOfCombinableDomains() != 10 ) { return false; } - cd = cdcc2.get( new DomainId( "E" ) ); + cd = cdcc2.get( "E" ); if ( cd.getNumberOfCombinableDomains() != 10 ) { return false; } if ( cd.getKeyDomainCount() != 1 ) { return false; } - cd = cdcc2.get( new DomainId( "U" ) ); + cd = cdcc2.get( "U" ); if ( cd.getNumberOfCombinableDomains() != 10 ) { return false; } - cd = cdcc2.get( new DomainId( "V" ) ); + cd = cdcc2.get( "V" ); if ( cd.getNumberOfCombinableDomains() != 10 ) { return false; } - cd = cdcc2.get( new DomainId( "W" ) ); + cd = cdcc2.get( "W" ); if ( cd.getNumberOfCombinableDomains() != 10 ) { return false; } - cd = cdcc2.get( new DomainId( "X" ) ); + cd = cdcc2.get( "X" ); if ( cd.getNumberOfCombinableDomains() != 10 ) { return false; } - cd = cdcc2.get( new DomainId( "Y" ) ); + cd = cdcc2.get( "Y" ); if ( cd.getNumberOfCombinableDomains() != 10 ) { return false; } - cd = cdcc2.get( new DomainId( "Z" ) ); + cd = cdcc2.get( "Z" ); if ( cd.getNumberOfCombinableDomains() != 10 ) { return false; } - cd = cdcc2.get( new DomainId( "NN" ) ); + cd = cdcc2.get( "NN" ); if ( cd.getNumberOfCombinableDomains() != 0 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "NN" ) ) != 0 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "NN" ) != 0 ) { return false; } - cd = cdcc2.get( new DomainId( "MM" ) ); + cd = cdcc2.get( "MM" ); if ( cd.getNumberOfCombinableDomains() != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "MM" ) ) != 0 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "MM" ) != 0 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "OO" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "OO" ) != 1 ) { return false; } - cd = cdcc2.get( new DomainId( "OO" ) ); + cd = cdcc2.get( "OO" ); if ( cd.getNumberOfCombinableDomains() != 1 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "OO" ) ) != 0 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "OO" ) != 0 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "MM" ) ) != 1 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "MM" ) != 1 ) { return false; } - cd = cdcc2.get( new DomainId( "QQ" ) ); + cd = cdcc2.get( "QQ" ); if ( cd.getNumberOfCombinableDomains() != 0 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "QQ" ) ) != 0 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "QQ" ) != 0 ) { return false; } - cd = cdcc2.get( new DomainId( "singlet" ) ); + cd = cdcc2.get( "singlet" ); if ( cd.getKeyDomainCount() != 1 ) { return false; } @@ -3973,10 +3967,10 @@ public class TestSurfacing { if ( cd.getNumberOfCombinableDomains() != 0 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "singlet" ) ) != 0 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "singlet" ) != 0 ) { return false; } - cd = cdcc2.get( new DomainId( "three" ) ); + cd = cdcc2.get( "three" ); if ( cd.getKeyDomainCount() != 3 ) { return false; } @@ -3986,10 +3980,10 @@ public class TestSurfacing { if ( cd.getNumberOfCombinableDomains() != 0 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "three" ) ) != 0 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "three" ) != 0 ) { return false; } - if ( cd.getNumberOfProteinsExhibitingCombination( new DomainId( "so_far_so_bad" ) ) != 0 ) { + if ( cd.getNumberOfProteinsExhibitingCombination( "so_far_so_bad" ) != 0 ) { return false; } } @@ -4045,73 +4039,73 @@ public class TestSurfacing { if ( sorted.size() != 17 ) { return false; } - if ( !sorted.get( 0 ).getDomainId().getId().equals( "A" ) ) { + if ( !sorted.get( 0 ).getDomainId().equals( "A" ) ) { return false; } if ( sorted.get( 0 ).getNumber() != 1 ) { return false; } - if ( !sorted.get( 1 ).getDomainId().getId().equals( "B" ) ) { + if ( !sorted.get( 1 ).getDomainId().equals( "B" ) ) { return false; } if ( sorted.get( 1 ).getNumber() != 1 ) { return false; } - if ( !sorted.get( 2 ).getDomainId().getId().equals( "C" ) ) { + if ( !sorted.get( 2 ).getDomainId().equals( "C" ) ) { return false; } if ( sorted.get( 2 ).getNumber() != 1 ) { return false; } - if ( !sorted.get( 3 ).getDomainId().getId().equals( "D" ) ) { + if ( !sorted.get( 3 ).getDomainId().equals( "D" ) ) { return false; } if ( sorted.get( 3 ).getNumber() != 1 ) { return false; } - if ( !sorted.get( 4 ).getDomainId().getId().equals( "E" ) ) { + if ( !sorted.get( 4 ).getDomainId().equals( "E" ) ) { return false; } if ( sorted.get( 4 ).getNumber() != 1 ) { return false; } - if ( !sorted.get( 5 ).getDomainId().getId().equals( "F" ) ) { + if ( !sorted.get( 5 ).getDomainId().equals( "F" ) ) { return false; } if ( sorted.get( 5 ).getNumber() != 1 ) { return false; } - if ( !sorted.get( 6 ).getDomainId().getId().equals( "G" ) ) { + if ( !sorted.get( 6 ).getDomainId().equals( "G" ) ) { return false; } if ( sorted.get( 6 ).getNumber() != 1 ) { return false; } - if ( !sorted.get( 7 ).getDomainId().getId().equals( "H" ) ) { + if ( !sorted.get( 7 ).getDomainId().equals( "H" ) ) { return false; } if ( sorted.get( 7 ).getNumber() != 5 ) { return false; } - if ( !sorted.get( 8 ).getDomainId().getId().equals( "H" ) ) { + if ( !sorted.get( 8 ).getDomainId().equals( "H" ) ) { return false; } if ( sorted.get( 8 ).getNumber() != 2 ) { return false; } - if ( !sorted.get( 9 ).getDomainId().getId().equals( "H" ) ) { + if ( !sorted.get( 9 ).getDomainId().equals( "H" ) ) { return false; } if ( sorted.get( 9 ).getNumber() != 6 ) { return false; } - if ( !sorted.get( 10 ).getDomainId().getId().equals( "H" ) ) { + if ( !sorted.get( 10 ).getDomainId().equals( "H" ) ) { return false; } if ( sorted.get( 10 ).getNumber() != 4 ) { return false; } - if ( !sorted.get( 11 ).getDomainId().getId().equals( "H" ) ) { + if ( !sorted.get( 11 ).getDomainId().equals( "H" ) ) { return false; } if ( sorted.get( 11 ).getNumber() != 1 ) { @@ -4120,25 +4114,25 @@ public class TestSurfacing { if ( sorted.get( 11 ).getTotalCount() != 5 ) { return false; } - if ( !sorted.get( 12 ).getDomainId().getId().equals( "H" ) ) { + if ( !sorted.get( 12 ).getDomainId().equals( "H" ) ) { return false; } if ( sorted.get( 12 ).getNumber() != 3 ) { return false; } - if ( !sorted.get( 13 ).getDomainId().getId().equals( "H7" ) ) { + if ( !sorted.get( 13 ).getDomainId().equals( "H7" ) ) { return false; } if ( sorted.get( 13 ).getNumber() != 5 ) { return false; } - if ( !sorted.get( 14 ).getDomainId().getId().equals( "H7" ) ) { + if ( !sorted.get( 14 ).getDomainId().equals( "H7" ) ) { return false; } if ( sorted.get( 14 ).getNumber() != 5 ) { return false; } - if ( !sorted.get( 15 ).getDomainId().getId().equals( "H7" ) ) { + if ( !sorted.get( 15 ).getDomainId().equals( "H7" ) ) { return false; } if ( sorted.get( 15 ).getNumber() != 5 ) { @@ -4146,7 +4140,7 @@ public class TestSurfacing { } // To check if sorting is stable [as claimed by Sun for // Collections.sort( List )] - if ( !sorted.get( 16 ).getDomainId().getId().equals( "H7" ) ) { + if ( !sorted.get( 16 ).getDomainId().equals( "H7" ) ) { return false; } if ( sorted.get( 16 ).getNumber() != 5 ) { @@ -4163,105 +4157,6 @@ public class TestSurfacing { return true; } - private static boolean testEngulfingOverlapRemoval() { - try { - final Domain d0 = new BasicDomain( "d0", 0, 8, ( short ) 1, ( short ) 1, 0.1, 1 ); - final Domain d1 = new BasicDomain( "d1", 0, 1, ( short ) 1, ( short ) 1, 0.1, 1 ); - final Domain d2 = new BasicDomain( "d2", 0, 2, ( short ) 1, ( short ) 1, 0.1, 1 ); - final Domain d3 = new BasicDomain( "d3", 7, 8, ( short ) 1, ( short ) 1, 0.1, 1 ); - final Domain d4 = new BasicDomain( "d4", 7, 9, ( short ) 1, ( short ) 1, 0.1, 1 ); - final Domain d5 = new BasicDomain( "d4", 0, 9, ( short ) 1, ( short ) 1, 0.1, 1 ); - final Domain d6 = new BasicDomain( "d4", 4, 5, ( short ) 1, ( short ) 1, 0.1, 1 ); - final List covered = new ArrayList(); - covered.add( true ); // 0 - covered.add( false ); // 1 - covered.add( true ); // 2 - covered.add( false ); // 3 - covered.add( true ); // 4 - covered.add( true ); // 5 - covered.add( false ); // 6 - covered.add( true ); // 7 - covered.add( true ); // 8 - if ( SurfacingUtil.isEngulfed( d0, covered ) ) { - return false; - } - if ( SurfacingUtil.isEngulfed( d1, covered ) ) { - return false; - } - if ( SurfacingUtil.isEngulfed( d2, covered ) ) { - return false; - } - if ( !SurfacingUtil.isEngulfed( d3, covered ) ) { - return false; - } - if ( SurfacingUtil.isEngulfed( d4, covered ) ) { - return false; - } - if ( SurfacingUtil.isEngulfed( d5, covered ) ) { - return false; - } - if ( !SurfacingUtil.isEngulfed( d6, covered ) ) { - return false; - } - final Domain a = new BasicDomain( "a", 0, 10, ( short ) 1, ( short ) 1, 0.1, 1 ); - final Domain b = new BasicDomain( "b", 8, 20, ( short ) 1, ( short ) 1, 0.2, 1 ); - final Domain c = new BasicDomain( "c", 15, 16, ( short ) 1, ( short ) 1, 0.3, 1 ); - final Protein abc = new BasicProtein( "abc", "nemve", 0 ); - abc.addProteinDomain( a ); - abc.addProteinDomain( b ); - abc.addProteinDomain( c ); - final Protein abc_r1 = SurfacingUtil.removeOverlappingDomains( 3, false, abc ); - final Protein abc_r2 = SurfacingUtil.removeOverlappingDomains( 3, true, abc ); - if ( abc.getNumberOfProteinDomains() != 3 ) { - return false; - } - if ( abc_r1.getNumberOfProteinDomains() != 3 ) { - return false; - } - if ( abc_r2.getNumberOfProteinDomains() != 2 ) { - return false; - } - if ( !abc_r2.getProteinDomain( 0 ).getDomainId().getId().equals( "a" ) ) { - return false; - } - if ( !abc_r2.getProteinDomain( 1 ).getDomainId().getId().equals( "b" ) ) { - return false; - } - final Domain d = new BasicDomain( "d", 0, 10, ( short ) 1, ( short ) 1, 0.1, 1 ); - final Domain e = new BasicDomain( "e", 8, 20, ( short ) 1, ( short ) 1, 0.3, 1 ); - final Domain f = new BasicDomain( "f", 15, 16, ( short ) 1, ( short ) 1, 0.2, 1 ); - final Protein def = new BasicProtein( "def", "nemve", 0 ); - def.addProteinDomain( d ); - def.addProteinDomain( e ); - def.addProteinDomain( f ); - final Protein def_r1 = SurfacingUtil.removeOverlappingDomains( 5, false, def ); - final Protein def_r2 = SurfacingUtil.removeOverlappingDomains( 5, true, def ); - if ( def.getNumberOfProteinDomains() != 3 ) { - return false; - } - if ( def_r1.getNumberOfProteinDomains() != 3 ) { - return false; - } - if ( def_r2.getNumberOfProteinDomains() != 3 ) { - return false; - } - if ( !def_r2.getProteinDomain( 0 ).getDomainId().getId().equals( "d" ) ) { - return false; - } - if ( !def_r2.getProteinDomain( 1 ).getDomainId().getId().equals( "f" ) ) { - return false; - } - if ( !def_r2.getProteinDomain( 2 ).getDomainId().getId().equals( "e" ) ) { - return false; - } - } - catch ( final Exception e ) { - e.printStackTrace( System.out ); - return false; - } - return true; - } - private static boolean testGenomeWideCombinableDomains() { try { final Domain a = new BasicDomain( "a", 23, 25, ( short ) 1, ( short ) 4, 0.1, -12 ); @@ -4311,58 +4206,58 @@ public class TestSurfacing { .createInstance( protein_list_eel, false, new BasicSpecies( "eel" ) ); final BasicGenomeWideCombinableDomains eel_ignore = BasicGenomeWideCombinableDomains .createInstance( protein_list_eel, true, new BasicSpecies( "eel" ) ); - if ( !eel_not_ignore.contains( new DomainId( "a" ) ) ) { + if ( !eel_not_ignore.contains( "a" ) ) { return false; } - if ( !eel_not_ignore.contains( new DomainId( "b" ) ) ) { + if ( !eel_not_ignore.contains( "b" ) ) { return false; } - if ( !eel_not_ignore.contains( new DomainId( "c" ) ) ) { + if ( !eel_not_ignore.contains( "c" ) ) { return false; } - if ( !eel_not_ignore.contains( new DomainId( "d" ) ) ) { + if ( !eel_not_ignore.contains( "d" ) ) { return false; } - if ( !eel_not_ignore.contains( new DomainId( "e" ) ) ) { + if ( !eel_not_ignore.contains( "e" ) ) { return false; } - if ( !eel_not_ignore.contains( new DomainId( "f" ) ) ) { + if ( !eel_not_ignore.contains( "f" ) ) { return false; } - if ( !eel_not_ignore.contains( new DomainId( "g" ) ) ) { + if ( !eel_not_ignore.contains( "g" ) ) { return false; } - if ( !eel_not_ignore.contains( new DomainId( "h" ) ) ) { + if ( !eel_not_ignore.contains( "h" ) ) { return false; } - if ( eel_not_ignore.contains( new DomainId( "x" ) ) ) { + if ( eel_not_ignore.contains( "x" ) ) { return false; } - if ( !eel_ignore.contains( new DomainId( "a" ) ) ) { + if ( !eel_ignore.contains( "a" ) ) { return false; } - if ( !eel_ignore.contains( new DomainId( "b" ) ) ) { + if ( !eel_ignore.contains( "b" ) ) { return false; } - if ( !eel_ignore.contains( new DomainId( "c" ) ) ) { + if ( !eel_ignore.contains( "c" ) ) { return false; } - if ( !eel_ignore.contains( new DomainId( "d" ) ) ) { + if ( !eel_ignore.contains( "d" ) ) { return false; } - if ( !eel_ignore.contains( new DomainId( "e" ) ) ) { + if ( !eel_ignore.contains( "e" ) ) { return false; } - if ( !eel_ignore.contains( new DomainId( "f" ) ) ) { + if ( !eel_ignore.contains( "f" ) ) { return false; } - if ( !eel_ignore.contains( new DomainId( "g" ) ) ) { + if ( !eel_ignore.contains( "g" ) ) { return false; } - if ( !eel_ignore.contains( new DomainId( "h" ) ) ) { + if ( !eel_ignore.contains( "h" ) ) { return false; } - if ( eel_ignore.contains( new DomainId( "x" ) ) ) { + if ( eel_ignore.contains( "x" ) ) { return false; } if ( eel_not_ignore.getSize() != 8 ) { @@ -4371,52 +4266,52 @@ public class TestSurfacing { if ( eel_ignore.getSize() != 8 ) { return false; } - if ( eel_not_ignore.get( new DomainId( "a" ) ).getCombinableDomainsIds().size() != 5 ) { + if ( eel_not_ignore.get( "a" ).getCombinableDomainsIds().size() != 5 ) { return false; } - if ( eel_not_ignore.get( new DomainId( "b" ) ).getCombinableDomainsIds().size() != 4 ) { + if ( eel_not_ignore.get( "b" ).getCombinableDomainsIds().size() != 4 ) { return false; } - if ( eel_not_ignore.get( new DomainId( "c" ) ).getCombinableDomainsIds().size() != 4 ) { + if ( eel_not_ignore.get( "c" ).getCombinableDomainsIds().size() != 4 ) { return false; } - if ( eel_not_ignore.get( new DomainId( "d" ) ).getCombinableDomainsIds().size() != 4 ) { + if ( eel_not_ignore.get( "d" ).getCombinableDomainsIds().size() != 4 ) { return false; } - if ( eel_not_ignore.get( new DomainId( "e" ) ).getCombinableDomainsIds().size() != 6 ) { + if ( eel_not_ignore.get( "e" ).getCombinableDomainsIds().size() != 6 ) { return false; } - if ( eel_not_ignore.get( new DomainId( "f" ) ).getCombinableDomainsIds().size() != 2 ) { + if ( eel_not_ignore.get( "f" ).getCombinableDomainsIds().size() != 2 ) { return false; } - if ( eel_not_ignore.get( new DomainId( "g" ) ).getCombinableDomainsIds().size() != 1 ) { + if ( eel_not_ignore.get( "g" ).getCombinableDomainsIds().size() != 1 ) { return false; } - if ( eel_not_ignore.get( new DomainId( "h" ) ).getCombinableDomainsIds().size() != 1 ) { + if ( eel_not_ignore.get( "h" ).getCombinableDomainsIds().size() != 1 ) { return false; } - if ( eel_ignore.get( new DomainId( "a" ) ).getCombinableDomainsIds().size() != 4 ) { + if ( eel_ignore.get( "a" ).getCombinableDomainsIds().size() != 4 ) { return false; } - if ( eel_ignore.get( new DomainId( "b" ) ).getCombinableDomainsIds().size() != 4 ) { + if ( eel_ignore.get( "b" ).getCombinableDomainsIds().size() != 4 ) { return false; } - if ( eel_ignore.get( new DomainId( "c" ) ).getCombinableDomainsIds().size() != 4 ) { + if ( eel_ignore.get( "c" ).getCombinableDomainsIds().size() != 4 ) { return false; } - if ( eel_ignore.get( new DomainId( "d" ) ).getCombinableDomainsIds().size() != 4 ) { + if ( eel_ignore.get( "d" ).getCombinableDomainsIds().size() != 4 ) { return false; } - if ( eel_ignore.get( new DomainId( "e" ) ).getCombinableDomainsIds().size() != 5 ) { + if ( eel_ignore.get( "e" ).getCombinableDomainsIds().size() != 5 ) { return false; } - if ( eel_ignore.get( new DomainId( "f" ) ).getCombinableDomainsIds().size() != 1 ) { + if ( eel_ignore.get( "f" ).getCombinableDomainsIds().size() != 1 ) { return false; } - if ( eel_ignore.get( new DomainId( "g" ) ).getCombinableDomainsIds().size() != 1 ) { + if ( eel_ignore.get( "g" ).getCombinableDomainsIds().size() != 1 ) { return false; } - if ( eel_ignore.get( new DomainId( "h" ) ).getCombinableDomainsIds().size() != 1 ) { + if ( eel_ignore.get( "h" ).getCombinableDomainsIds().size() != 1 ) { return false; } if ( eel_not_ignore.getAllDomainIds().size() != 8 ) { @@ -4660,9 +4555,9 @@ public class TestSurfacing { .equals( "pep:known chromosome:NCBI36:21:16024215:16174248:1 gene:ENSG00000155313 transcript:ENST00000285681" ) ) { return false; } - final List uba = pdc.getProteinDomains( new DomainId( "UBA" ) ); - final List uim = pdc.getProteinDomains( new DomainId( "UIM" ) ); - final List uch = pdc.getProteinDomains( new DomainId( "UCH" ) ); + final List uba = pdc.getProteinDomains( "UBA" ); + final List uim = pdc.getProteinDomains( "UIM" ); + final List uch = pdc.getProteinDomains( "UCH" ); if ( uba.size() != 1 ) { return false; } @@ -4673,14 +4568,14 @@ public class TestSurfacing { return false; } final BasicDomain uim_domain = ( BasicDomain ) uim.get( 1 ); - if ( !uim_domain.getDomainId().equals( new DomainId( "UIM" ) ) ) { + if ( !uim_domain.getDomainId().equals( "UIM" ) ) { return false; } if ( uim_domain.getTotalCount() != 2 ) { return false; } final BasicDomain uba_domain = ( BasicDomain ) uba.get( 0 ); - if ( !uba_domain.getDomainId().equals( new DomainId( "UBA" ) ) ) { + if ( !uba_domain.getDomainId().equals( "UBA" ) ) { return false; } if ( uba_domain.getNumber() != 1 ) { @@ -4747,9 +4642,9 @@ public class TestSurfacing { if ( pdc2.getNumberOfProteinDomains() != 3 ) { return false; } - final List uba2 = pdc2.getProteinDomains( new DomainId( "UBA" ) ); - final List uim2 = pdc2.getProteinDomains( new DomainId( "UIM" ) ); - final List uch2 = pdc2.getProteinDomains( new DomainId( "UCH" ) ); + final List uba2 = pdc2.getProteinDomains( "UBA" ); + final List uim2 = pdc2.getProteinDomains( "UIM" ); + final List uch2 = pdc2.getProteinDomains( "UCH" ); if ( uba2.size() != 1 ) { return false; } @@ -4760,14 +4655,14 @@ public class TestSurfacing { return false; } final BasicDomain uim_domain2 = ( BasicDomain ) uim2.get( 1 ); - if ( !uim_domain2.getDomainId().getId().equals( "UIM" ) ) { + if ( !uim_domain2.getDomainId().equals( "UIM" ) ) { return false; } if ( uim_domain2.getTotalCount() != 2 ) { return false; } final BasicDomain uba_domain2 = ( BasicDomain ) uba2.get( 0 ); - if ( !uba_domain2.getDomainId().getId().equals( "UBA" ) ) { + if ( !uba_domain2.getDomainId().equals( "UBA" ) ) { return false; } if ( uba_domain2.getNumber() != 1 ) { @@ -4809,9 +4704,9 @@ public class TestSurfacing { return false; } // - Set filter = new TreeSet(); - filter.add( new DomainId( "beauty" ) ); - filter.add( new DomainId( "strange" ) ); + Set filter = new TreeSet(); + filter.add( "beauty" ); + filter.add( "strange" ); parser = new HmmPfamOutputParser( new File( test_dir + ForesterUtil.getFileSeparator() + "hmmpfam_output3" ), "human", "ls", @@ -4829,9 +4724,9 @@ public class TestSurfacing { return false; } // - filter = new TreeSet(); - filter.add( new DomainId( "beauty" ) ); - filter.add( new DomainId( "strange" ) ); + filter = new TreeSet(); + filter.add( "beauty" ); + filter.add( "strange" ); parser = new HmmPfamOutputParser( new File( test_dir + ForesterUtil.getFileSeparator() + "hmmpfam_output3" ), "human", "ls", @@ -4849,10 +4744,10 @@ public class TestSurfacing { return false; } // - filter = new TreeSet(); - filter.add( new DomainId( "UIM" ) ); - filter.add( new DomainId( "A" ) ); - filter.add( new DomainId( "C" ) ); + filter = new TreeSet(); + filter.add( "UIM" ); + filter.add( "A" ); + filter.add( "C" ); parser = new HmmPfamOutputParser( new File( test_dir + ForesterUtil.getFileSeparator() + "hmmpfam_output3" ), "human", "ls", @@ -4870,11 +4765,11 @@ public class TestSurfacing { return false; } // - filter = new TreeSet(); - filter.add( new DomainId( "UIM" ) ); - filter.add( new DomainId( "A" ) ); - filter.add( new DomainId( "C" ) ); - filter.add( new DomainId( "X" ) ); + filter = new TreeSet(); + filter.add( "UIM" ); + filter.add( "A" ); + filter.add( "C" ); + filter.add( "X" ); parser = new HmmPfamOutputParser( new File( test_dir + ForesterUtil.getFileSeparator() + "hmmpfam_output3" ), "human", "ls", @@ -4892,10 +4787,10 @@ public class TestSurfacing { return false; } // - filter = new TreeSet(); - filter.add( new DomainId( "UIM" ) ); - filter.add( new DomainId( "A" ) ); - filter.add( new DomainId( "C" ) ); + filter = new TreeSet(); + filter.add( "UIM" ); + filter.add( "A" ); + filter.add( "C" ); parser = new HmmPfamOutputParser( new File( test_dir + ForesterUtil.getFileSeparator() + "hmmpfam_output3" ), "human", "ls", @@ -4913,8 +4808,8 @@ public class TestSurfacing { return false; } // - filter = new TreeSet(); - filter.add( new DomainId( "UIM" ) ); + filter = new TreeSet(); + filter.add( "UIM" ); parser = new HmmPfamOutputParser( new File( test_dir + ForesterUtil.getFileSeparator() + "hmmpfam_output3" ), "human", "ls", @@ -4935,8 +4830,8 @@ public class TestSurfacing { return false; } // - filter = new TreeSet(); - filter.add( new DomainId( "UIM" ) ); + filter = new TreeSet(); + filter.add( "UIM" ); parser = new HmmPfamOutputParser( new File( test_dir + ForesterUtil.getFileSeparator() + "hmmpfam_output3" ), "human", "ls", @@ -4957,9 +4852,9 @@ public class TestSurfacing { return false; } // - filter = new TreeSet(); - filter.add( new DomainId( "A" ) ); - filter.add( new DomainId( "C" ) ); + filter = new TreeSet(); + filter.add( "A" ); + filter.add( "C" ); parser = new HmmPfamOutputParser( new File( test_dir + ForesterUtil.getFileSeparator() + "hmmpfam_output3" ), "human", "ls", @@ -4993,160 +4888,6 @@ public class TestSurfacing { return true; } - private static boolean testOverlapRemoval() { - try { - final Domain d0 = new BasicDomain( "d0", ( short ) 2, ( short ) 5, ( short ) 1, ( short ) 1, 0.1, 1 ); - final Domain d1 = new BasicDomain( "d1", ( short ) 7, ( short ) 10, ( short ) 1, ( short ) 1, 0.1, 1 ); - final Domain d2 = new BasicDomain( "d2", ( short ) 0, ( short ) 20, ( short ) 1, ( short ) 1, 0.1, 1 ); - final Domain d3 = new BasicDomain( "d3", ( short ) 9, ( short ) 10, ( short ) 1, ( short ) 1, 0.1, 1 ); - final Domain d4 = new BasicDomain( "d4", ( short ) 7, ( short ) 8, ( short ) 1, ( short ) 1, 0.1, 1 ); - final List covered = new ArrayList(); - covered.add( true ); // 0 - covered.add( false ); // 1 - covered.add( true ); // 2 - covered.add( false ); // 3 - covered.add( true ); // 4 - covered.add( true ); // 5 - covered.add( false ); // 6 - covered.add( true ); // 7 - covered.add( true ); // 8 - if ( SurfacingUtil.calculateOverlap( d0, covered ) != 3 ) { - return false; - } - if ( SurfacingUtil.calculateOverlap( d1, covered ) != 2 ) { - return false; - } - if ( SurfacingUtil.calculateOverlap( d2, covered ) != 6 ) { - return false; - } - if ( SurfacingUtil.calculateOverlap( d3, covered ) != 0 ) { - return false; - } - if ( SurfacingUtil.calculateOverlap( d4, covered ) != 2 ) { - return false; - } - final Domain a = new BasicDomain( "a", ( short ) 2, ( short ) 5, ( short ) 1, ( short ) 1, 0.01, 1 ); - final Domain b = new BasicDomain( "b", ( short ) 2, ( short ) 10, ( short ) 1, ( short ) 1, 0.1, 1 ); - final Protein ab = new BasicProtein( "ab", "varanus", 0 ); - ab.addProteinDomain( a ); - ab.addProteinDomain( b ); - final Protein ab_s0 = SurfacingUtil.removeOverlappingDomains( 3, false, ab ); - if ( ab.getNumberOfProteinDomains() != 2 ) { - return false; - } - if ( ab_s0.getNumberOfProteinDomains() != 1 ) { - return false; - } - if ( !ab_s0.getProteinDomain( 0 ).getDomainId().getId().equals( "a" ) ) { - return false; - } - final Protein ab_s1 = SurfacingUtil.removeOverlappingDomains( 4, false, ab ); - if ( ab.getNumberOfProteinDomains() != 2 ) { - return false; - } - if ( ab_s1.getNumberOfProteinDomains() != 2 ) { - return false; - } - final Domain c = new BasicDomain( "c", ( short ) 20000, ( short ) 20500, ( short ) 1, ( short ) 1, 10, 1 ); - final Domain d = new BasicDomain( "d", - ( short ) 10000, - ( short ) 10500, - ( short ) 1, - ( short ) 1, - 0.0000001, - 1 ); - final Domain e = new BasicDomain( "e", ( short ) 5000, ( short ) 5500, ( short ) 1, ( short ) 1, 0.0001, 1 ); - final Protein cde = new BasicProtein( "cde", "varanus", 0 ); - cde.addProteinDomain( c ); - cde.addProteinDomain( d ); - cde.addProteinDomain( e ); - final Protein cde_s0 = SurfacingUtil.removeOverlappingDomains( 0, false, cde ); - if ( cde.getNumberOfProteinDomains() != 3 ) { - return false; - } - if ( cde_s0.getNumberOfProteinDomains() != 3 ) { - return false; - } - final Domain f = new BasicDomain( "f", ( short ) 10, ( short ) 20, ( short ) 1, ( short ) 1, 10, 1 ); - final Domain g = new BasicDomain( "g", ( short ) 10, ( short ) 20, ( short ) 1, ( short ) 1, 0.01, 1 ); - final Domain h = new BasicDomain( "h", ( short ) 10, ( short ) 20, ( short ) 1, ( short ) 1, 0.0001, 1 ); - final Domain i = new BasicDomain( "i", ( short ) 10, ( short ) 20, ( short ) 1, ( short ) 1, 0.5, 1 ); - final Domain i2 = new BasicDomain( "i", ( short ) 5, ( short ) 30, ( short ) 1, ( short ) 1, 0.5, 10 ); - final Protein fghi = new BasicProtein( "fghi", "varanus", 0 ); - fghi.addProteinDomain( f ); - fghi.addProteinDomain( g ); - fghi.addProteinDomain( h ); - fghi.addProteinDomain( i ); - fghi.addProteinDomain( i ); - fghi.addProteinDomain( i ); - fghi.addProteinDomain( i2 ); - final Protein fghi_s0 = SurfacingUtil.removeOverlappingDomains( 10, false, fghi ); - if ( fghi.getNumberOfProteinDomains() != 7 ) { - return false; - } - if ( fghi_s0.getNumberOfProteinDomains() != 1 ) { - return false; - } - if ( !fghi_s0.getProteinDomain( 0 ).getDomainId().getId().equals( "h" ) ) { - return false; - } - final Protein fghi_s1 = SurfacingUtil.removeOverlappingDomains( 11, false, fghi ); - if ( fghi.getNumberOfProteinDomains() != 7 ) { - return false; - } - if ( fghi_s1.getNumberOfProteinDomains() != 7 ) { - return false; - } - final Domain j = new BasicDomain( "j", ( short ) 10, ( short ) 20, ( short ) 1, ( short ) 1, 10, 1 ); - final Domain k = new BasicDomain( "k", ( short ) 10, ( short ) 20, ( short ) 1, ( short ) 1, 0.01, 1 ); - final Domain l = new BasicDomain( "l", ( short ) 10, ( short ) 20, ( short ) 1, ( short ) 1, 0.0001, 1 ); - final Domain m = new BasicDomain( "m", ( short ) 10, ( short ) 20, ( short ) 1, ( short ) 4, 0.5, 1 ); - final Domain m0 = new BasicDomain( "m", ( short ) 10, ( short ) 20, ( short ) 2, ( short ) 4, 0.5, 1 ); - final Domain m1 = new BasicDomain( "m", ( short ) 10, ( short ) 20, ( short ) 3, ( short ) 4, 0.5, 1 ); - final Domain m2 = new BasicDomain( "m", ( short ) 5, ( short ) 30, ( short ) 4, ( short ) 4, 0.5, 10 ); - final Protein jklm = new BasicProtein( "jklm", "varanus", 0 ); - jklm.addProteinDomain( j ); - jklm.addProteinDomain( k ); - jklm.addProteinDomain( l ); - jklm.addProteinDomain( m ); - jklm.addProteinDomain( m0 ); - jklm.addProteinDomain( m1 ); - jklm.addProteinDomain( m2 ); - final Protein jklm_s0 = SurfacingUtil.removeOverlappingDomains( 10, false, jklm ); - if ( jklm.getNumberOfProteinDomains() != 7 ) { - return false; - } - if ( jklm_s0.getNumberOfProteinDomains() != 1 ) { - return false; - } - if ( !jklm_s0.getProteinDomain( 0 ).getDomainId().getId().equals( "l" ) ) { - return false; - } - final Protein jklm_s1 = SurfacingUtil.removeOverlappingDomains( 11, false, jklm ); - if ( jklm.getNumberOfProteinDomains() != 7 ) { - return false; - } - if ( jklm_s1.getNumberOfProteinDomains() != 7 ) { - return false; - } - final Domain only = new BasicDomain( "only", ( short ) 5, ( short ) 30, ( short ) 4, ( short ) 4, 0.5, 10 ); - final Protein od = new BasicProtein( "od", "varanus", 0 ); - od.addProteinDomain( only ); - final Protein od_s0 = SurfacingUtil.removeOverlappingDomains( 0, false, od ); - if ( od.getNumberOfProteinDomains() != 1 ) { - return false; - } - if ( od_s0.getNumberOfProteinDomains() != 1 ) { - return false; - } - } - catch ( final Exception e ) { - e.printStackTrace( System.out ); - return false; - } - return true; - } - private static boolean testParsimony() { try { final BinaryStates X = BinaryStates.PRESENT; @@ -5554,7 +5295,7 @@ public class TestSurfacing { gwcd_list.add( two ); gwcd_list.add( three ); gwcd_list.add( four ); - final Map> map_same = new HashMap>(); + final Map> map_same = new HashMap>(); final HashSet a_s = new HashSet(); a_s.add( "AAA" ); final HashSet b_s = new HashSet();