5 * Created by westcott on 7/7/10.
6 * Copyright 2010 Schloss Lab. All rights reserved.
10 #include "sffinfocommand.h"
11 #include "endiannessmacros.h"
13 //**********************************************************************************************************************
14 vector<string> SffInfoCommand::getValidParameters(){
16 string Array[] = {"sff","qfile","fasta","flow","trim","accnos","sfftxt","outputdir","inputdir", "outputdir"};
17 vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
21 m->errorOut(e, "SffInfoCommand", "getValidParameters");
25 //**********************************************************************************************************************
26 SffInfoCommand::SffInfoCommand(){
28 //initialize outputTypes
29 vector<string> tempOutNames;
30 outputTypes["fasta"] = tempOutNames;
31 outputTypes["flow"] = tempOutNames;
32 outputTypes["sfftxt"] = tempOutNames;
33 outputTypes["qual"] = tempOutNames;
36 m->errorOut(e, "SffInfoCommand", "SffInfoCommand");
40 //**********************************************************************************************************************
41 vector<string> SffInfoCommand::getRequiredParameters(){
43 string Array[] = {"sff"};
44 vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
48 m->errorOut(e, "SffInfoCommand", "getRequiredParameters");
52 //**********************************************************************************************************************
53 vector<string> SffInfoCommand::getRequiredFiles(){
55 vector<string> myArray;
59 m->errorOut(e, "SffInfoCommand", "getRequiredFiles");
63 //**********************************************************************************************************************
65 SffInfoCommand::SffInfoCommand(string option) {
70 //allow user to run help
71 if(option == "help") { help(); abort = true; }
74 //valid paramters for this command
75 string Array[] = {"sff","qfile","fasta","flow","trim","accnos","sfftxt","outputdir","inputdir", "outputdir"};
76 vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
78 OptionParser parser(option);
79 map<string, string> parameters = parser.getParameters();
81 ValidParameters validParameter;
82 //check to make sure all parameters are valid for command
83 for (map<string,string>::iterator it = parameters.begin(); it != parameters.end(); it++) {
84 if (validParameter.isValidParameter(it->first, myArray, it->second) != true) { abort = true; }
87 //initialize outputTypes
88 vector<string> tempOutNames;
89 outputTypes["fasta"] = tempOutNames;
90 outputTypes["flow"] = tempOutNames;
91 outputTypes["sfftxt"] = tempOutNames;
92 outputTypes["qual"] = tempOutNames;
94 //if the user changes the output directory command factory will send this info to us in the output parameter
95 outputDir = validParameter.validFile(parameters, "outputdir", false); if (outputDir == "not found"){ outputDir = ""; }
97 //if the user changes the input directory command factory will send this info to us in the output parameter
98 string inputDir = validParameter.validFile(parameters, "inputdir", false); if (inputDir == "not found"){ inputDir = ""; }
100 sffFilename = validParameter.validFile(parameters, "sff", false);
101 if (sffFilename == "not found") { m->mothurOut("sff is a required parameter for the sffinfo command."); m->mothurOutEndLine(); abort = true; }
103 m->splitAtDash(sffFilename, filenames);
105 //go through files and make sure they are good, if not, then disregard them
106 for (int i = 0; i < filenames.size(); i++) {
107 if (inputDir != "") {
108 string path = m->hasPath(filenames[i]);
109 //if the user has not given a path then, add inputdir. else leave path alone.
110 if (path == "") { filenames[i] = inputDir + filenames[i]; }
114 int ableToOpen = m->openInputFile(filenames[i], in, "noerror");
116 //if you can't open it, try default location
117 if (ableToOpen == 1) {
118 if (m->getDefaultPath() != "") { //default path is set
119 string tryPath = m->getDefaultPath() + m->getSimpleName(filenames[i]);
120 m->mothurOut("Unable to open " + filenames[i] + ". Trying default " + tryPath); m->mothurOutEndLine();
121 ableToOpen = m->openInputFile(tryPath, in, "noerror");
122 filenames[i] = tryPath;
126 //if you can't open it, try default location
127 if (ableToOpen == 1) {
128 if (m->getOutputDir() != "") { //default path is set
129 string tryPath = m->getOutputDir() + m->getSimpleName(filenames[i]);
130 m->mothurOut("Unable to open " + filenames[i] + ". Trying output directory " + tryPath); m->mothurOutEndLine();
131 ableToOpen = m->openInputFile(tryPath, in, "noerror");
132 filenames[i] = tryPath;
138 if (ableToOpen == 1) {
139 m->mothurOut("Unable to open " + filenames[i] + ". It will be disregarded."); m->mothurOutEndLine();
140 //erase from file list
141 filenames.erase(filenames.begin()+i);
146 //make sure there is at least one valid file left
147 if (filenames.size() == 0) { m->mothurOut("no valid files."); m->mothurOutEndLine(); abort = true; }
150 accnosName = validParameter.validFile(parameters, "accnos", false);
151 if (accnosName == "not found") { accnosName = ""; }
154 m->splitAtDash(accnosName, accnosFileNames);
156 //go through files and make sure they are good, if not, then disregard them
157 for (int i = 0; i < accnosFileNames.size(); i++) {
158 if (inputDir != "") {
159 string path = m->hasPath(accnosFileNames[i]);
160 //if the user has not given a path then, add inputdir. else leave path alone.
161 if (path == "") { accnosFileNames[i] = inputDir + accnosFileNames[i]; }
165 int ableToOpen = m->openInputFile(accnosFileNames[i], in, "noerror");
167 //if you can't open it, try default location
168 if (ableToOpen == 1) {
169 if (m->getDefaultPath() != "") { //default path is set
170 string tryPath = m->getDefaultPath() + m->getSimpleName(accnosFileNames[i]);
171 m->mothurOut("Unable to open " + accnosFileNames[i] + ". Trying default " + tryPath); m->mothurOutEndLine();
172 ableToOpen = m->openInputFile(tryPath, in, "noerror");
173 accnosFileNames[i] = tryPath;
176 //if you can't open it, try default location
177 if (ableToOpen == 1) {
178 if (m->getOutputDir() != "") { //default path is set
179 string tryPath = m->getOutputDir() + m->getSimpleName(accnosFileNames[i]);
180 m->mothurOut("Unable to open " + accnosFileNames[i] + ". Trying output directory " + tryPath); m->mothurOutEndLine();
181 ableToOpen = m->openInputFile(tryPath, in, "noerror");
182 accnosFileNames[i] = tryPath;
187 if (ableToOpen == 1) {
188 m->mothurOut("Unable to open " + accnosFileNames[i] + ". It will be disregarded."); m->mothurOutEndLine();
189 //erase from file list
190 accnosFileNames.erase(accnosFileNames.begin()+i);
195 //make sure there is at least one valid file left
196 if (accnosFileNames.size() == 0) { m->mothurOut("no valid files."); m->mothurOutEndLine(); abort = true; }
200 if (accnosFileNames.size() != filenames.size()) { abort = true; m->mothurOut("If you provide a accnos file, you must have one for each sff file."); m->mothurOutEndLine(); }
203 string temp = validParameter.validFile(parameters, "qfile", false); if (temp == "not found"){ temp = "T"; }
204 qual = m->isTrue(temp);
206 temp = validParameter.validFile(parameters, "fasta", false); if (temp == "not found"){ temp = "T"; }
207 fasta = m->isTrue(temp);
209 temp = validParameter.validFile(parameters, "flow", false); if (temp == "not found"){ temp = "F"; }
210 flow = m->isTrue(temp);
212 temp = validParameter.validFile(parameters, "trim", false); if (temp == "not found"){ temp = "T"; }
213 trim = m->isTrue(temp);
215 temp = validParameter.validFile(parameters, "sfftxt", false); if (temp == "not found"){ temp = "F"; }
216 sfftxt = m->isTrue(temp);
219 catch(exception& e) {
220 m->errorOut(e, "SffInfoCommand", "SffInfoCommand");
224 //**********************************************************************************************************************
226 void SffInfoCommand::help(){
228 m->mothurOut("The sffinfo command reads a sff file and extracts the sequence data.\n");
229 m->mothurOut("The sffinfo command parameters are sff, fasta, qfile, accnos, flow, sfftxt, and trim. sff is required. \n");
230 m->mothurOut("The sff parameter allows you to enter the sff file you would like to extract data from. You may enter multiple files by separating them by -'s.\n");
231 m->mothurOut("The fasta parameter allows you to indicate if you would like a fasta formatted file generated. Default=True. \n");
232 m->mothurOut("The qfile parameter allows you to indicate if you would like a quality file generated. Default=True. \n");
233 m->mothurOut("The flow parameter allows you to indicate if you would like a flowgram file generated. Default=False. \n");
234 m->mothurOut("The sfftxt parameter allows you to indicate if you would like a sff.txt file generated. Default=False. \n");
235 m->mothurOut("The trim parameter allows you to indicate if you would like a sequences and quality scores trimmed to the clipQualLeft and clipQualRight values. Default=True. \n");
236 m->mothurOut("The accnos parameter allows you to provide a accnos file containing the names of the sequences you would like extracted. You may enter multiple files by separating them by -'s. \n");
237 m->mothurOut("Example sffinfo(sff=mySffFile.sff, trim=F).\n");
238 m->mothurOut("Note: No spaces between parameter labels (i.e. sff), '=' and parameters (i.e.yourSffFileName).\n\n");
240 catch(exception& e) {
241 m->errorOut(e, "SffInfoCommand", "help");
245 //**********************************************************************************************************************
247 SffInfoCommand::~SffInfoCommand(){}
249 //**********************************************************************************************************************
250 int SffInfoCommand::execute(){
253 if (abort == true) { return 0; }
255 for (int s = 0; s < filenames.size(); s++) {
257 if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
259 int start = time(NULL);
261 m->mothurOut("Extracting info from " + filenames[s] + " ..." ); m->mothurOutEndLine();
264 if (hasAccnos) { accnos = accnosFileNames[s]; }
266 int numReads = extractSffInfo(filenames[s], accnos);
268 m->mothurOut("It took " + toString(time(NULL) - start) + " secs to extract " + toString(numReads) + ".");
271 if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
273 //report output filenames
274 m->mothurOutEndLine();
275 m->mothurOut("Output File Names: "); m->mothurOutEndLine();
276 for (int i = 0; i < outputNames.size(); i++) { m->mothurOut(outputNames[i]); m->mothurOutEndLine(); }
277 m->mothurOutEndLine();
281 catch(exception& e) {
282 m->errorOut(e, "SffInfoCommand", "execute");
286 //**********************************************************************************************************************
287 int SffInfoCommand::extractSffInfo(string input, string accnos){
290 if (outputDir == "") { outputDir += m->hasPath(input); }
292 if (accnos != "") { readAccnosFile(accnos); }
293 else { seqNames.clear(); }
295 ofstream outSfftxt, outFasta, outQual, outFlow;
296 string outFastaFileName, outQualFileName;
297 string sfftxtFileName = outputDir + m->getRootName(m->getSimpleName(input)) + "sff.txt";
298 string outFlowFileName = outputDir + m->getRootName(m->getSimpleName(input)) + "flow";
300 outFastaFileName = outputDir + m->getRootName(m->getSimpleName(input)) + "fasta";
301 outQualFileName = outputDir + m->getRootName(m->getSimpleName(input)) + "qual";
303 outFastaFileName = outputDir + m->getRootName(m->getSimpleName(input)) + "raw.fasta";
304 outQualFileName = outputDir + m->getRootName(m->getSimpleName(input)) + "raw.qual";
307 if (sfftxt) { m->openOutputFile(sfftxtFileName, outSfftxt); outSfftxt.setf(ios::fixed, ios::floatfield); outSfftxt.setf(ios::showpoint); outputNames.push_back(sfftxtFileName); outputTypes["sfftxt"].push_back(sfftxtFileName); }
308 if (fasta) { m->openOutputFile(outFastaFileName, outFasta); outputNames.push_back(outFastaFileName); outputTypes["fasta"].push_back(outFastaFileName); }
309 if (qual) { m->openOutputFile(outQualFileName, outQual); outputNames.push_back(outQualFileName); outputTypes["qual"].push_back(outQualFileName); }
310 if (flow) { m->openOutputFile(outFlowFileName, outFlow); outputNames.push_back(outFlowFileName); outputTypes["flow"].push_back(outFlowFileName); }
313 in.open(input.c_str(), ios::binary);
316 readCommonHeader(in, header);
320 //check magic number and version
321 if (header.magicNumber != 779314790) { m->mothurOut("Magic Number is not correct, not a valid .sff file"); m->mothurOutEndLine(); return count; }
322 if (header.version != "0001") { m->mothurOut("Version is not supported, only support version 0001."); m->mothurOutEndLine(); return count; }
324 //print common header
325 if (sfftxt) { printCommonHeader(outSfftxt, header); }
327 //read through the sff file
334 readHeader(in, readheader);
338 readSeqData(in, read, header.numFlowsPerRead, readheader.numBases);
340 //if you have provided an accosfile and this seq is not in it, then dont print
341 if (seqNames.size() != 0) { if (seqNames.count(readheader.name) == 0) { print = false; } }
345 if (sfftxt) { printHeader(outSfftxt, readheader); printSffTxtSeqData(outSfftxt, read, readheader); }
346 if (fasta) { printFastaSeqData(outFasta, read, readheader); }
347 if (qual) { printQualSeqData(outQual, read, readheader); }
348 if (flow) { printFlowSeqData(outFlow, read, readheader); }
354 if((count+1) % 10000 == 0){ m->mothurOut(toString(count+1)); m->mothurOutEndLine(); }
356 if (m->control_pressed) { count = 0; break; }
358 if (count >= header.numReads) { break; }
362 if (!m->control_pressed) { if((count) % 10000 != 0){ m->mothurOut(toString(count)); m->mothurOutEndLine(); } }
366 if (sfftxt) { outSfftxt.close(); }
367 if (fasta) { outFasta.close(); }
368 if (qual) { outQual.close(); }
369 if (flow) { outFlow.close(); }
373 catch(exception& e) {
374 m->errorOut(e, "SffInfoCommand", "extractSffInfo");
378 //**********************************************************************************************************************
379 int SffInfoCommand::readCommonHeader(ifstream& in, CommonHeader& header){
387 header.magicNumber = be_int4(*(unsigned int *)(&buffer));
393 for (int i = 0; i < 4; i++) { header.version += toString((int)(buffer9[i])); }
398 header.indexOffset = be_int8(*(unsigned long int *)(&buffer2));
403 header.indexLength = be_int4(*(unsigned int *)(&buffer3));
408 header.numReads = be_int4(*(unsigned int *)(&buffer4));
413 header.headerLength = be_int2(*(unsigned short *)(&buffer5));
418 header.keyLength = be_int2(*(unsigned short *)(&buffer6));
420 //read number of flow reads
423 header.numFlowsPerRead = be_int2(*(unsigned short *)(&buffer7));
428 header.flogramFormatCode = (int)(buffer8[0]);
431 char* tempBuffer = new char[header.numFlowsPerRead];
432 in.read(&(*tempBuffer), header.numFlowsPerRead);
433 header.flowChars = tempBuffer;
434 if (header.flowChars.length() > header.numFlowsPerRead) { header.flowChars = header.flowChars.substr(0, header.numFlowsPerRead); }
438 char* tempBuffer2 = new char[header.keyLength];
439 in.read(&(*tempBuffer2), header.keyLength);
440 header.keySequence = tempBuffer2;
441 if (header.keySequence.length() > header.keyLength) { header.keySequence = header.keySequence.substr(0, header.keyLength); }
442 delete[] tempBuffer2;
445 unsigned long int spotInFile = in.tellg();
446 unsigned long int spot = (spotInFile + 7)& ~7; // ~ inverts
450 m->mothurOut("Error reading sff common header."); m->mothurOutEndLine();
455 catch(exception& e) {
456 m->errorOut(e, "SffInfoCommand", "readCommonHeader");
460 //**********************************************************************************************************************
461 int SffInfoCommand::readHeader(ifstream& in, Header& header){
469 header.headerLength = be_int2(*(unsigned short *)(&buffer));
474 header.nameLength = be_int2(*(unsigned short *)(&buffer2));
479 header.numBases = be_int4(*(unsigned int *)(&buffer3));
481 //read clip qual left
484 header.clipQualLeft = be_int2(*(unsigned short *)(&buffer4));
485 header.clipQualLeft = 5;
487 //read clip qual right
490 header.clipQualRight = be_int2(*(unsigned short *)(&buffer5));
492 //read clipAdapterLeft
495 header.clipAdapterLeft = be_int2(*(unsigned short *)(&buffer6));
497 //read clipAdapterRight
500 header.clipAdapterRight = be_int2(*(unsigned short *)(&buffer7));
503 char* tempBuffer = new char[header.nameLength];
504 in.read(&(*tempBuffer), header.nameLength);
505 header.name = tempBuffer;
506 if (header.name.length() > header.nameLength) { header.name = header.name.substr(0, header.nameLength); }
510 unsigned long int spotInFile = in.tellg();
511 unsigned long int spot = (spotInFile + 7)& ~7;
515 m->mothurOut("Error reading sff header info."); m->mothurOutEndLine();
520 catch(exception& e) {
521 m->errorOut(e, "SffInfoCommand", "readHeader");
525 //**********************************************************************************************************************
526 int SffInfoCommand::readSeqData(ifstream& in, seqRead& read, int numFlowReads, int numBases){
532 read.flowgram.resize(numFlowReads);
533 for (int i = 0; i < numFlowReads; i++) {
536 read.flowgram[i] = be_int2(*(unsigned short *)(&buffer));
540 read.flowIndex.resize(numBases);
541 for (int i = 0; i < numBases; i++) {
544 read.flowIndex[i] = be_int1(*(unsigned char *)(&temp));
548 char* tempBuffer = new char[numBases];
549 in.read(&(*tempBuffer), numBases);
550 read.bases = tempBuffer;
551 if (read.bases.length() > numBases) { read.bases = read.bases.substr(0, numBases); }
555 read.qualScores.resize(numBases);
556 for (int i = 0; i < numBases; i++) {
559 read.qualScores[i] = be_int1(*(unsigned char *)(&temp));
563 unsigned long int spotInFile = in.tellg();
564 unsigned long int spot = (spotInFile + 7)& ~7;
568 m->mothurOut("Error reading."); m->mothurOutEndLine();
573 catch(exception& e) {
574 m->errorOut(e, "SffInfoCommand", "readSeqData");
578 //**********************************************************************************************************************
579 int SffInfoCommand::printCommonHeader(ofstream& out, CommonHeader& header) {
582 out << "Common Header:\nMagic Number: " << header.magicNumber << endl;
583 out << "Version: " << header.version << endl;
584 out << "Index Offset: " << header.indexOffset << endl;
585 out << "Index Length: " << header.indexLength << endl;
586 out << "Number of Reads: " << header.numReads << endl;
587 out << "Header Length: " << header.headerLength << endl;
588 out << "Key Length: " << header.keyLength << endl;
589 out << "Number of Flows: " << header.numFlowsPerRead << endl;
590 out << "Format Code: " << header.flogramFormatCode << endl;
591 out << "Flow Chars: " << header.flowChars << endl;
592 out << "Key Sequence: " << header.keySequence << endl << endl;
596 catch(exception& e) {
597 m->errorOut(e, "SffInfoCommand", "printCommonHeader");
601 //**********************************************************************************************************************
602 int SffInfoCommand::printHeader(ofstream& out, Header& header) {
605 out << ">" << header.name << endl;
606 out << "Run Prefix: " << endl;
607 out << "Region #: " << endl;
608 out << "XY Location: " << endl << endl;
610 out << "Run Name: " << endl;
611 out << "Analysis Name: " << endl;
612 out << "Full Path: " << endl << endl;
614 out << "Read Header Len: " << header.headerLength << endl;
615 out << "Name Length: " << header.nameLength << endl;
616 out << "# of Bases: " << header.numBases << endl;
617 out << "Clip Qual Left: " << header.clipQualLeft << endl;
618 out << "Clip Qual Right: " << header.clipQualRight << endl;
619 out << "Clip Adap Left: " << header.clipAdapterLeft << endl;
620 out << "Clip Adap Right: " << header.clipAdapterRight << endl << endl;
624 catch(exception& e) {
625 m->errorOut(e, "SffInfoCommand", "printHeader");
630 //**********************************************************************************************************************
631 int SffInfoCommand::printSffTxtSeqData(ofstream& out, seqRead& read, Header& header) {
635 for (int i = 0; i < read.flowgram.size(); i++) { out << setprecision(2) << (read.flowgram[i]/(float)100) << '\t'; }
637 out << endl << "Flow Indexes: ";
639 for (int i = 0; i < read.flowIndex.size(); i++) { sum += read.flowIndex[i]; out << sum << '\t'; }
641 //make the bases you want to clip lowercase and the bases you want to keep upper case
642 if(header.clipQualRight == 0){ header.clipQualRight = read.bases.length(); }
643 for (int i = 0; i < (header.clipQualLeft-1); i++) { read.bases[i] = tolower(read.bases[i]); }
644 for (int i = (header.clipQualLeft-1); i < (header.clipQualRight-1); i++) { read.bases[i] = toupper(read.bases[i]); }
645 for (int i = (header.clipQualRight-1); i < read.bases.length(); i++) { read.bases[i] = tolower(read.bases[i]); }
647 out << endl << "Bases: " << read.bases << endl << "Quality Scores: ";
648 for (int i = 0; i < read.qualScores.size(); i++) { out << read.qualScores[i] << '\t'; }
655 catch(exception& e) {
656 m->errorOut(e, "SffInfoCommand", "printSffTxtSeqData");
660 //**********************************************************************************************************************
661 int SffInfoCommand::printFastaSeqData(ofstream& out, seqRead& read, Header& header) {
664 string seq = read.bases;
667 if(header.clipQualRight < header.clipQualLeft){
670 else if((header.clipQualRight != 0) && ((header.clipQualRight-header.clipQualLeft) >= 0)){
671 seq = seq.substr((header.clipQualLeft-1), (header.clipQualRight-header.clipQualLeft));
674 seq = seq.substr(header.clipQualLeft-1);
677 //if you wanted the sfftxt then you already converted the bases to the right case
679 //make the bases you want to clip lowercase and the bases you want to keep upper case
680 if(header.clipQualRight == 0){ header.clipQualRight = seq.length(); }
681 for (int i = 0; i < (header.clipQualLeft-1); i++) { seq[i] = tolower(seq[i]); }
682 for (int i = (header.clipQualLeft-1); i < (header.clipQualRight-1); i++) { seq[i] = toupper(seq[i]); }
683 for (int i = (header.clipQualRight-1); i < seq.length(); i++) { seq[i] = tolower(seq[i]); }
687 out << ">" << header.name << endl;
692 catch(exception& e) {
693 m->errorOut(e, "SffInfoCommand", "printFastaSeqData");
698 //**********************************************************************************************************************
699 int SffInfoCommand::printQualSeqData(ofstream& out, seqRead& read, Header& header) {
703 if(header.clipQualRight < header.clipQualLeft){
706 else if((header.clipQualRight != 0) && ((header.clipQualRight-header.clipQualLeft) >= 0)){
707 out << ">" << header.name << " length=" << (header.clipQualRight-header.clipQualLeft) << endl;
708 for (int i = (header.clipQualLeft-1); i < (header.clipQualRight-1); i++) { out << read.qualScores[i] << '\t'; }
711 out << ">" << header.name << " length=" << (header.clipQualRight-header.clipQualLeft) << endl;
712 for (int i = (header.clipQualLeft-1); i < read.qualScores.size(); i++) { out << read.qualScores[i] << '\t'; }
715 out << ">" << header.name << " length=" << read.qualScores.size() << endl;
716 for (int i = 0; i < read.qualScores.size(); i++) { out << read.qualScores[i] << '\t'; }
723 catch(exception& e) {
724 m->errorOut(e, "SffInfoCommand", "printQualSeqData");
729 //**********************************************************************************************************************
730 int SffInfoCommand::printFlowSeqData(ofstream& out, seqRead& read, Header& header) {
733 out << ">" << header.name << endl;
734 for (int i = 0; i < read.flowgram.size(); i++) { out << setprecision(2) << (read.flowgram[i]/(float)100) << '\t'; }
739 catch(exception& e) {
740 m->errorOut(e, "SffInfoCommand", "printFlowSeqData");
744 //**********************************************************************************************************************
745 int SffInfoCommand::readAccnosFile(string filename) {
751 m->openInputFile(filename, in);
755 in >> name; m->gobble(in);
757 seqNames.insert(name);
759 if (m->control_pressed) { seqNames.clear(); break; }
765 catch(exception& e) {
766 m->errorOut(e, "SffInfoCommand", "readAccnosFile");
770 //**********************************************************************************************************************/