You need to make a perl script to calculate the degree of a node in a given graph.
HW 6: To calculate the degree of a node in the protein-protein interaction network
You need to make a perl script to calculate the degree of a node in a given graph. The graph is saved as a list of edge in a file named “ATH_PPI.list”, which is a plain text file and you may open it with any text edit program.
You need to download and install perl.
For Mac OS and Linux, please download from http://www.perl.org/
For MS Windows, please download ActivePerl from http://www.activestate.com/activeperl
Tutorials.
Tutorials for beginner
http://www.perl.com/pub/2000/10/begperl1.html
http://www.comp.leeds.ac.uk/Perl/start.html
http://www.perl.org/books/beginning-perl/
Free online books
http://www.cs.cf.ac.uk/Dave/PERL/perl_caller.html
http://www.perl.org/books/library.html
http://www.freebookcentre.net/Language/Free-Perl-Books-Download.html
Program with perl
Step 1: read in the edges from ATH_PPI.list, which is a plain text file. One line is an edge. Each edge has two notes. You may search graph theory to get more knowledge on concept of edge and node.
Step 2: remove the redundant edges and self-connected edges (loop)
For example, the following edges are same
AT1G69450 AT3G54510
AT3G54510 AT1G69450
AT1G69450 AT3G54510
For example, the following is a self-connected edges (loop)
AT3G54510 AT3G54510
Step 3: calculate the degree of each node, and print them out
Step 4: Calculate the distribution of degrees (histogram)
Plot a figure for distribution of degree v.s. degrees. Take logarithm for both distribution of degree v.s. degrees. It will look like a line. Can you fit it with a line, and get the slope of this line. You don’t need to program with perl for this step.
I need your source code, output, and figure.
n concept of edge and node.
Step 2: remove the redundant edges and self-connected edges (loop)
For example, the…





