From e4ca037c5e637e3d34e64cb5e8ab11b03220188d Mon Sep 17 00:00:00 2001 From: pschloss Date: Wed, 14 Apr 2010 12:44:12 +0000 Subject: [PATCH] pat's minor edits to distance calculations --- Mothur.xcodeproj/project.pbxproj | 32 +++----------------------------- distancecommand.cpp | 2 -- eachgapdist.h | 1 + eachgapignore.h | 15 ++++++++++++--- onegapignore.h | 9 ++++++--- 5 files changed, 22 insertions(+), 37 deletions(-) diff --git a/Mothur.xcodeproj/project.pbxproj b/Mothur.xcodeproj/project.pbxproj index 8fc67bd..79c1e5b 100644 --- a/Mothur.xcodeproj/project.pbxproj +++ b/Mothur.xcodeproj/project.pbxproj @@ -908,6 +908,9 @@ /* 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; @@ -921,23 +924,6 @@ /* 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 = { @@ -950,16 +936,6 @@ }; 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 = { @@ -981,7 +957,6 @@ 1DEB918F08733D9F0010E9CD /* Build configuration list for PBXLegacyTarget "mothur" */ = { isa = XCConfigurationList; buildConfigurations = ( - 1DEB919008733D9F0010E9CD /* Debug */, 1DEB919108733D9F0010E9CD /* Release */, ); defaultConfigurationIsVisible = 0; @@ -990,7 +965,6 @@ 1DEB919308733D9F0010E9CD /* Build configuration list for PBXProject "Mothur" */ = { isa = XCConfigurationList; buildConfigurations = ( - 1DEB919408733D9F0010E9CD /* Debug */, 1DEB919508733D9F0010E9CD /* Release */, ); defaultConfigurationIsVisible = 0; diff --git a/distancecommand.cpp b/distancecommand.cpp index 47e22ad..2cc92a7 100644 --- a/distancecommand.cpp +++ b/distancecommand.cpp @@ -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 diff --git a/eachgapdist.h b/eachgapdist.h index ac9b453..9034dbe 100644 --- a/eachgapdist.h +++ b/eachgapdist.h @@ -9,6 +9,7 @@ * */ + #include "dist.h" /**************************************************************************************************/ diff --git a/eachgapignore.h b/eachgapignore.h index 9763a6d..8e027b7 100644 --- a/eachgapignore.h +++ b/eachgapignore.h @@ -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=0;i--){ + if(seqA[i] != '.' && seqB[i] != '.' && seqA[i] != '-' && seqB[i] != '-' ){ + end = i; + cout << "end: " << end << endl; break; } } - for(int i=start;i=0;i--){ - if(seqA[i] != '.' && seqB[i] != '.'){ + if(seqA[i] != '.' && seqB[i] != '.' && seqA[i] != '-' && seqB[i] != '-' ){ end = i; + cout << "end: " << end << endl; break; } } -- 2.39.2