File: renameseqscommand.h

package info (click to toggle)
mothur 1.48.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,684 kB
  • sloc: cpp: 161,854; makefile: 122; sh: 31
file content (61 lines) | stat: -rwxr-xr-x 1,607 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//
//  renameseqscommand.h
//  Mothur
//
//  Created by SarahsWork on 5/28/13.
//  Copyright (c) 2013 Schloss Lab. All rights reserved.
//

#ifndef Mothur_renameseqscommand_h
#define Mothur_renameseqscommand_h

#include "command.hpp"
#include "filefile.hpp"

class RenameSeqsCommand : public Command {
    
#ifdef UNIT_TEST
    friend class TestRenameSeqsCommand;
#endif
    
public:
	RenameSeqsCommand(string);
	~RenameSeqsCommand() = default;
	
	vector<string> setParameters();
	string getCommandName()			{ return "rename.seqs";		}
	string getCommandCategory()		{ return "Sequence Processing";		}
	
	string getHelpString();
    string getOutputPattern(string);
	string getCitation() { return "http://www.mothur.org/wiki/Rename.seqs"; }
	string getDescription()		{ return "rename sequences"; }
    
	
	int execute();
	void help() { m->mothurOut(getHelpString()); }
	
	
private:
    
	string fastaFile, fastqfile, listfile, nameFile, groupfile,  placement, delim, countfile, qualfile, contigsfile, fileFile, mapFile, taxfile, groupName;
	vector<string> outputNames;
	bool abort, ignoreNew, gz;
	
	map<string, string> nameMap;
    void readQual(map<string, string>&);
    void readTax(map<string, string>&);
    void readContigs(map<string, string>&);
    void readList(map<string, string>&);
    void readFasta(map<string, string>&);
    string readFastq(map<string, string>&);
    int processFile();
    int readMapFile(map<string, string>&);
    vector< vector<string> > readFiles(vector<string>&, bool&);
    void processNameGroupCountFiles(map<string, string>&, map<string, string>&);
    
};



#endif