1 #ifndef ONEIGNOREGAPS_H
2 #define ONEIGNOREGAPS_H
7 * Created by Sarah Westcott on 5/7/09.
8 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
14 /**************************************************************************************************/
16 class oneGapIgnoreTermGapDist : public Dist {
19 void calcDist(Sequence A, Sequence B){
28 for(int i=0;i<A.getLength();i++){
29 if(A.getAligned()[i] == '.' || B.getAligned()[i] == '.' || A.getAligned()[i] == '-' || B.getAligned()[i] == '-'){
36 for(int i=A.getLength()-1;i>=0;i--){
37 if(A.getAligned()[i] == '.' || B.getAligned()[i] == '.' || A.getAligned()[i] == '-' || B.getAligned()[i] == '-'){
46 for(int i=start;i<=end;i++){
47 if(A.getAligned()[i] == '-' && B.getAligned()[i] == '-'){}
48 else if(A.getAligned()[i] == '-' && B.getAligned()[i] != '-'){
56 else if(A.getAligned()[i] != '-' && B.getAligned()[i] == '-'){
64 else if(A.getAligned()[i] != '-' && B.getAligned()[i] != '-'){
65 if(A.getAligned()[i] != B.getAligned()[i]){
78 if(minLength == 0) { dist = 1.0000; }
79 else { dist = (double)difference / minLength; }
84 /**************************************************************************************************/