Assigned on February 6, 2006
Due by 11AM, February 13, 2006
Submit by email to murali AT cs DOT vt DOT edu
The aim of this homework is to help you get comfortable with
multi-dimensional data structures. In class, we developed a
Network.pm module that contains several methods to read
in and process a network of molecular interactions. The module we
developed ignores the type of the experiment that detected the
interaction. In this homework, you will augment the subroutines in
the module to store and use the experiment type.
Problem 1
(20 points) Modify the read subroutine so that it
also stores the experimental type with each interaction. Recall
that the experimental type is stored in the column named
"EXPERIMENTAL_SYSTEM". Keep in mind that each interaction may be
reported by more than one type of experiment. Write detailed
comments at the statements you add or modify explaining how you
have changed the subroutine and why.
Problem 2
(20 points) Modify the get_num_interactions
subroutine so that it takes a scalar argument. If this argument
is undefined or the empty string, the subroutine works as
before. Otherwise, the subroutine returns the number of
interactions whose experimental type equals the argument. Add a
comment that discusses if there is any difference between the
running time of the subroutine in these two cases.
Problem 3
(60 points) Implement a subroutine called
compute_union that takes two networks as arguments.
You can assume that both networks were created using different
invocations of the read subroutine. The
compute_union subroutine returns a new network. Each
gene (or interaction) in the new network is a gene (or
interaction) in one of the arguments.
Submitting your Homework
You can submit one script named network.pl and the
Network.pm module that solve all problems. The
network.pl script should read in two networks and
exercise all the subroutines you have implemented in this
homework.
Create a directory called
<YourName>-Homework1 and put network.pl
in that directory. Place Network.pm in the
CS5046 subdirectory.
Submit your homework by zipping (or tarring and
gzipping) the directory and emailing the zipped file to me.