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"
16 /**************************************************************************************************/
18 class SRACommand : public Command {
24 vector<string> setParameters();
25 string getCommandName() { return "sra"; }
26 string getCommandCategory() { return "Sequence Processing"; }
28 string getOutputPattern(string);
30 string getHelpString();
31 string getCitation() { return "http://www.mothur.org/wiki/sra"; }
32 string getDescription() { return "create a Sequence Read Archive / SRA"; }
35 void help() { m->mothurOut(getHelpString()); }
38 bool abort, isSFF, pairedOligos;
39 int tdiffs, bdiffs, pdiffs, sdiffs, ldiffs;
40 string sfffile, fastqfile, outputDir, file, oligosfile, contactfile, inputfile, mimarksfile;
41 string libStrategy, libSource, libSelection, libLayout, platform, instrumentModel, fileType, dataType, checkorient;
42 string submissionName, lastName, firstName, email, centerName, centerType, description, website, orientation, packageType;
43 string projectName, grantId, grantTitle, grantAgency, projectTitle, inputDir;
44 vector<string> outputNames, Groups;
45 map<string, vector<string> > Group2Barcode;
46 map<string, vector<string> > Group2Primer;
47 map<string, string> Group2Organism;
48 map<string, map<string, string> > mimarks; //group -> <field -> valueForGroup> ex. F003D001 -> <lat_lon -> 42.282026 -83.733850>
49 set<string> uniqueNames;
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 /**************************************************************************************************/