Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

1.40.0 #351

Open
wants to merge 68 commits into
from
Commits
The table of contents is too big for display.
+43,477 −9,798
Split

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,69 @@
+// Copyright 2015, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Injection point for custom user configurations.
+// The following macros can be defined:
+//
+// Flag related macros:
+// GTEST_FLAG(flag_name)
+// GTEST_USE_OWN_FLAGFILE_FLAG_ - Define to 0 when the system provides its
+// own flagfile flag parsing.
+// GTEST_DECLARE_bool_(name)
+// GTEST_DECLARE_int32_(name)
+// GTEST_DECLARE_string_(name)
+// GTEST_DEFINE_bool_(name, default_val, doc)
+// GTEST_DEFINE_int32_(name, default_val, doc)
+// GTEST_DEFINE_string_(name, default_val, doc)
+//
+// Test filtering:
+// GTEST_TEST_FILTER_ENV_VAR_ - The name of an environment variable that
+// will be used if --GTEST_FLAG(test_filter)
+// is not provided.
+//
+// Logging:
+// GTEST_LOG_(severity)
+// GTEST_CHECK_(condition)
+// Functions LogToStderr() and FlushInfoLog() have to be provided too.
+//
+// Threading:
+// GTEST_HAS_NOTIFICATION_ - Enabled if Notification is already provided.
+// GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ - Enabled if Mutex and ThreadLocal are
+// already provided.
+// Must also provide GTEST_DECLARE_STATIC_MUTEX_(mutex) and
+// GTEST_DEFINE_STATIC_MUTEX_(mutex)
+//
+// GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)
+// GTEST_LOCK_EXCLUDED_(locks)
+//
+// ** Custom implementation starts here **
+
+#ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_
+#define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_
+
+#endif // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_
@@ -0,0 +1,42 @@
+// Copyright 2015, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// This file provides an injection point for custom printers in a local
+// installation of gTest.
+// It will be included from gtest-printers.h and the overrides in this file
+// will be visible to everyone.
+// See documentation at gtest-printers.h for details on how to define a
+// custom printer.
+//
+// ** Custom implementation starts here **
+
+#ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_
+#define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_
+
+#endif // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_
View
@@ -0,0 +1,41 @@
+// Copyright 2015, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Injection point for custom user configurations.
+// The following macros can be defined:
+//
+// GTEST_OS_STACK_TRACE_GETTER_ - The name of an implementation of
+// OsStackTraceGetterInterface.
+//
+// ** Custom implementation starts here **
+
+#ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_
+#define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_
+
+#endif // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_
View
@@ -56,34 +56,23 @@ void TestDataSet::createCountTable() {
}
/***********************************************************************/
-vector<string> TestDataSet::getSubsetFNGFiles(int numSeqs) {
- fillSeqs();
- vector<Sequence> subsetSeqs;
- for (int i = 0; i < numSeqs; i++) { subsetSeqs.push_back(seqs[i]); }
- seqs.clear();
-
- fillNames();
- fillGroup();
- ofstream out, out2, out3;
- m->openOutputFile("tempSeqs.txt", out); m->openOutputFile("tempNames.txt", out2); m->openOutputFile("tempGroup.txt", out3);
- for (int i = 0; i < subsetSeqs.size(); i++) {
- subsetSeqs[i].printSequence(out);
- out2 << subsetSeqs[i].getName() << '\t' << nameMap[subsetSeqs[i].getName()] << '\n';
- out3 << subsetSeqs[i].getName() << '\t' << gMap->getGroup(subsetSeqs[i].getName()) << '\n';
- }
- nameMap.clear();
- delete gMap; gMap = NULL;
-
- vector<string> filenames; filenames.push_back("tempSeqs.txt"); filenames.push_back("tempNames.txt"); filenames.push_back("tempGroup.txt");
+vector<string> TestDataSet::getSubsetFNGFiles() {
+ vector<string> filenames; filenames.push_back("/Users/sarahwestcott/Desktop/mothur/TestMothur/TestFiles/tempSeqs.txt"); filenames.push_back("/Users/sarahwestcott/Desktop/mothur/TestMothur/TestFiles/tempNames.txt"); filenames.push_back("/Users/sarahwestcott/Desktop/mothur/TestMothur/TestFiles/tempGroup.txt");
return filenames;
}
/***********************************************************************/
+string TestDataSet::getSubsetFNGDistFile() {
+
+ return "/Users/sarahwestcott/Desktop/mothur/TestMothur/TestFiles/tempSeqs.dist";
+}
+/***********************************************************************/
void TestDataSet::fillSeqs() {
seqs.clear();
//read info from stable file
- string testfile = m->getTestFilePath() + "testFile.fasta";
+ //string testfile = m->getTestFilePath() + "testFile.fasta";
+ string testfile ="/Users/sarahwestcott/Desktop/mothur/TestMothur/TestFiles/testFile.fasta";
ifstream in;
m->openInputFile(testfile, in);
@@ -101,15 +90,15 @@ void TestDataSet::fillNames() {
nameMap.clear();
//read info from stable file
- string testfile = m->getTestFilePath() + "testFile.names";
+ string testfile = "/Users/sarahwestcott/Desktop/mothur/TestMothur/TestFiles/testFile.names";
m->readNames(testfile, nameMap);
}
/***********************************************************************/
void TestDataSet::fillGroup() {
if (gMap != NULL) { delete gMap; gMap = NULL; }
//read info from stable file
- string testfile = m->getTestFilePath() + "testFile.groups";
+ string testfile = "/Users/sarahwestcott/Desktop/mothur/TestMothur/TestFiles/testFile.groups";
gMap = new GroupMap();
gMap->readMap(testfile);
@@ -120,7 +109,7 @@ void TestDataSet::fillLookup() {
lookup.clear();
//read info from stable file
- string testfile = m->getTestFilePath() + "testFile.opti_mcc.shared";
+ string testfile = "/Users/sarahwestcott/Desktop/mothur/TestMothur/TestFiles/testFile.opti_mcc.shared";
InputData input(testfile, "sharedfile");
lookup = input.getSharedRAbundVectors();
View
@@ -25,7 +25,8 @@ class TestDataSet {
GroupMap* getGroupMap() { fillGroup(); return gMap; }
CountTable* getCountTable() { createCountTable(); return ct; }
vector<SharedRAbundVector*> getLookup() { fillLookup(); return lookup; }
- vector<string> getSubsetFNGFiles(int); //number of uniques, Fasta, name, group returned
+ vector<string> getSubsetFNGFiles(); //Fasta, name, group returned - containing 100 seqs
+ string getSubsetFNGDistFile();
private:
MothurOut* m;
@@ -6,8 +6,8 @@
/***********************************************************************/
DistCDataSet::DistCDataSet() {
m = MothurOut::getInstance();
- columnFile = m->getTestFilePath() + "stability.MISeq_SOP.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.pick.dist";
- countFile = m->getTestFilePath() + "stability.count_table";
+ columnFile = "/Users/sarahwestcott/Desktop/mothur/TestMothur/TestFiles/stability.MISeq_SOP.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.pick.dist";
+ countFile = "/Users/sarahwestcott/Desktop/mothur/TestMothur/TestFiles/stability.count_table";
}
/***********************************************************************/
vector<string> DistCDataSet::getFiles(int numSeqs) {
@@ -11,6 +11,6 @@
/***********************************************************************/
DistPDataSet::DistPDataSet() {
m = MothurOut::getInstance();
- phylipFile = m->getTestFilePath() + "stability.MISeq_SOP.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.pick.phylip.dist";
+ phylipFile = "/Users/sarahwestcott/Desktop/mothur/TestMothur/TestFiles/stability.MISeq_SOP.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.pick.phylip.dist";
}
/***********************************************************************/
@@ -0,0 +1,28 @@
+//
+// fakemcc.hpp
+// Mothur
+//
+// Created by Sarah Westcott on 4/18/17.
+// Copyright © 2017 Schloss Lab. All rights reserved.
+//
+
+#ifndef fakemcc_hpp
+#define fakemcc_hpp
+
+#include "mothurout.h"
+
+
+class FakeClusterCalcValues {
+
+public:
+
+ FakeClusterCalcValues() { tp = 823; tn = 1944106; fp = 95; fn = 354; }
+ ~FakeClusterCalcValues() {}
+
+ long long tp, tn, fp, fn;
+};
+
+
+
+#endif /* fakemcc_hpp */
+
@@ -0,0 +1,54 @@
+//
+// fakeoligos.h
+// Mothur
+//
+// Created by Sarah Westcott on 5/1/17.
+// Copyright © 2017 Schloss Lab. All rights reserved.
+//
+
+#ifndef fakeoligos_h
+#define fakeoligos_h
+
+#include "mothurout.h"
+
+
+class FakeOligos {
+
+public:
+
+ FakeOligos() {
+ bdiffs=1; pdiffs=2; rdiffs=0; ldiffs=0; sdiffs=0;
+
+ //single
+ primers["CCGTCAATTCMTTTRAGT"] = 0;
+ barcodes["AATGGTAC"] = 0; //F003D000
+ barcodes["AACCTGGC"] = 1; //F003D002
+ barcodes["TTCGTGGC"] = 2; //F003D004
+ barcodes["TTCTTGAC"] = 3; //F003D006
+ barcodes["TTCGCGAC"] = 4; //F003D008
+ barcodes["TCCAGAAC"] = 5; //F003D142
+ barcodes["AAGGCCTC"] = 6; //F003D144
+ barcodes["TGACCGTC"] = 7; //F003D146
+ barcodes["AGGTTGTC"] = 8; //F003D148
+ barcodes["TGGTGAAC"] = 9; //F003D150
+ barcodes["AACCGTGTC"] = 10; //MOCK.GQY1XT001
+
+
+ }
+ ~FakeOligos() {}
+
+ int bdiffs, pdiffs, rdiffs, ldiffs, sdiffs;
+ map<string, int> barcodes;
+ map<string, int> primers;
+
+ vector<string> revPrimer;
+ vector<string> linker;
+ vector<string> spacer;
+ map<int, oligosPair> ipbarcodes;
+ map<int, oligosPair> ipprimers;
+
+};
+
+
+
+#endif /* fakeoligos_h */
@@ -0,0 +1,42 @@
+//
+// fakeoptimatrix.cpp
+// Mothur
+//
+// Created by Sarah Westcott on 4/20/17.
+// Copyright © 2017 Schloss Lab. All rights reserved.
+//
+
+#include "fakeoptimatrix.hpp"
+
+/***********************************************************************/
+FakeOptiMatrix::FakeOptiMatrix() : OptiMatrix() {
+ try {
+ m = MothurOut::getInstance();
+
+ //create 10 singletons
+ for (int i = 90; i < 100; i++) { singletons.push_back(toString(i)); }
+
+ //create 90 non singletons
+ for (int i = 0; i < 90; i++) { nameMap.push_back(toString(i)); }
+
+ closeness.resize(90);
+ int count = 0;
+ for (int i = 0; i < 9; i++) {
+ set<int> close;
+ //create list of all sequences in this set
+ for (int j = 0; j < 10; j++) { close.insert((j+count)); }
+
+ for (set<int>::iterator it = close.begin(); it != close.end(); it++) {
+ //add close sequences to each sequence in this set, do not include self
+ for (int j = 0; j < 10; j++) { if ((j+count) != *it) { closeness[j+count].insert(*it); } }
+ }
+ count += 10;
+ }
+ }
+ catch(exception& e) {
+ m->errorOut(e, "FakeOptiMatrix", "FakeOptiMatrix");
+ exit(1);
+ }
+}
+/***********************************************************************/
+
Oops, something went wrong.