]> git.donarmstrong.com Git - mothur.git/commitdiff
pat's minor edits to distance calculations
authorpschloss <pschloss>
Wed, 14 Apr 2010 12:44:12 +0000 (12:44 +0000)
committerpschloss <pschloss>
Wed, 14 Apr 2010 12:44:12 +0000 (12:44 +0000)
Mothur.xcodeproj/project.pbxproj
distancecommand.cpp
eachgapdist.h
eachgapignore.h
onegapignore.h

index 8fc67bd1b0beb07be0fb77d33c21dacc497932d9..79c1e5b704ab469a27e074500f36a5dcf710f9fb 100644 (file)
 /* Begin PBXProject section */
                08FB7793FE84155DC02AAC07 /* Project object */ = {
                        isa = PBXProject;
+                       attributes = {
+                               BuildIndependentTargetsInParallel = YES;
+                       };
                        buildConfigurationList = 1DEB919308733D9F0010E9CD /* Build configuration list for PBXProject "Mothur" */;
                        compatibilityVersion = "Xcode 3.0";
                        hasScannedForEncodings = 1;
 /* End PBXProject section */
 
 /* Begin XCBuildConfiguration section */
-               1DEB919008733D9F0010E9CD /* Debug */ = {
-                       isa = XCBuildConfiguration;
-                       buildSettings = {
-                               COPY_PHASE_STRIP = NO;
-                               DEBUGGING_SYMBOLS = YES;
-                               GCC_DYNAMIC_NO_PIC = NO;
-                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
-                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-                               GCC_OPTIMIZATION_LEVEL = 0;
-                               OPTIMIZATION_CFLAGS = "-O0";
-                               OTHER_CFLAGS = "";
-                               OTHER_LDFLAGS = "";
-                               PRODUCT_NAME = mothur;
-                               ZERO_LINK = YES;
-                       };
-                       name = Debug;
-               };
                1DEB919108733D9F0010E9CD /* Release */ = {
                        isa = XCBuildConfiguration;
                        buildSettings = {
                        };
                        name = Release;
                };
-               1DEB919408733D9F0010E9CD /* Debug */ = {
-                       isa = XCBuildConfiguration;
-                       buildSettings = {
-                               GCC_WARN_ABOUT_RETURN_TYPE = YES;
-                               GCC_WARN_UNUSED_VARIABLE = YES;
-                               PREBINDING = NO;
-                               SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
-                       };
-                       name = Debug;
-               };
                1DEB919508733D9F0010E9CD /* Release */ = {
                        isa = XCBuildConfiguration;
                        buildSettings = {
                1DEB918F08733D9F0010E9CD /* Build configuration list for PBXLegacyTarget "mothur" */ = {
                        isa = XCConfigurationList;
                        buildConfigurations = (
-                               1DEB919008733D9F0010E9CD /* Debug */,
                                1DEB919108733D9F0010E9CD /* Release */,
                        );
                        defaultConfigurationIsVisible = 0;
                1DEB919308733D9F0010E9CD /* Build configuration list for PBXProject "Mothur" */ = {
                        isa = XCConfigurationList;
                        buildConfigurations = (
-                               1DEB919408733D9F0010E9CD /* Debug */,
                                1DEB919508733D9F0010E9CD /* Release */,
                        );
                        defaultConfigurationIsVisible = 0;
index 47e22ad47d21e9320dd5ee60bb6d40525793662d..2cc92a7d1599ac96309887d0c2e7b8a14f37a364 100644 (file)
@@ -205,8 +205,6 @@ int DistanceCommand::execute(){
                        
                        MPI_File_open(MPI_COMM_WORLD, filename, amode, MPI_INFO_NULL, &outMPI);
                        
-                       if (m->control_pressed) {   MPI_File_close(&outMPI);  delete distCalculator;  return 0;  }
-
                        if (pid == 0) { //you are the root process 
                        
                                //do your part
index ac9b45302c75cd7cec5ac28613eeaf2c344a21f7..9034dbebbeb8ddb49fbf256663987b7f5a60df8c 100644 (file)
@@ -9,6 +9,7 @@
  *
  */
 
+
 #include "dist.h"
 
 /**************************************************************************************************/
index 9763a6d1af138dc7ebeffe66a94cf0b3c4eb5a9c..8e027b7d72e33cb27599268f6c779c369ea8bdd6 100644 (file)
@@ -22,19 +22,28 @@ public:
                int diff = 0;
                int length = 0;
                int start = 0;
+               int end = 0;
                
                string seqA = A.getAligned();
                string seqB = B.getAligned();
                int alignLength = seqA.length();
                
-               for(int i=0; i<alignLength; i++){
-                       if(seqA[i] != '.' && seqB[i] != '.'){
+               for(int i=0;i<alignLength;i++){
+                       if(seqA[i] != '.' && seqB[i] != '.' && seqA[i] != '-' && seqB[i] != '-' ){
                                start = i;
+                               cout << "start: " << start << endl;
+                               break;
+                       }
+               }
+               for(int i=alignLength-1;i>=0;i--){
+                       if(seqA[i] != '.' && seqB[i] != '.' && seqA[i] != '-' && seqB[i] != '-' ){
+                               end = i;
+                               cout << "end: " << end << endl;
                                break;
                        }
                }
                
-               for(int i=start;i<alignLength;i++){
+               for(int i=start;i<=end;i++){
                        if(seqA[i] == '.' || seqB[i] == '.'){
                                break;  
                        }
index 6421741c0d4c153794ab40efc9318af6d64349a4..af284fcc6857a3c5a42545ca6c78c22cded9424d 100644 (file)
@@ -9,6 +9,7 @@
  *
  */
 
+
 #include "dist.h"
 
 /**************************************************************************************************/
@@ -28,17 +29,19 @@ public:
                string seqA = A.getAligned();
                string seqB = B.getAligned();
                int alignLength = seqA.length();
-               
+
                // this assumes that sequences start and end with '.'s instead of'-'s.
                for(int i=0;i<alignLength;i++){
-                       if(seqA[i] != '.' && seqB[i] != '.'){
+                       if(seqA[i] != '.' && seqB[i] != '.' && seqA[i] != '-' && seqB[i] != '-' ){
                                start = i;
+                               cout << "start: " << start << endl;
                                break;
                        }
                }
                for(int i=alignLength-1;i>=0;i--){
-                       if(seqA[i] != '.' && seqB[i] != '.'){
+                       if(seqA[i] != '.' && seqB[i] != '.' && seqA[i] != '-' && seqB[i] != '-' ){
                                end = i;
+                               cout << "end: " << end << endl;
                                break;
                        }
                }