it = parameters.find("sff");
//user has given a template file
if(it != parameters.end()){
- path = hasPath(it->second);
+ path = m->hasPath(it->second);
//if the user has not given a path then, add inputdir. else leave path alone.
if (path == "") { parameters["sff"] = inputDir + it->second; }
}
it = parameters.find("oligos");
//user has given an oligos file
if(it != parameters.end()){
- path = hasPath(it->second);
+ path = m->hasPath(it->second);
//if the user has not given a path then, add inputdir. else leave path alone.
if (path == "") { parameters["oligos"] = inputDir + it->second; }
}
outputDir = validParameter.validFile(parameters, "outputdir", false);
if (outputDir == "not found"){
outputDir = "";
- outputDir += hasPath(sffFile); //if user entered a file with a path then preserve it
+ outputDir += m->hasPath(sffFile); //if user entered a file with a path then preserve it
}
//check for optional parameter and set defaults
if (abort == true) { return 0; }
ifstream inSFF;
- openInputFile(sffFile, inSFF);
+ m->openInputFile(sffFile, inSFF);
cout.setf(ios::fixed, ios::floatfield);
cout.setf(ios::showpoint);
getOligos(flowFileNames);
}
else{
- flowFileNames.push_back(new ofstream((outputDir + getRootName(getSimpleName(sffFile)) + "flow").c_str(), ios::ate));
- outputNames.push_back((outputDir + getRootName(getSimpleName(sffFile)) + "flow"));
+ flowFileNames.push_back(new ofstream((outputDir + m->getRootName(m->getSimpleName(sffFile)) + "flow").c_str(), ios::ate));
+ outputNames.push_back((outputDir + m->getRootName(m->getSimpleName(sffFile)) + "flow"));
}
for(int i=0;i<flowFileNames.size();i++){
if (m->control_pressed) { for(int i=0;i<flowFileNames.size();i++){ flowFileNames[i]->close(); } return 0; }
// ofstream fastaFile;
-// openOutputFile(getRootName(sffFile) + "fasta", fastaFile);
+// m->openOutputFile(m->getRootName(sffFile) + "fasta", fastaFile);
// ofstream qualFile;
-// openOutputFile(getRootName(sffFile) + "qual", qualFile);
+// m->openOutputFile(m->getRootName(sffFile) + "qual", qualFile);
- string commonHeader = getline(inSFF);
- string magicNumber = getline(inSFF);
- string version = getline(inSFF);
- string indexOffset = getline(inSFF);
- string indexLength = getline(inSFF);
+ string commonHeader = m->getline(inSFF);
+ string magicNumber = m->getline(inSFF);
+ string version = m->getline(inSFF);
+ string indexOffset = m->getline(inSFF);
+ string indexLength = m->getline(inSFF);
int numReads = parseHeaderLineToInt(inSFF);
- string headerLength = getline(inSFF);
- string keyLength = getline(inSFF);
+ string headerLength = m->getline(inSFF);
+ string keyLength = m->getline(inSFF);
int numFlows = parseHeaderLineToInt(inSFF);
- string flowgramCode = getline(inSFF);
- string flowChars = getline(inSFF);
- string keySequence = getline(inSFF);
- gobble(inSFF);
+ string flowgramCode = m->getline(inSFF);
+ string flowChars = m->getline(inSFF);
+ string keySequence = m->getline(inSFF);
+ m->gobble(inSFF);
string seqName;
bool good = 0;
inSFF >> seqName;
seqName = seqName.substr(1);
- gobble(inSFF);
+ m->gobble(inSFF);
string runPrefix = parseHeaderLineToString(inSFF);
string regionNumber = parseHeaderLineToString(inSFF);
string xyLocation = parseHeaderLineToString(inSFF);
- gobble(inSFF);
+ m->gobble(inSFF);
string runName = parseHeaderLineToString(inSFF);
string analysisName = parseHeaderLineToString(inSFF);
string fullPath = parseHeaderLineToString(inSFF);
- gobble(inSFF);
+ m->gobble(inSFF);
string readHeaderLen = parseHeaderLineToString(inSFF);
string nameLength = parseHeaderLineToString(inSFF);
int clipQualRight = parseHeaderLineToInt(inSFF);
string clipAdapLeft = parseHeaderLineToString(inSFF);
string clipAdapRight = parseHeaderLineToString(inSFF);
- gobble(inSFF);
+ m->gobble(inSFF);
vector<float> flowVector = parseHeaderLineToFloatVector(inSFF, numFlows);
vector<int> flowIndices = parseHeaderLineToIntVector(inSFF, numBases);
string bases = parseHeaderLineToString(inSFF);
string qualityScores = parseHeaderLineToString(inSFF);
- gobble(inSFF);
+ m->gobble(inSFF);
try {
ifstream inOligos;
- openInputFile(oligoFile, inOligos);
+ m->openInputFile(oligoFile, inOligos);
string type, oligo, group;
while(!inOligos.eof()){
inOligos >> type;
- if(type[0] == '#'){ getline(inOligos); } // get rest of line if there's any crap there
+ if(type[0] == '#'){ m->getline(inOligos); } // get rest of line if there's any crap there
else{
inOligos >> oligo;
barcodes[oligo]=index++;
groupVector.push_back(group);
- outSFFFlowVec.push_back(new ofstream((outputDir + getRootName(getSimpleName(sffFile)) + group + ".flow").c_str(), ios::ate));
- outputNames.push_back((outputDir + getRootName(getSimpleName(sffFile)) + group + "flow"));
+ outSFFFlowVec.push_back(new ofstream((outputDir + m->getRootName(m->getSimpleName(sffFile)) + group + ".flow").c_str(), ios::ate));
+ outputNames.push_back((outputDir + m->getRootName(m->getSimpleName(sffFile)) + group + "flow"));
}
}
- gobble(inOligos);
+ m->gobble(inOligos);
}
inOligos.close();
}
}
- gobble(file);
+ m->gobble(file);
return number;
}
char c = file.get();
if (c == ':'){
- gobble(file);
- text = getline(file);
+ m->gobble(file);
+ text = m->getline(file);
break;
}
}
- gobble(file);
+ m->gobble(file);
return text;
}
break;
}
}
- gobble(file);
+ m->gobble(file);
return floatVector;
}
break;
}
}
- gobble(file);
+ m->gobble(file);
return intVector;
}
}
}
-
int fPrimer = 1;
for(int i=0;i<numFPrimers;i++){
if(compareDNASeq(forPrimer[i], sequence.substr(barcodeLength,forPrimer[i].length()))){
fPrimer = 0;
}
}
-
+
int rPrimer = 1;
for(int i=0;i<numRPrimers;i++){
if(compareDNASeq(revPrimer[i], sequence.substr(sequence.length()-revPrimer[i].length(),revPrimer[i].length()))){