1 #ifndef DECONVOLUTECOMMAND_H
2 #define DECONVOLUTECOMMAND_H
7 * Created by Sarah Westcott on 1/21/09.
8 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
12 #include "command.hpp"
14 #include "counttable.h"
15 #include "sequence.hpp"
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. */
21 class DeconvoluteCommand : public Command {
24 DeconvoluteCommand(string);
26 ~DeconvoluteCommand() {}
28 vector<string> setParameters();
29 string getCommandName() { return "unique.seqs"; }
30 string getCommandCategory() { return "Sequence Processing"; }
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"; }
39 void help() { m->mothurOut(getHelpString()); }
43 string inFastaName, oldNameMapFName, outputDir, countfile;
44 vector<string> outputNames;
49 multimap<size_t,std::pair<std::streampos,string>>::iterator
50 in_fasta_from_hash_map(multimap<size_t,pair<streampos,string>>&,
54 pair<bool,streampos> store_filepos(ifstream&);
55 void restore_filepos(ifstream&, pair<bool,streampos>&);
56 streampos reliable_tellg(ifstream&);
58 string primary_seqname(string);