File Input/Output and Basic Text Processing

The data files you need for this assignment are located inside a directory named /home/guest/source/. (from your home directory, this can also be accessed as ../guest/).

These files may also be obtained directly from here. If you copy them to your own directory, make sure that the .txt format is unchanged (not edited).


The ../guest/source subdirectory contains four text files from the UniGene database. Each file describes one gene.

Write a program that receives one of the following gene names: 'ADH2', 'CEACAM4', 'TGM1', 'GLDC', opens the file for that gene name (i.e. TGM1.txt), extracts the list of tissues in which this gene is expressed (i.e. esophagus;germ cell;larynx;pancreas;uterus; colon;head_neck;uterus) and prints this to the screen (or to a file with the extension ".express")

The output file should have the following format (example is for the TGM1 gene):


1. Esophagus
2. Germ Cell
3. Larynx
4. Pancreas
5. uterus
6. Colon
7. Head Neck
8. Uterus


Course Home Page.