Improved the fasta parser for better memory handling and better parsing
of the last parts of fasta headers (definitions)
This commit is contained in:
@ -52,7 +52,7 @@ void printOnlyHeaderFromTable(element_from_header* header, FILE* output)
|
||||
|
||||
fprintf(output,">%s ",header[1].value);
|
||||
|
||||
for (i = 2; i <= nbf; i++)
|
||||
for (i = 2; i < nbf; i++)
|
||||
{
|
||||
if (strcmp(header[i].name, "definition") != 0)
|
||||
{
|
||||
@ -60,11 +60,10 @@ void printOnlyHeaderFromTable(element_from_header* header, FILE* output)
|
||||
fprintf(output,"=");
|
||||
fprintf(output,"%s; ",header[i].value);
|
||||
}
|
||||
else if (strcmp(header[i].name, "definition") == 0)
|
||||
fprintf(output,"%s ", header[i].value);
|
||||
}
|
||||
|
||||
if (strcmp(header[nbf].name, "definition") == 0)
|
||||
fprintf(output,"%s; ",header[nbf].value);
|
||||
|
||||
fprintf(output,"\n");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user