eee156fc5511ef82b4e583ce9b160323b4c71112
4 int main(int argc
, char* argv
[])
8 printf("Usage: %s filepath\n", argv
[0]);
15 int occs
[4] = {0, 0, 0, 0};
17 FILE *f
= fopen(argv
[1], "r");
20 printf("Unable to open file...");
24 while((c
= fgetc(f
)) != EOF
)
28 if(charsperline
!= 100 || numlines
> 500)
35 /* Fancy polynome that translates A: 0, C: 1, G: 2, T: 3 */
36 if(c
== 'A' || c
== 'C' || c
== 'G' || c
== 'T')
37 occs
[(int)(.001657140781*c
*c
*c
-0.3780662484*c
*c
+28.74757194*c
-726.3545635)] += 1;
47 printf("A: %d\nC: %d\nG: %d\nT: %d\n", occs
[0], occs
[1], occs
[2], occs
[3]);