This week, you will begin a transformation system.
Ultimately, the program will process a set of log files and make a
series of web requests, which in turn will cause the data in the input
files to be stored in a database in a new format. For this week,
your code should handle a single input file, and produce three output
files. The input log files generally describe readings (i.e.,
measurements) for mice on various days, but also include birth
information, transfer information when a mouse is moved between cages,
and other comments. Your task involves separating the birth
information, the transfer information and the reading information.
This is a group project. Use your team resources
Get started right away.
The input files consist of entries
one per line,
and come in two
forms. The first has entries of
9 fields and the second has entries
fields. The first
9 fields in both are the same. The fields are
tab-separated. The first 9 fields are as follows (name:type):
entryDate:date, entryTime:time, weanCage:number, mark:string, readingDate:date, leg1:number, leg2:number, leg3:number, leg4:number
The next 9 fields are as follows:
transferDate:date, oldCage:number, newCage:number, oldMark:string, newMark:string, dateOfBirth:date, birthCage:number, sex:char, comment:string.
I am providing sample input files for the first
and the second type
The three output files correspond to (1) unique mice, (2) transfers of
unique mice from one cage to another, and (3) readings for unique mice
on particular days. Those entries in the input file that have
birth information will populate the first output file; those entries
with transfer information will populate the second file; and those
entries (almost all of them) with reading information will populate the
third output file.
The mice output file should be:
entryDate, entryTime, dateOfBirth, birthCage, sex, readingDate, weanCage, mark, comment
The transfer output file should be:
entryDate, entryTime, readingDate, oldCage, newCage, oldMark, newMark, comment
The reading output file should be:
entryDate, entryTime, weanCage, mark, readingDate, leg1, leg2, leg3, leg4, comment
Email a zip file containing a directory that contains all of your class
files and a README file with any necessary instructions.