Exemplo n.º 1
0
/*! @brief Simplifies a vector of strings
 
 @param input the vector of strings to be simplified
 @param ouput the vector that will be updated to contain the simplified names
 */
void NUActionatorsData::simplifyNames(const vector<string>& input, vector<string>& output)
{
    vector<string> simplifiednames;
    for (unsigned int i=0; i<input.size(); i++)
        simplifiednames.push_back(simplifyName(input[i]));
    output = simplifiednames;
}
Exemplo n.º 2
0
void oneFile(char *fileName, FILE *f)
/* Parse one input file and add to tab separated output. */
{
struct lineFile *lf = lineFileOpen(fileName, TRUE);
char chromName[128];
char *row[9];
splitPath(fileName, NULL, chromName, NULL);

printf("Parsing %s\n", fileName);
while (lineFileRow(lf, row))
    {
    fprintf(f, "%s\t", chromName);
    fprintf(f, "%d\t", lineFileNeedNum(lf, row, 1)-1);
    fprintf(f, "%d\t", lineFileNeedNum(lf, row, 2));
    fprintf(f, "%s\t", simplifyName(row[7]));
    fprintf(f, "%d\t", milliScore(atof(row[6])));
    fprintf(f, "%s\t", row[4]);
    fprintf(f, "%s\t", row[6]);
    fprintf(f, "%s\t", row[7]);
    fprintf(f, "%s\n", row[8]);
    }
lineFileClose(&lf);
}