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();
122 ableToOpen = m->openInputFile(tryPath, in2, "noerror");
124 filenames[i] = tryPath;
128 //if you can't open it, try default location
129 if (ableToOpen == 1) {
130 if (m->getOutputDir() != "") { //default path is set
131 string tryPath = m->getOutputDir() + m->getSimpleName(filenames[i]);
132 m->mothurOut("Unable to open " + filenames[i] + ". Trying output directory " + tryPath); m->mothurOutEndLine();
134 ableToOpen = m->openInputFile(tryPath, in2, "noerror");
136 filenames[i] = tryPath;
142 if (ableToOpen == 1) {
143 m->mothurOut("Unable to open " + filenames[i] + ". It will be disregarded."); m->mothurOutEndLine();
144 //erase from file list
145 filenames.erase(filenames.begin()+i);
150 //make sure there is at least one valid file left
151 if (filenames.size() == 0) { m->mothurOut("no valid files."); m->mothurOutEndLine(); abort = true; }
154 accnosName = validParameter.validFile(parameters, "accnos", false);
155 if (accnosName == "not found") { accnosName = ""; }
158 m->splitAtDash(accnosName, accnosFileNames);
160 //go through files and make sure they are good, if not, then disregard them
161 for (int i = 0; i < accnosFileNames.size(); i++) {
162 if (inputDir != "") {
163 string path = m->hasPath(accnosFileNames[i]);
164 //if the user has not given a path then, add inputdir. else leave path alone.
165 if (path == "") { accnosFileNames[i] = inputDir + accnosFileNames[i]; }
169 int ableToOpen = m->openInputFile(accnosFileNames[i], in, "noerror");
171 //if you can't open it, try default location
172 if (ableToOpen == 1) {
173 if (m->getDefaultPath() != "") { //default path is set
174 string tryPath = m->getDefaultPath() + m->getSimpleName(accnosFileNames[i]);
175 m->mothurOut("Unable to open " + accnosFileNames[i] + ". Trying default " + tryPath); m->mothurOutEndLine();
177 ableToOpen = m->openInputFile(tryPath, in2, "noerror");
179 accnosFileNames[i] = tryPath;
182 //if you can't open it, try default location
183 if (ableToOpen == 1) {
184 if (m->getOutputDir() != "") { //default path is set
185 string tryPath = m->getOutputDir() + m->getSimpleName(accnosFileNames[i]);
186 m->mothurOut("Unable to open " + accnosFileNames[i] + ". Trying output directory " + tryPath); m->mothurOutEndLine();
188 ableToOpen = m->openInputFile(tryPath, in2, "noerror");
190 accnosFileNames[i] = tryPath;
195 if (ableToOpen == 1) {
196 m->mothurOut("Unable to open " + accnosFileNames[i] + ". It will be disregarded."); m->mothurOutEndLine();
197 //erase from file list
198 accnosFileNames.erase(accnosFileNames.begin()+i);
203 //make sure there is at least one valid file left
204 if (accnosFileNames.size() == 0) { m->mothurOut("no valid files."); m->mothurOutEndLine(); abort = true; }
208 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(); }
211 string temp = validParameter.validFile(parameters, "qfile", false); if (temp == "not found"){ temp = "T"; }
212 qual = m->isTrue(temp);
214 temp = validParameter.validFile(parameters, "fasta", false); if (temp == "not found"){ temp = "T"; }
215 fasta = m->isTrue(temp);
217 temp = validParameter.validFile(parameters, "flow", false); if (temp == "not found"){ temp = "F"; }
218 flow = m->isTrue(temp);
220 temp = validParameter.validFile(parameters, "trim", false); if (temp == "not found"){ temp = "T"; }
221 trim = m->isTrue(temp);
223 temp = validParameter.validFile(parameters, "sfftxt", false); if (temp == "not found"){ temp = "F"; }
224 sfftxt = m->isTrue(temp);
227 catch(exception& e) {
228 m->errorOut(e, "SffInfoCommand", "SffInfoCommand");
232 //**********************************************************************************************************************
234 void SffInfoCommand::help(){
236 m->mothurOut("The sffinfo command reads a sff file and extracts the sequence data.\n");
237 m->mothurOut("The sffinfo command parameters are sff, fasta, qfile, accnos, flow, sfftxt, and trim. sff is required. \n");
238 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");
239 m->mothurOut("The fasta parameter allows you to indicate if you would like a fasta formatted file generated. Default=True. \n");
240 m->mothurOut("The qfile parameter allows you to indicate if you would like a quality file generated. Default=True. \n");
241 m->mothurOut("The flow parameter allows you to indicate if you would like a flowgram file generated. Default=False. \n");
242 m->mothurOut("The sfftxt parameter allows you to indicate if you would like a sff.txt file generated. Default=False. \n");
243 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");
244 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");
245 m->mothurOut("Example sffinfo(sff=mySffFile.sff, trim=F).\n");
246 m->mothurOut("Note: No spaces between parameter labels (i.e. sff), '=' and parameters (i.e.yourSffFileName).\n\n");
248 catch(exception& e) {
249 m->errorOut(e, "SffInfoCommand", "help");
253 //**********************************************************************************************************************
255 SffInfoCommand::~SffInfoCommand(){}
257 //**********************************************************************************************************************
258 int SffInfoCommand::execute(){
261 if (abort == true) { return 0; }
263 for (int s = 0; s < filenames.size(); s++) {
265 if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
267 int start = time(NULL);
269 m->mothurOut("Extracting info from " + filenames[s] + " ..." ); m->mothurOutEndLine();
272 if (hasAccnos) { accnos = accnosFileNames[s]; }
274 int numReads = extractSffInfo(filenames[s], accnos);
276 m->mothurOut("It took " + toString(time(NULL) - start) + " secs to extract " + toString(numReads) + ".");
279 if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
281 //report output filenames
282 m->mothurOutEndLine();
283 m->mothurOut("Output File Names: "); m->mothurOutEndLine();
284 for (int i = 0; i < outputNames.size(); i++) { m->mothurOut(outputNames[i]); m->mothurOutEndLine(); }
285 m->mothurOutEndLine();
289 catch(exception& e) {
290 m->errorOut(e, "SffInfoCommand", "execute");
294 //**********************************************************************************************************************
295 int SffInfoCommand::extractSffInfo(string input, string accnos){
298 if (outputDir == "") { outputDir += m->hasPath(input); }
300 if (accnos != "") { readAccnosFile(accnos); }
301 else { seqNames.clear(); }
303 ofstream outSfftxt, outFasta, outQual, outFlow;
304 string outFastaFileName, outQualFileName;
305 string sfftxtFileName = outputDir + m->getRootName(m->getSimpleName(input)) + "sff.txt";
306 string outFlowFileName = outputDir + m->getRootName(m->getSimpleName(input)) + "flow";
308 outFastaFileName = outputDir + m->getRootName(m->getSimpleName(input)) + "fasta";
309 outQualFileName = outputDir + m->getRootName(m->getSimpleName(input)) + "qual";
311 outFastaFileName = outputDir + m->getRootName(m->getSimpleName(input)) + "raw.fasta";
312 outQualFileName = outputDir + m->getRootName(m->getSimpleName(input)) + "raw.qual";
315 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); }
316 if (fasta) { m->openOutputFile(outFastaFileName, outFasta); outputNames.push_back(outFastaFileName); outputTypes["fasta"].push_back(outFastaFileName); }
317 if (qual) { m->openOutputFile(outQualFileName, outQual); outputNames.push_back(outQualFileName); outputTypes["qual"].push_back(outQualFileName); }
318 if (flow) { m->openOutputFile(outFlowFileName, outFlow); outputNames.push_back(outFlowFileName); outputTypes["flow"].push_back(outFlowFileName); }
321 in.open(input.c_str(), ios::binary);
324 readCommonHeader(in, header);
328 //check magic number and version
329 if (header.magicNumber != 779314790) { m->mothurOut("Magic Number is not correct, not a valid .sff file"); m->mothurOutEndLine(); return count; }
330 if (header.version != "0001") { m->mothurOut("Version is not supported, only support version 0001."); m->mothurOutEndLine(); return count; }
332 //print common header
333 if (sfftxt) { printCommonHeader(outSfftxt, header); }
335 //read through the sff file
342 readHeader(in, readheader);
346 readSeqData(in, read, header.numFlowsPerRead, readheader.numBases);
348 //if you have provided an accosfile and this seq is not in it, then dont print
349 if (seqNames.size() != 0) { if (seqNames.count(readheader.name) == 0) { print = false; } }
353 if (sfftxt) { printHeader(outSfftxt, readheader); printSffTxtSeqData(outSfftxt, read, readheader); }
354 if (fasta) { printFastaSeqData(outFasta, read, readheader); }
355 if (qual) { printQualSeqData(outQual, read, readheader); }
356 if (flow) { printFlowSeqData(outFlow, read, readheader); }
362 if((count+1) % 10000 == 0){ m->mothurOut(toString(count+1)); m->mothurOutEndLine(); }
364 if (m->control_pressed) { count = 0; break; }
366 if (count >= header.numReads) { break; }
370 if (!m->control_pressed) { if((count) % 10000 != 0){ m->mothurOut(toString(count)); m->mothurOutEndLine(); } }
374 if (sfftxt) { outSfftxt.close(); }
375 if (fasta) { outFasta.close(); }
376 if (qual) { outQual.close(); }
377 if (flow) { outFlow.close(); }
381 catch(exception& e) {
382 m->errorOut(e, "SffInfoCommand", "extractSffInfo");
386 //**********************************************************************************************************************
387 int SffInfoCommand::readCommonHeader(ifstream& in, CommonHeader& header){
395 header.magicNumber = be_int4(*(unsigned int *)(&buffer));
401 for (int i = 0; i < 4; i++) { header.version += toString((int)(buffer9[i])); }
406 header.indexOffset = be_int8(*(unsigned long int *)(&buffer2));
411 header.indexLength = be_int4(*(unsigned int *)(&buffer3));
416 header.numReads = be_int4(*(unsigned int *)(&buffer4));
421 header.headerLength = be_int2(*(unsigned short *)(&buffer5));
426 header.keyLength = be_int2(*(unsigned short *)(&buffer6));
428 //read number of flow reads
431 header.numFlowsPerRead = be_int2(*(unsigned short *)(&buffer7));
436 header.flogramFormatCode = (int)(buffer8[0]);
439 char* tempBuffer = new char[header.numFlowsPerRead];
440 in.read(&(*tempBuffer), header.numFlowsPerRead);
441 header.flowChars = tempBuffer;
442 if (header.flowChars.length() > header.numFlowsPerRead) { header.flowChars = header.flowChars.substr(0, header.numFlowsPerRead); }
446 char* tempBuffer2 = new char[header.keyLength];
447 in.read(&(*tempBuffer2), header.keyLength);
448 header.keySequence = tempBuffer2;
449 if (header.keySequence.length() > header.keyLength) { header.keySequence = header.keySequence.substr(0, header.keyLength); }
450 delete[] tempBuffer2;
453 unsigned long int spotInFile = in.tellg();
454 unsigned long int spot = (spotInFile + 7)& ~7; // ~ inverts
458 m->mothurOut("Error reading sff common header."); m->mothurOutEndLine();
463 catch(exception& e) {
464 m->errorOut(e, "SffInfoCommand", "readCommonHeader");
468 //**********************************************************************************************************************
469 int SffInfoCommand::readHeader(ifstream& in, Header& header){
477 header.headerLength = be_int2(*(unsigned short *)(&buffer));
482 header.nameLength = be_int2(*(unsigned short *)(&buffer2));
487 header.numBases = be_int4(*(unsigned int *)(&buffer3));
489 //read clip qual left
492 header.clipQualLeft = be_int2(*(unsigned short *)(&buffer4));
493 header.clipQualLeft = 5;
495 //read clip qual right
498 header.clipQualRight = be_int2(*(unsigned short *)(&buffer5));
500 //read clipAdapterLeft
503 header.clipAdapterLeft = be_int2(*(unsigned short *)(&buffer6));
505 //read clipAdapterRight
508 header.clipAdapterRight = be_int2(*(unsigned short *)(&buffer7));
511 char* tempBuffer = new char[header.nameLength];
512 in.read(&(*tempBuffer), header.nameLength);
513 header.name = tempBuffer;
514 if (header.name.length() > header.nameLength) { header.name = header.name.substr(0, header.nameLength); }
518 unsigned long int spotInFile = in.tellg();
519 unsigned long int spot = (spotInFile + 7)& ~7;
523 m->mothurOut("Error reading sff header info."); m->mothurOutEndLine();
528 catch(exception& e) {
529 m->errorOut(e, "SffInfoCommand", "readHeader");
533 //**********************************************************************************************************************
534 int SffInfoCommand::readSeqData(ifstream& in, seqRead& read, int numFlowReads, int numBases){
540 read.flowgram.resize(numFlowReads);
541 for (int i = 0; i < numFlowReads; i++) {
544 read.flowgram[i] = be_int2(*(unsigned short *)(&buffer));
548 read.flowIndex.resize(numBases);
549 for (int i = 0; i < numBases; i++) {
552 read.flowIndex[i] = be_int1(*(unsigned char *)(&temp));
556 char* tempBuffer = new char[numBases];
557 in.read(&(*tempBuffer), numBases);
558 read.bases = tempBuffer;
559 if (read.bases.length() > numBases) { read.bases = read.bases.substr(0, numBases); }
563 read.qualScores.resize(numBases);
564 for (int i = 0; i < numBases; i++) {
567 read.qualScores[i] = be_int1(*(unsigned char *)(&temp));
571 unsigned long int spotInFile = in.tellg();
572 unsigned long int spot = (spotInFile + 7)& ~7;
576 m->mothurOut("Error reading."); m->mothurOutEndLine();
581 catch(exception& e) {
582 m->errorOut(e, "SffInfoCommand", "readSeqData");
586 //**********************************************************************************************************************
587 int SffInfoCommand::printCommonHeader(ofstream& out, CommonHeader& header) {
590 out << "Common Header:\nMagic Number: " << header.magicNumber << endl;
591 out << "Version: " << header.version << endl;
592 out << "Index Offset: " << header.indexOffset << endl;
593 out << "Index Length: " << header.indexLength << endl;
594 out << "Number of Reads: " << header.numReads << endl;
595 out << "Header Length: " << header.headerLength << endl;
596 out << "Key Length: " << header.keyLength << endl;
597 out << "Number of Flows: " << header.numFlowsPerRead << endl;
598 out << "Format Code: " << header.flogramFormatCode << endl;
599 out << "Flow Chars: " << header.flowChars << endl;
600 out << "Key Sequence: " << header.keySequence << endl << endl;
604 catch(exception& e) {
605 m->errorOut(e, "SffInfoCommand", "printCommonHeader");
609 //**********************************************************************************************************************
610 int SffInfoCommand::printHeader(ofstream& out, Header& header) {
613 out << ">" << header.name << endl;
614 out << "Run Prefix: " << endl;
615 out << "Region #: " << endl;
616 out << "XY Location: " << endl << endl;
618 out << "Run Name: " << endl;
619 out << "Analysis Name: " << endl;
620 out << "Full Path: " << endl << endl;
622 out << "Read Header Len: " << header.headerLength << endl;
623 out << "Name Length: " << header.nameLength << endl;
624 out << "# of Bases: " << header.numBases << endl;
625 out << "Clip Qual Left: " << header.clipQualLeft << endl;
626 out << "Clip Qual Right: " << header.clipQualRight << endl;
627 out << "Clip Adap Left: " << header.clipAdapterLeft << endl;
628 out << "Clip Adap Right: " << header.clipAdapterRight << endl << endl;
632 catch(exception& e) {
633 m->errorOut(e, "SffInfoCommand", "printHeader");
638 //**********************************************************************************************************************
639 int SffInfoCommand::printSffTxtSeqData(ofstream& out, seqRead& read, Header& header) {
643 for (int i = 0; i < read.flowgram.size(); i++) { out << setprecision(2) << (read.flowgram[i]/(float)100) << '\t'; }
645 out << endl << "Flow Indexes: ";
647 for (int i = 0; i < read.flowIndex.size(); i++) { sum += read.flowIndex[i]; out << sum << '\t'; }
649 //make the bases you want to clip lowercase and the bases you want to keep upper case
650 if(header.clipQualRight == 0){ header.clipQualRight = read.bases.length(); }
651 for (int i = 0; i < (header.clipQualLeft-1); i++) { read.bases[i] = tolower(read.bases[i]); }
652 for (int i = (header.clipQualLeft-1); i < (header.clipQualRight-1); i++) { read.bases[i] = toupper(read.bases[i]); }
653 for (int i = (header.clipQualRight-1); i < read.bases.length(); i++) { read.bases[i] = tolower(read.bases[i]); }
655 out << endl << "Bases: " << read.bases << endl << "Quality Scores: ";
656 for (int i = 0; i < read.qualScores.size(); i++) { out << read.qualScores[i] << '\t'; }
663 catch(exception& e) {
664 m->errorOut(e, "SffInfoCommand", "printSffTxtSeqData");
668 //**********************************************************************************************************************
669 int SffInfoCommand::printFastaSeqData(ofstream& out, seqRead& read, Header& header) {
672 string seq = read.bases;
675 if(header.clipQualRight < header.clipQualLeft){
678 else if((header.clipQualRight != 0) && ((header.clipQualRight-header.clipQualLeft) >= 0)){
679 seq = seq.substr((header.clipQualLeft-1), (header.clipQualRight-header.clipQualLeft));
682 seq = seq.substr(header.clipQualLeft-1);
685 //if you wanted the sfftxt then you already converted the bases to the right case
687 //make the bases you want to clip lowercase and the bases you want to keep upper case
688 if(header.clipQualRight == 0){ header.clipQualRight = seq.length(); }
689 for (int i = 0; i < (header.clipQualLeft-1); i++) { seq[i] = tolower(seq[i]); }
690 for (int i = (header.clipQualLeft-1); i < (header.clipQualRight-1); i++) { seq[i] = toupper(seq[i]); }
691 for (int i = (header.clipQualRight-1); i < seq.length(); i++) { seq[i] = tolower(seq[i]); }
695 out << ">" << header.name << endl;
700 catch(exception& e) {
701 m->errorOut(e, "SffInfoCommand", "printFastaSeqData");
706 //**********************************************************************************************************************
707 int SffInfoCommand::printQualSeqData(ofstream& out, seqRead& read, Header& header) {
711 if(header.clipQualRight < header.clipQualLeft){
714 else if((header.clipQualRight != 0) && ((header.clipQualRight-header.clipQualLeft) >= 0)){
715 out << ">" << header.name << " length=" << (header.clipQualRight-header.clipQualLeft) << endl;
716 for (int i = (header.clipQualLeft-1); i < (header.clipQualRight-1); i++) { out << read.qualScores[i] << '\t'; }
719 out << ">" << header.name << " length=" << (header.clipQualRight-header.clipQualLeft) << endl;
720 for (int i = (header.clipQualLeft-1); i < read.qualScores.size(); i++) { out << read.qualScores[i] << '\t'; }
723 out << ">" << header.name << " length=" << read.qualScores.size() << endl;
724 for (int i = 0; i < read.qualScores.size(); i++) { out << read.qualScores[i] << '\t'; }
731 catch(exception& e) {
732 m->errorOut(e, "SffInfoCommand", "printQualSeqData");
737 //**********************************************************************************************************************
738 int SffInfoCommand::printFlowSeqData(ofstream& out, seqRead& read, Header& header) {
741 out << ">" << header.name << endl;
742 for (int i = 0; i < read.flowgram.size(); i++) { out << setprecision(2) << (read.flowgram[i]/(float)100) << '\t'; }
747 catch(exception& e) {
748 m->errorOut(e, "SffInfoCommand", "printFlowSeqData");
752 //**********************************************************************************************************************
753 int SffInfoCommand::readAccnosFile(string filename) {
759 m->openInputFile(filename, in);
763 in >> name; m->gobble(in);
765 seqNames.insert(name);
767 if (m->control_pressed) { seqNames.clear(); break; }
773 catch(exception& e) {
774 m->errorOut(e, "SffInfoCommand", "readAccnosFile");
778 //**********************************************************************************************************************/