vector<string> ScreenSeqsCommand::setParameters(){
try {
CommandParameter pfasta("fasta", "InputTypes", "", "", "none", "none", "none","fasta",false,true,true); parameters.push_back(pfasta);
- CommandParameter pcontigsreport("contigsreport", "InputTypes", "", "", "report", "none", "none","contigsreport",false,true,true); parameters.push_back(pcontigsreport);
+ CommandParameter pcontigsreport("contigsreport", "InputTypes", "", "", "report", "none", "none","contigsreport",false,false,true); parameters.push_back(pcontigsreport);
CommandParameter palignreport("alignreport", "InputTypes", "", "", "report", "none", "none","alignreport",false,false); parameters.push_back(palignreport);
CommandParameter psummary("summary", "InputTypes", "", "", "report", "none", "none","summary",false,false); parameters.push_back(psummary);
CommandParameter pname("name", "InputTypes", "", "", "NameCount", "none", "none","name",false,false,true); parameters.push_back(pname);
if (namefile != "") { nameMap = m->readNames(namefile); }
else if (countfile != "") {
CountTable ct;
- ct.readTable(countfile, true);
+ ct.readTable(countfile, true, false);
nameMap = ct.getNameMap();
}
getSummary(positions);
if (namefile != "") { nameMap = m->readNames(namefile); }
else if (countfile != "") {
CountTable ct;
- ct.readTable(countfile, true);
+ ct.readTable(countfile, true, false);
nameMap = ct.getNameMap();
}
getSummaryReport();
if (namefile != "") { nameMap = m->readNames(namefile); }
else if (countfile != "") {
CountTable ct;
- ct.readTable(countfile, true);
+ ct.readTable(countfile, true, false);
nameMap = ct.getNameMap();
}
getSummary(positions);
//loop through and create all the processes you want
while (process != processors) {
- int pid = fork();
+ pid_t pid = fork();
if (pid > 0) {
processIDS.push_back(pid); //create map from line number to pid so you can append files in correct order later
//pass numSeqs to parent
ofstream out;
- string tempFile = contigsreport + toString(getpid()) + ".num.temp";
+ string tempFile = contigsreport + m->mothurGetpid(process) + ".num.temp";
m->openOutputFile(tempFile, out);
out << num << endl;
//loop through and create all the processes you want
while (process != processors) {
- int pid = fork();
+ pid_t pid = fork();
if (pid > 0) {
processIDS.push_back(pid); //create map from line number to pid so you can append files in correct order later
//pass numSeqs to parent
ofstream out;
- string tempFile = alignreport + toString(getpid()) + ".num.temp";
+ string tempFile = alignreport + m->mothurGetpid(process) + ".num.temp";
m->openOutputFile(tempFile, out);
out << num << endl;
//loop through and create all the processes you want
while (process != processors) {
- int pid = fork();
+ pid_t pid = fork();
if (pid > 0) {
processIDS.push_back(pid); //create map from line number to pid so you can append files in correct order later
//pass numSeqs to parent
ofstream out;
- string tempFile = fastafile + toString(getpid()) + ".num.temp";
+ string tempFile = fastafile + m->mothurGetpid(process) + ".num.temp";
m->openOutputFile(tempFile, out);
out << num << endl;
while(!inputGroups.eof()){
if (m->control_pressed) { goodGroupOut.close(); inputGroups.close(); m->mothurRemove(goodGroupFile); return 0; }
- inputGroups >> seqName; m->gobble(inputGroups); inputGroups >> group;
+ inputGroups >> seqName; m->gobble(inputGroups); inputGroups >> group; m->gobble(inputGroups);
it = badSeqNames.find(seqName);
if(it != badSeqNames.end()){
else{
goodGroupOut << seqName << '\t' << group << endl;
}
- m->gobble(inputGroups);
}
if (m->control_pressed) { goodGroupOut.close(); inputGroups.close(); m->mothurRemove(goodGroupFile); return 0; }
if (m->control_pressed) { goodCountOut.close(); in.close(); m->mothurRemove(goodCountFile); return 0; }
in >> name; m->gobble(in);
- in >> thisTotal; m->gobble(in);
+ in >> thisTotal;
rest = m->getline(in); m->gobble(in);
it = badSeqNames.find(name);
if(it != badSeqNames.end()){
- badSeqNames.erase(it);
+ badSeqNames.erase(it);
}
else{
goodCountOut << name << '\t' << thisTotal << '\t' << rest << endl;
}
}
-
if (m->control_pressed) { goodCountOut.close(); in.close(); m->mothurRemove(goodCountFile); return 0; }
//we were unable to remove some of the bad sequences
//check for groups that have been eliminated
CountTable ct;
if (ct.testGroups(goodCountFile)) {
- ct.readTable(goodCountFile, true);
+ ct.readTable(goodCountFile, true, false);
ct.printTable(goodCountFile);
}
//loop through and create all the processes you want
while (process != processors) {
- int pid = fork();
+ pid_t pid = fork();
if (pid > 0) {
processIDS.push_back(pid); //create map from line number to pid so you can append files in correct order later
process++;
}else if (pid == 0){
- num = driver(lines[process], goodFileName + toString(getpid()) + ".temp", badAccnos + toString(getpid()) + ".temp", filename, badSeqNames);
+ num = driver(lines[process], goodFileName + m->mothurGetpid(process) + ".temp", badAccnos + m->mothurGetpid(process) + ".temp", filename, badSeqNames);
//pass numSeqs to parent
ofstream out;
- string tempFile = filename + toString(getpid()) + ".num.temp";
+ string tempFile = filename + m->mothurGetpid(process) + ".num.temp";
m->openOutputFile(tempFile, out);
out << num << endl;
out.close();