]> git.donarmstrong.com Git - mothur.git/blob - sracommand.h
6c30bd9a4623dcc90dc693fef8e68a7c150ea3e5
[mothur.git] / sracommand.h
1 //
2 //  sracommand.h
3 //  Mothur
4 //
5 //  Created by SarahsWork on 10/28/13.
6 //  Copyright (c) 2013 Schloss Lab. All rights reserved.
7 //
8
9 #ifndef Mothur_sracommand_h
10 #define Mothur_sracommand_h
11
12 #include "command.hpp"
13 #include "trimoligos.h"
14
15 /**************************************************************************************************/
16
17 class SRACommand : public Command {
18 public:
19     SRACommand(string);
20     SRACommand();
21     ~SRACommand(){}
22     
23     vector<string> setParameters();
24     string getCommandName()                     { return "sra";                 }
25     string getCommandCategory()         { return "Sequence Processing";         }
26     
27     string getOutputPattern(string);
28     
29         string getHelpString();
30     string getCitation() { return "http://www.mothur.org/wiki/sra"; }
31     string getDescription()             { return "create a Sequence Read Archive / SRA"; }
32     
33     int execute();
34     void help() { m->mothurOut(getHelpString()); }
35     
36 private:
37     bool abort, isSFF, pairedOligos;
38     int tdiffs, bdiffs, pdiffs, sdiffs, ldiffs;
39     string sfffile, fastqfile, outputDir, file, oligosfile, contactfile, inputfile, mimarksfile;
40     string libStrategy, libSource, libSelection, libLayout, platform, instrumentModel, fileType, dataType;
41     string submissionName, lastName, firstName, email, centerName, centerType, description, website, orientation, packageType;
42     string projectName, grantId, grantTitle, grantAgency, projectTitle;
43     vector<string> outputNames, Groups;
44     vector<string> primerNameVector;
45     vector<string> barcodeNameVector;
46     map<string, vector<string> > Group2Barcode;
47     map<string, vector<string> > Group2Primer;
48     map<string, string> Group2Organism;
49     map<string, map<string, string> > mimarks;  //group -> <field -> valueForGroup> ex.  F003D001 -> <lat_lon -> 42.282026 -83.733850>
50     set<string> uniqueNames;
51
52     bool checkCasesInstrumentModels(string&);
53     bool checkCasesPlatforms(string&);
54     bool checkCasesLibStrategy(string&);
55     bool checkCasesLibSource(string&);
56     bool checkCasesLibSelection(string&);
57     bool checkCasesDataType(string&);
58     bool sanityCheckMiMarksGroups();
59     int readFile(map<string, vector<string> >&);
60     int readContactFile();
61     int readMIMarksFile();
62     int readOligos();
63     int parseSffFile(map<string, vector<string> >&);
64     int parseFastqFile(map<string, vector<string> >&);
65     int checkGroups(map<string, vector<string> >&);
66     int mapGroupToFile(map<string, vector<string> >&, vector<string>);
67     string reverseOligo(string oligo);
68     
69 };
70
71 /**************************************************************************************************/
72
73
74
75 #endif