jpayne@68: package icecream; jpayne@68: jpayne@68: import aligner.AlignmentResult; jpayne@68: import shared.Shared; jpayne@68: jpayne@68: public abstract class IceCreamAligner { jpayne@68: jpayne@68: public static IceCreamAligner makeAligner(int bits){ jpayne@68: if(Shared.USE_JNI){ jpayne@68: return new IceCreamAlignerJNI(); jpayne@68: }else if(bits==32){ jpayne@68: return new IceCreamAlignerJava(); jpayne@68: } jpayne@68: else{ jpayne@68: throw new RuntimeException(""+bits); jpayne@68: } jpayne@68: } jpayne@68: jpayne@68: /** jpayne@68: * @param query jpayne@68: * @param ref jpayne@68: * @param qstart jpayne@68: * @param rstart jpayne@68: * @param rstop jpayne@68: * @param minScore Quit early if score drops below this jpayne@68: * @param minRatio Don't return results if max score is less than this fraction of max possible score jpayne@68: * @return jpayne@68: */ jpayne@68: public abstract AlignmentResult alignForward(final byte[] query, final byte[] ref, final int rstart, final int rstop, final int minScore, jpayne@68: final float minRatio); jpayne@68: jpayne@68: /** jpayne@68: * @param query jpayne@68: * @param ref jpayne@68: * @param qstart jpayne@68: * @param rstart jpayne@68: * @param rstop jpayne@68: * @param minScore Quit early if score drops below this jpayne@68: * @param minRatio Don't return results if max score is less than this fraction of max possible score jpayne@68: * @return jpayne@68: */ jpayne@68: public abstract AlignmentResult alignForwardShort(final byte[] query, final byte[] ref, final int rstart, final int rstop, final int minScore, jpayne@68: final float minRatio); jpayne@68: jpayne@68: // public static final int pointsMatch = 1; jpayne@68: // public static final int pointsSub = -1; jpayne@68: // public static final int pointsDel = -2; jpayne@68: // public static final int pointsIns = -2; jpayne@68: jpayne@68: abstract long iters(); jpayne@68: abstract long itersShort(); jpayne@68: jpayne@68: }