188 seqinfo->
code[0] =
'\0';
189 seqinfo->
name[0] =
'\0';
190 seqinfo->
source[0] =
'\0';
202 while((ch=fgetc(fp)) != EOF && ch !=
'>') ;
205 if(ch==EOF)
return(0);
209 while((ch=fgetc(fp)) != EOF && ch !=
'\n' && i<503)
210 buffer[i++] = (char)ch;
214 if(ch==EOF)
return(0);
220 if(buffer[2] ==
';' && buffer[0] ==
'F')
235 strncpy(seqinfo->
code, ptr, 16);
236 seqinfo->
code[15] =
'\0';
241 for(i=0; seqinfo->
code[i]; i++)
243 if(seqinfo->
code[i] ==
' ' || seqinfo->
code[i] ==
'\t')
245 seqinfo->
code[i] =
'\0';
252 if(!fgets(buffer,240,fp))
266 if((ptr = strstr(buffer,
" - ")) !=
NULL)
269 strncpy(seqinfo->
source, ptr+3, 160);
270 seqinfo->
source[159] =
'\0';
272 strncpy(seqinfo->
name, buffer, 160);
273 seqinfo->
name[159] =
'\0';
286 if((seqs[nseq] = (
char *)malloc(ArraySize *
sizeof(
char)))==
NULL)
297 while((ch = fgetc(fp)) != EOF && ch !=
'*' && ch !=
'>')
306 else if(ch ==
';' && chpos == 2)
314 while((ch = fgetc(fp))!=EOF && ch !=
'\n') ;
317 else if(ch !=
' ' && ch !=
'\t')
320 seqs[nseq][SeqPos++] =
321 (upcase ? (isupper(ch) ? ch : toupper(ch)) : ch);
324 if(SeqPos >= ArraySize)
327 seqs[nseq] = (
char *)realloc((
void *)(seqs[nseq]),
329 if(seqs[nseq] ==
NULL)
342 seqs[nseq][SeqPos] =
'\0';
344 if(++nseq >= maxchain)
366 seqs[nseq][SeqPos] =
'\0';
367 if(!strlen(seqs[nseq]))
#define KILLTRAILSPACES(x)
Header file for sequence handling.
#define KILLLEADSPACES(y, x)
System-type variable type definitions.
int blReadRawPIR(FILE *fp, char **seqs, int maxchain, BOOL upcase, SEQINFO *seqinfo, BOOL *error)