X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=onegapdist.h;fp=onegapdist.h;h=3e5b6c72f1d862ab88698360566a84e6a87953de;hb=0caf3fbabaa3ece404f8ce77f4c883dc5b1bf1dc;hp=0000000000000000000000000000000000000000;hpb=1b73ff67c83892a025e597dabd9df6fe7b58206a;p=mothur.git diff --git a/onegapdist.h b/onegapdist.h new file mode 100644 index 0000000..3e5b6c7 --- /dev/null +++ b/onegapdist.h @@ -0,0 +1,86 @@ +#ifndef ONEGAPDIST_H +#define ONEGAPDIST_H +/* + * onegapdist.h + * Mothur + * + * Created by Sarah Westcott on 5/7/09. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. + * + */ + +#include "dist.h" + + +/**************************************************************************************************/ + +class oneGapDist : public Dist { + +public: + + oneGapDist() {} + + void calcDist(Sequence A, Sequence B){ + + int difference = 0; + int minLength = 0; + int openGapA = 0; + int openGapB = 0; + int start = 0; + + string seqA = A.getAligned(); + string seqB = B.getAligned(); + int alignLength = seqA.length(); + + for(int i=0;i