]> git.donarmstrong.com Git - mothur.git/commitdiff
mods to trim.seqs
authorpschloss <pschloss>
Wed, 9 Feb 2011 20:22:07 +0000 (20:22 +0000)
committerpschloss <pschloss>
Wed, 9 Feb 2011 20:22:07 +0000 (20:22 +0000)
Mothur.xcodeproj/project.pbxproj
trimseqscommand.cpp
trimseqscommand.h

index 49131e51c60f5cc5d5dcf6aec23a7c86dd51f4d4..6d6393fbd3e5e323fb78a83df4ab6bc711da3b55 100644 (file)
                        attributes = {
                                ORGANIZATIONNAME = "Schloss Lab";
                        };
-                       buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "mothur" */;
+                       buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "Mothur" */;
                        compatibilityVersion = "Xcode 3.1";
                        developmentRegion = English;
                        hasScannedForEncodings = 1;
                        defaultConfigurationIsVisible = 0;
                        defaultConfigurationName = Release;
                };
-               1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "mothur" */ = {
+               1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "Mothur" */ = {
                        isa = XCConfigurationList;
                        buildConfigurations = (
                                1DEB928A08733DD80010E9CD /* Debug */,
index 2ad4f0607a24c23506109745553d608544a43d6c..7f82366331830baf3ca6640b2af83073662ec9f6 100644 (file)
@@ -14,7 +14,7 @@
 
 vector<string> TrimSeqsCommand::getValidParameters(){  
        try {
-               string Array[] =  {"fasta", "flip", "oligos", "maxambig", "maxhomop", "group","minlength", "maxlength", "qfile", 
+               string Array[] =  {"fasta", "flip", "oligos", "maxambig", "maxhomop","minlength", "maxlength", "qfile", 
                                                                        "qthreshold", "qwindowaverage", "qstepsize", "qwindowsize", "qaverage", "rollaverage",
                                                                        "keepfirst", "removelast",
                                                                        "allfiles", "qtrim","tdiffs", "pdiffs", "bdiffs", "processors", "outputdir","inputdir"};
@@ -35,7 +35,6 @@ TrimSeqsCommand::TrimSeqsCommand(){
                vector<string> tempOutNames;
                outputTypes["fasta"] = tempOutNames;
                outputTypes["qual"] = tempOutNames;
-               outputTypes["group"] = tempOutNames;
        }
        catch(exception& e) {
                m->errorOut(e, "TrimSeqsCommand", "TrimSeqsCommand");
@@ -83,7 +82,7 @@ TrimSeqsCommand::TrimSeqsCommand(string option)  {
                
                else {
                        //valid paramters for this command
-                       string AlignArray[] =  {        "fasta", "flip", "oligos", "maxambig", "maxhomop", "group","minlength", "maxlength", "qfile", 
+                       string AlignArray[] =  {        "fasta", "flip", "oligos", "maxambig", "maxhomop", "minlength", "maxlength", "qfile", 
                                                                "qthreshold", "qwindowaverage", "qstepsize", "qwindowsize", "qaverage", "rollaverage",
                                                                "keepfirst", "removelast",
                                                                "allfiles", "qtrim","tdiffs", "pdiffs", "bdiffs", "processors", "outputdir","inputdir"};
@@ -105,7 +104,6 @@ TrimSeqsCommand::TrimSeqsCommand(string option)  {
                        vector<string> tempOutNames;
                        outputTypes["fasta"] = tempOutNames;
                        outputTypes["qual"] = tempOutNames;
-                       outputTypes["group"] = tempOutNames;
                        
                        //if the user changes the input directory command factory will send this info to us in the output parameter 
                        string inputDir = validParameter.validFile(parameters, "inputdir", false);              
@@ -136,13 +134,6 @@ TrimSeqsCommand::TrimSeqsCommand(string option)  {
                                        if (path == "") {       parameters["qfile"] = inputDir + it->second;            }
                                }
                                
-                               it = parameters.find("group");
-                               //user has given a template file
-                               if(it != parameters.end()){ 
-                                       path = m->hasPath(it->second);
-                                       //if the user has not given a path then, add inputdir. else leave path alone.
-                                       if (path == "") {       parameters["group"] = inputDir + it->second;            }
-                               }
                        }
 
                        
@@ -170,10 +161,6 @@ TrimSeqsCommand::TrimSeqsCommand(string option)  {
                        else if(temp == "not open"){    abort = true;   } 
                        else                                    {       oligoFile = temp;               }
                        
-                       temp = validParameter.validFile(parameters, "group", true);
-                       if (temp == "not found"){       groupfile = "";         }
-                       else if(temp == "not open"){    abort = true;   } 
-                       else                                    {       groupfile = temp;               }
                        
                        temp = validParameter.validFile(parameters, "maxambig", false);         if (temp == "not found") { temp = "-1"; }
                        convert(temp, maxAmbig);  
@@ -268,9 +255,8 @@ void TrimSeqsCommand::help(){
        try {
                m->mothurOut("The trim.seqs command reads a fastaFile and creates 2 new fasta files, .trim.fasta and scrap.fasta, as well as group files if you provide and oligos file.\n");
                m->mothurOut("The .trim.fasta contains sequences that meet your requirements, and the .scrap.fasta contains those which don't.\n");
-               m->mothurOut("The trim.seqs command parameters are fasta, flip, oligos, group, maxambig, maxhomop, minlength, maxlength, qfile, qthreshold, qaverage, diffs, qtrim, keepfirst, removelast and allfiles.\n");
+               m->mothurOut("The trim.seqs command parameters are fasta, flip, oligos, maxambig, maxhomop, minlength, maxlength, qfile, qthreshold, qaverage, diffs, qtrim, keepfirst, removelast and allfiles.\n");
                m->mothurOut("The fasta parameter is required.\n");
-               m->mothurOut("The group parameter allows you to enter a group file for your fasta file.\n");
                m->mothurOut("The flip parameter will output the reverse compliment of your trimmed sequence. The default is false.\n");
                m->mothurOut("The oligos parameter allows you to provide an oligos file.\n");
                m->mothurOut("The maxambig parameter allows you to set the maximum number of ambigious bases allowed. The default is -1.\n");
index e4c2e0b6748eb6c795c8a171e1f1e8a6fb380f6f..d43eaa484aad5be4403d7967a6abda1e066a127c 100644 (file)
@@ -38,7 +38,7 @@ private:
                linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
        };
        
-       void getOligos(vector<string>&, vector<string>&);
+       void getOligos(vector<vector<string> >&, vector<vector<string> >&);
        int stripBarcode(Sequence&, QualityScores&, int&);
        int stripForward(Sequence&, QualityScores&, int&);
        bool stripReverse(Sequence&, QualityScores&);
@@ -67,13 +67,15 @@ private:
        map<string, int> primers;
        map<string, int> combos;
        map<string, int> groupToIndex;
-       
+       vector<string> primerNameVector;        //needed here?
+       vector<string> barcodeNameVector;       //needed here?
+
        vector<int> processIDS;   //processid
        vector<linePair*> lines;
        vector<linePair*> qLines;
        
-       int driverCreateTrim(string, string, string, string, string, string, string, vector<string>, vector<string>, linePair*, linePair*);     
-       int createProcessesCreateTrim(string, string, string, string, string, string, string, vector<string>, vector<string>);
+       int driverCreateTrim(string, string, string, string, string, string, string, vector<vector<string> >, vector<vector<string> >, linePair*, linePair*);   
+       int createProcessesCreateTrim(string, string, string, string, string, string, string, vector<vector<string> >, vector<vector<string> >);
        int setLines(string, string, vector<unsigned long int>&, vector<unsigned long int>&);
 };