Added function to get bases from the current base forward in the window in ReferenceContext

This commit is contained in:
Mark DePristo 2012-04-06 15:56:01 -04:00
parent d1f2fe956f
commit 08fab49d30
2 changed files with 12 additions and 2 deletions

View File

@ -955,8 +955,8 @@
<jvmarg value="-Dpipeline.run=${pipeline.run}" />
<jvmarg value="-Djava.io.tmpdir=${java.io.tmpdir}" />
<jvmarg line="${cofoja.jvm.args}"/>
<!-- <jvmarg value="-Xdebug"/> -->
<!-- <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5678"/> -->
<!-- <jvmarg value="-Xdebug"/> -->
<!-- <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"/> -->
<classfileset dir="${java.public.test.classes}" includes="**/@{testtype}.class"/>
<classfileset dir="${java.private.test.classes}" erroronmissingdir="false">

View File

@ -191,6 +191,16 @@ public class ReferenceContext {
return basesCache;
}
/**
* All the bases in the window from the current base forward to the end of the window.
*/
public byte[] getForwardBases() {
final byte[] bases = getBases();
final int mid = locus.getStart() - window.getStart();
// todo -- warning of performance problem, especially if this is called over and over
return new String(bases).substring(mid).getBytes();
}
@Deprecated
public char getBaseAsChar() {
return (char)getBase();