SimpleProfile implements Profile<S, C> { @Override public String toString(int width) { return toString(width, null, IOUtils.getIDFormat(list), true, true, true, true, true, false); } protected  SimpleProfile(AlignedSequence<S, C> query, AlignedSequence<S, C> target);  SimpleProfile(S sequence); protected  SimpleProfile(S query, S target, List<Step> sx, int xb, int xa, List<Step> sy, int yb, int ya); protected  SimpleProfile(Profile<S, C> query, Profile<S, C> target, List<Step> sx, List<Step> sy);  SimpleProfile(Collection<AlignedSequence<S,C>> alignedSequences); @Override AlignedSequence<S, C> getAlignedSequence(int listIndex); @Override AlignedSequence<S, C> getAlignedSequence(S sequence); @Override List<AlignedSequence<S, C>> getAlignedSequences(); @Override List<AlignedSequence<S, C>> getAlignedSequences(int... listIndices); @Override List<AlignedSequence<S, C>> getAlignedSequences(S... sequences); @Override C getCompoundAt(int listIndex, int alignmentIndex); @Override C getCompoundAt(S sequence, int alignmentIndex); @Override int[] getCompoundCountsAt(int alignmentIndex); @Override int[] getCompoundCountsAt(int alignmentIndex, List<C> compounds); @Override List<C> getCompoundsAt(int alignmentIndex); @Override CompoundSet<C> getCompoundSet(); @Override float[] getCompoundWeightsAt(int alignmentIndex); @Override float[] getCompoundWeightsAt(int alignmentIndex, List<C> compounds); @Override int getIndexOf(C compound); @Override int[] getIndicesAt(int alignmentIndex); @Override int getLastIndexOf(C compound); @Override int getLength(); @Override List<S> getOriginalSequences(); @Override int getSize(); @Override ProfileView<S, C> getSubProfile(Location location); @Override boolean hasGap(int alignmentIndex); @Override boolean isCircular(); @Override String toString(int width); @Override String toString(StringFormat format); @Override String toString(); @Override Iterator<AlignedSequence<S, C>> iterator();  }
@Test public void testToStringInt() { assertEquals(global.toString(3), String.format( " 1 3%n" + "Query 1 ARN 3%n" + " | %n"+ "Target 1 -R- 1%n" + "%n" + " 4 5%n" + "Query 4 D- 4%n" + " | %n"+ "Target 2 DG 3%n")); assertEquals(local.toString(4), String.format( " 1 3%n" + "Query 2 RND 4%n" + " | |%n"+ "Target 1 R-D 2%n")); assertEquals(single.toString(4), String.format( " 1 4%n" + "Query 1 ARND 4%n" )); }
@Test public void testToStringFormatted() { assertEquals(global.toString(StringFormat.ALN), String.format( "CLUSTAL W MSA from BioJava%n%n" + "Query ARND- 4%n" + " | | %n"+ "Target -R-DG 3%n")); assertEquals(local.toString(StringFormat.FASTA), String.format( ">Query%n" + "RND%n" + ">Target%n" + "R-D%n")); assertEquals(single.toString(StringFormat.MSF), String.format( "MSA from BioJava%n%n" + " MSF: 4 Type: P Check: 735 ..%n%n" + " Name: Query Len: 4 Check: 735 Weight: 1.0%n" + "%n "Query ARND%n")); }
@Test public void testToString() { assertEquals(global.toString(), String.format("ARND-%n-R-DG%n")); assertEquals(local.toString(), String.format("RND%nR-D%n")); assertEquals(single.toString(), String.format("ARND%n")); }