]> git.donarmstrong.com Git - mothur.git/blob - deconvolutecommand.h
have make contigs use \r instead of \n
[mothur.git] / deconvolutecommand.h
1 #ifndef DECONVOLUTECOMMAND_H
2 #define DECONVOLUTECOMMAND_H
3 /*
4  *  deconvolute.h
5  *  Mothur
6  *
7  *  Created by Sarah Westcott on 1/21/09.
8  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
9  *
10  */
11
12 #include "command.hpp"
13 #include "fastamap.h"
14 #include "counttable.h"
15 #include "sequence.hpp"
16
17 /* The unique.seqs command reads a fasta file, finds the duplicate sequences and outputs a names file
18         containing 2 columns.  The first being the groupname and the second the list of identical sequence names. */ 
19
20
21 class DeconvoluteCommand : public Command {
22
23 public:
24         DeconvoluteCommand(string);
25         DeconvoluteCommand();
26         ~DeconvoluteCommand() {}
27         
28         vector<string> setParameters();
29         string getCommandName()                 { return "unique.seqs";         }
30         string getCommandCategory()             { return "Sequence Processing";         }
31     
32         string getHelpString(); 
33     string getOutputPattern(string);    
34         string getCitation() { return "http://www.mothur.org/wiki/Unique.seqs"; }
35         string getDescription()         { return "creates a fasta containing the unique sequences as well as a namesfile with the names each sequence represents"; }
36
37         
38         int execute(); 
39         void help() { m->mothurOut(getHelpString()); }  
40         
41         
42 private:
43         string inFastaName, oldNameMapFName, outputDir, countfile;
44         vector<string> outputNames;
45
46         bool abort;
47 };
48
49 multimap<size_t,std::pair<std::streampos,string>>::iterator
50   in_fasta_from_hash_map(multimap<size_t,pair<streampos,string>>&,
51                             Sequence&,
52                             ifstream&);
53
54 pair<bool,streampos> store_filepos(ifstream&);
55 void restore_filepos(ifstream&, pair<bool,streampos>&);
56 streampos reliable_tellg(ifstream&);
57
58 string primary_seqname(string);
59
60 #endif