CSE 303 Homework 4: Files for Testing

Sample Solution Executables

African Swine Flu Genes

Bonus Additional Testing Support

I wrote a little perl script that will compare the output of your program to a file of actual gene data (like actualSwineGenes.txt).

To use it, perl must be installed on your system. It is installed on attu and lab PCs. If it is not installed on your system, rerun cygwin setup to get it.

This is unsupported software. For it to work at all, I have had to guess what the output of your programs will look like, generally speaking. If yours is atypical, it may not work. I cannot debug issues with it -- it's a bonus tool, not something required. Use it if you want, or ignore it if you want.

To use it:

  • Fetch compareGenes.pl. Make sure it has execution permission turned on.

  • Pipe the output of your program into a file, say, foundGenes.txt. compareGenes.pl assumes that if any line of your program's output contains two strings of digits, the first string of digits is an integer giving the left position of the gene and the second is the right position. If that isn't true of your output, you can't use compareGenes.pl, at least not without modifying it.

  • Issue a command like:
    perl compareGenes.pl 100 actualSwineGenes.txt foundGenes.txt | less
    
    The meaning of the arguments should be obvious to you. The output shows a line for each gene from the first file that is longer than 100 codons (in this case, because of the argument 100 on the command line). If the found genes file contains a line with an identical right side of a gene, the found left side then the actual left side are printed. If the found genes does not contain a line with an identical right side of the gene, "NOT FOUND" is printed.

  • Here is the beginning of the output, when foundGenes.txt is produced from the sample solution executable:
    5141:   4572 vs. 4608
    14723:  14175 vs. 14259
    19194:  17719 vs. 17725
    20233:  19388 vs. 19391
    21915:  20362 vs. 20398
    23440:  21905 vs. 21944
    25224:  23548 vs. 23638
    27052:  25487 vs. 25532
    29004:  27319 vs. 27376
    30480:  30079 vs. 30166
    31467:  31108 vs. 31111
    31952:  31479 vs. 31497
    33127:  32243 vs. 32297