]> git.donarmstrong.com Git - mothur.git/blob - shhhercommand.h
added command descriptions
[mothur.git] / shhhercommand.h
1 #ifndef SHHHER_H
2 #define SHHHER_H
3
4 /*
5  *  shhher.h
6  *  Mothur
7  *
8  *  Created by Pat Schloss on 12/27/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12
13 #include "mothur.h"
14 #include "command.hpp"
15
16
17 class ShhherCommand : public Command {
18         
19 public:
20         ShhherCommand(string);
21         ShhherCommand();
22         ~ShhherCommand() {}
23         
24         vector<string> setParameters();
25         string getCommandName()                 { return "shhh.seqs";   }
26         string getCommandCategory()             { return "Hidden";              }
27         string getHelpString(); 
28         string getCitation() { return "no citation"; }
29         string getDescription()         { return "shhh.seqs"; }
30
31         
32         int execute(); 
33         void help() { m->mothurOut(getHelpString()); }          
34 private:
35         
36         int abort;
37         
38         string outputDir, flowFileName, flowFilesFileName, lookupFileName, compositeFASTAFileName, compositeNamesFileName;
39
40         int processors, maxIters;
41         float cutoff, sigma, minDelta;
42         string flowOrder;
43         
44         vector<int> nSeqsBreaks;
45         vector<int> nOTUsBreaks;
46         vector<double> singleLookUp;
47         vector<double> jointLookUp;
48         
49         vector<string> seqNameVector;
50         vector<int> lengths;
51         vector<short> flowDataIntI;
52         vector<double> flowDataPrI;
53         map<string, int> nameMap;
54         vector<int> otuData;
55         vector<int> cumNumSeqs;
56         vector<int> nSeqsPerOTU;
57         vector<vector<int> > aaP;       //tMaster->aanP:        each row is a different otu / each col contains the sequence indices
58         vector<vector<int> > aaI;       //tMaster->aanI:        that are in each otu - can't differentiate between aaP and aaI 
59         vector<int> seqNumber;          //tMaster->anP:         the sequence id number sorted by OTU
60         vector<int> seqIndex;           //tMaster->anI;         the index that corresponds to seqNumber
61         vector<double> dist;            //adDist - distance of sequences to centroids
62         vector<short> change;           //did the centroid sequence change? 0 = no; 1 = yes
63         vector<int> centroids;          //the representative flowgram for each cluster m
64         vector<double> weight;
65         vector<double> singleTau;       //tMaster->adTau:       1-D Tau vector (1xnumSeqs)
66         vector<short> uniqueFlowgrams;
67         vector<int> uniqueCount;
68         vector<int> mapSeqToUnique;
69         vector<int> mapUniqueToSeq;
70         vector<int> uniqueLengths;
71
72         vector<string> outputNames;
73
74         int numSeqs, numUniques, numOTUs, numFlowCells;
75         
76         void getSingleLookUp();
77         void getJointLookUp();
78         void getFlowData();
79         void getUniques();
80         double getProbIntensity(int);
81         float calcPairwiseDist(int, int);
82         void flowDistParentFork(string, int, int);
83         
84         string createDistFile(int);
85         string createNamesFile();
86         string cluster(string, string);
87         
88         void getOTUData(string);
89         void initPyroCluster();
90         void fill();
91         void calcCentroids();
92         void calcCentroidsDriver(int, int);
93         double getDistToCentroid(int, int, int);
94         double getNewWeights();
95         double getLikelihood();
96         void checkCentroids();
97         void calcNewDistances();
98         void calcNewDistancesParent(int, int);
99         void calcNewDistancesChild(int, int, vector<int>&, vector<int>&, vector<double>&);
100
101
102         void setOTUs();
103         void writeQualities(vector<int>);
104         void writeSequences(vector<int>);
105         void writeNames(vector<int>);
106         void writeGroups();
107         void writeClusters(vector<int>);
108
109         
110 #ifdef USE_MPI
111         string flowDistMPI(int, int);
112         void calcNewDistancesChildMPI(int, int, vector<int>&);
113
114         int pid, ncpus; 
115 #endif
116         
117 };
118
119
120 #endif
121