5 // Created by SarahsWork on 10/28/13.
6 // Copyright (c) 2013 Schloss Lab. All rights reserved.
9 #ifndef Mothur_sracommand_h
10 #define Mothur_sracommand_h
12 #include "command.hpp"
13 #include "trimoligos.h"
15 /**************************************************************************************************/
17 class SRACommand : public Command {
23 vector<string> setParameters();
24 string getCommandName() { return "sra"; }
25 string getCommandCategory() { return "Sequence Processing"; }
27 string getOutputPattern(string);
29 string getHelpString();
30 string getCitation() { return "http://www.mothur.org/wiki/sra"; }
31 string getDescription() { return "create a Sequence Read Archive / SRA"; }
34 void help() { m->mothurOut(getHelpString()); }
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, string> Group2Barcode;
47 map<string, 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>
51 bool checkCasesInstrumentModels(string&);
52 bool checkCasesPlatforms(string&);
53 bool checkCasesLibStrategy(string&);
54 bool checkCasesLibSource(string&);
55 bool checkCasesLibSelection(string&);
56 bool checkCasesDataType(string&);
57 bool sanityCheckMiMarksGroups();
58 int readFile(map<string, vector<string> >&);
59 int readContactFile();
60 int readMIMarksFile();
62 int parseSffFile(map<string, vector<string> >&);
63 int parseFastqFile(map<string, vector<string> >&);
64 int checkGroups(map<string, vector<string> >&);
65 int mapGroupToFile(map<string, vector<string> >&, vector<string>);
66 string reverseOligo(string oligo);
70 /**************************************************************************************************/