Esempio n. 1
0
/** If button is checked (first press), do nothing, except
  * change button icon to show remove in progress.
  * If button is unchecked (second press), remove data.
  */
void EraseDataToolButton::requestEraseData()
{
	this->setRemoveIcon();

	if (mRemoveAction->isChecked())
		return;

	emit eraseData();
}
Esempio n. 2
0
void readFASTA(
		const std::string& inPath,
		const std::string& outPath,
		const int maxLength,
		const int overlapLength) {
	std::ifstream ifs(inPath.c_str());
	std::string buf;

	std::string label;
	std::string sequence;
	while(ifs && std::getline(ifs, buf)) {
		if(buf.find(">") != std::string::npos) {
			if(!label.empty()) {
				splitFASTA(label, sequence, outPath, maxLength, overlapLength);
				eraseData(label, sequence);
			}
			label = buf;
		} else if(buf.empty()) {
			if(!label.empty()) {
				splitFASTA(label, sequence, outPath, maxLength, overlapLength);
				eraseData(label, sequence);
			}
		} else {
			if(!label.empty()) {
				removeSpace(buf);
				sequence += buf;
			}
		}
 	}
	if(ifs.eof()) {
		if(!label.empty()) {
			splitFASTA(label, sequence, outPath, maxLength, overlapLength);
			eraseData(label, sequence);
		}
	}
}
Esempio n. 3
0
int Rom::eraseData(int addr,int size) {
	return eraseData(addr,size,false);
}
Esempio n. 4
0
int Rom::eraseRATSdata(int addr) {
	int size = checkRATSdata(addr);
	if(size <= 0) return 0;
	eraseData(addr,size+8,true);
	return size+8;
}