Skip to content

Commit

Permalink
Fix bug when printing matrices with fewer than 20 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
genomescale committed Jun 15, 2021
1 parent 689cbe9 commit 3129d89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@

<target name="compile">
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath" includeantruntime="false">
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath" includeantruntime="false" debug="true">
<patternset refid="excluded.source.files"/>
</javac>
</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,7 @@ protected boolean checkParamsForCommand(){

@Override
protected String produceResult() {
final int matrixLength = _sequence.values().iterator().next().length();

StringBuffer result = new StringBuffer("\n");
System.out.println("\nOutput files under " + Utils._OUT_DIRECTORY);
Expand All @@ -677,7 +678,11 @@ else if (newseq.charAt(i) == '1')
newseq.setCharAt(i, '0');
}
_sequence.put(taxon, newseq.toString());
System.out.println(taxon + " " + _sequence.get(taxon).substring(0, 10) + "..." + _sequence.get(taxon).substring(_sequence.get(taxon).length() - 10, _sequence.get(taxon).length()));
if (matrixLength <= 20) {
System.out.println(taxon + " " + _sequence.get(taxon));
} else {
System.out.println(taxon + " " + _sequence.get(taxon).substring(0, 10) + "..." + _sequence.get(taxon).substring(matrixLength - 10));
}
}
}

Expand Down

0 comments on commit 3129d89

Please sign in to comment.