The code has been tested with python 2.7.
main.py and Evaluation.py are code from the protein function prediction framework in https://www3.nd.edu/~cone/LNA_GNA/. Their usage is directly incorporated already.

First, use get-feats.py to obtain feature vectors of a node pair. This is the usage:

	python ./get-feats.py [shared-list] [human.ncount] [yeast.ncount] [k] [feat] [outf] [go frequency] [thresh]

[shared-list]: In this file, each line should contain a human protein, a yeast protein, and any experimental biological process GO terms they share, tab delimited (if no GO terms are shared, the line should still contain the human and yeast protein). For example, here is what a few lines may look like:

	RNF14   SYP1
	RNF14   SHE10
	RNF14   STP1    GO:0045893 

GO data describing a GO term can be found here: http://geneontology.org/page/download-ontology
GO annotation data can be found here: http://geneontology.org/page/download-go-annotations
As these files are very large, we are unable to provide them.

[human.ncount] and [yeast.ncount]: These files should contain the graphlet counts of human and yeast PPI networks. A given line should contain the name of the protein and its GDV. An example line is as follows:
	RNF14	31 4133 434 31 452200 103677 453070 3692 3606 23434 11539 720 781 70 13 45184036 10629067 5398018 91802832 90069939 10893252 1206557 43110966 21579 10872375 1126769 246821 2727588 553226 1118678 63570 6368790 1408544 7773 118068 1354747 583950 804570 75110 753954 295306 15508 1458 55585 170 467761 135712 16179 23722 76266 4942 58883 30519 10138 18948 56 82406 7688 262 22874 3120 83 3913 1502 1215 2313 1004 66 281 1 94 16 1

[k]: This is the ground truth parameter for how many GO terms need to be shared for a node pair to be counted as functionally related. 

[feat]: This is the feature. "gdvdiff" should be used.

[outf]: This is the output file. Note that because we take 10 random samples for the negative class, the numbers 0-9 will be appended.

[go frequency]: This is a file containing every experimentally inferred biological process GO term and how many proteins they annotate. An example line looks like:
		
		GO:0002949	4

meaning the GO term GO:0002949 annotates 4 proteins.

[thresh]: This is the GO term rarity threshold. Options are 'ALL', '50', or '25'.

Here is an example run:

	python ./code/get-feats.py ./data/real-world/human-yeast-shared-terms-EXP.txt ./data/real-world/human.ncount ./data/real-world/yeast.ncount 3 gdvdiff ./data/real-world/results/atleast3-EXP-gdvdiff.csv ./data/real-world/go-frequency.txt ALL

Then, use prediction-with-prot-pairs.py. 
	
	python ./prediction-with-prot-pairs.py [data] [outf] [seed] [perc] [thresh]

[data]: The input to this should be the output file of get-feats.py. 

[outf]: This is the stem of where the output file should be written. 

[seed]: This is the random seed. 0-9 should be used, which correspond to the 0-9 of the random samples.

[perc]: This is the percent of data that should be used as training, which should be in the format '0.x'.

[thresh]: This is the GO term rarity threshold. Options are 'ALL', '50', or '25'.

	python ./code/prediction-with-prot-pairs.py ./data/real-world/results/atleast3-EXP-gdvdiff.csv ./data/real-world/results/atleast3-EXP 0 0.9 ALL

This will result in several output files. 

	atleast3-EXP-90.0.txt0 contains the alignment.
	.config0 files contain configuration for the protein function prediction framework.
	atleast3-EXP-90.0.txt.out0 contains the output of the protein function prediction framework.
	atleast3-EXP-training-time-90.0.time contains the amount of seconds it took to train the data.
	atleast3-EXP-pred-time-90.0.time contains the amount of seconds it took to make predictions on the remaining data.
	atleast3-EXP-90.0.time contains the amount of seconds the protein function prediction took.
	atleast3-EXP-90.0.txt.out0predlist.txt contains the predicted list of protein-GO term pairs.


