2 * meval, count the complexes containing a motif
4 * Copyright (C) 2012 Ali Gholami Rudi <ali at rudi dot ir>
6 * This program is released under the modified BSD license.
15 static int readcmplx(char cmplx
[][NLEN
], char *s
)
18 while (*s
&& *s
!= '\t')
22 while (*s
&& !isspace(*s
))
25 while (*s
&& isspace(*s
))
31 int main(int argc
, char *argv
[])
33 char cmplx
[NPROTS
][NLEN
];
34 char **query
= argv
+ 1;
40 printf("usage: %s PROT1 PROT2 ... <complexes\n", argv
[0]);
43 while (fgets(line
, sizeof(line
), stdin
)) {
44 int clen
= readcmplx(cmplx
, line
);
45 for (i
= 0; i
< qlen
; i
++) {
46 for (j
= 0; j
< clen
; j
++)
47 if (!strcmp(query
[i
], cmplx
[j
]))
55 printf("%d\n", matches
);