***********************************************************************************
* Please reference the following paper if this package was used in your analysis: *
* Title: A multi-layer inference approach identifies regulators of TROP2		  *
* Authors: Ming Wu, Li Liu, Christina Chan										  *
***********************************************************************************

Run the following commands: 
---------------------------
> layer_1(ExpressionMatrix, Phenotype, k, n, IDs)
> layer_2_3(TF, PPT, TF_TargetGenes, ExpressionMatrix, Phenotype, IDs, k)

Example:
layer_1('matrix.csv', 'label.txt', 4, 2, 'probeID.txt')
layer_2_3('TF.txt', 'PPT.txt', 'TF_TargetGenes.txt', 'matrix.csv', 'label.txt', 'probeID.txt', 4)

The ExpressionMatrix, Phenotype, IDs, TF, PPT, TF_TargetGenes files should be placed in the "Input" folder.

After running layer_1 and layer_2_3, the "Output" folder will contain the following 3 files:
1- 'CandidateGenes.txt' contains the top n candidate genes identified.
2- 'TF_CandidateGene_MI.csv' contains the conditional mutual information between the candidate genes 
and their possible transcription factor regulators.
3- 'TF_Relief_Score.csv' contains the list of transcription factors and their relief score.

Sample ExpressionMatrix file:
-----------------------------
Rows are samples
Columns are features(genes)

Example(3 samples x 4 genes matrix):
6.5556	5.4227	6.0004	5.5945
7.2122	5.3427	6.1638	5.095
8.6711	7.4828	6.5945	6.5691

Sample Phenotype file:
----------------------
Label of samples (ex. 0 or 1)

Example:
0
1
0
1
1
1
...
...

k:
--
Number of nearest neighbors for Relief

n:
--
Number of candidate(Top Ranked) genes to return based on relief score

Sample IDs file:
----------------------
Probe/Transcript IDs of all genes

Example:
244901_at
244902_at
244903_at
244904_at
244905_at
244906_at
244907_at
244908_at
244909_at
244910_s_at
244911_at
...
...

Sample TF file:
---------------
CandidateGene1	TF1, TF2, ...
CandidateGene2	TF1, TF2, ...
...
...
CandidateGene10	TF1, TF2, ...

Example:
263023_at	254090_at 254093_at
253532_at	254091_at 254093_at
266240_at	254092_at 254093_at 254095_at
255257_at	254093_at
246478_at	254094_at
256859_at	254095_at
258662_at	254096_at
258571_at	254097_at
262229_at	254098_at 254099_at
250660_at	

Sample PPT file
---------------
Protein1
Protein2
...
...

Example:
254100_at
254101_at
254102_at
254103_at
254104_at
254105_at
254106_at
254107_at
254108_at

Sample TF_TargetGenes file
--------------------------
TF1	TargetGene1, TargetGene2, ...
TF2	TargetGene1, TargetGene2, ...
...

Example:
254090_at 245273_at 245274_at 245275_at 245276_at
254091_at 245277_at 245278_at 245279_at
254092_at 245280_at 245281_at 245282_at 245283_at 245284_at
254093_at 245285_s_at 245286_at 245287_at
254094_at 245288_at 245289_at 245290_at
254095_at 245291_at
254096_at 245292_at
254097_at 245293_at
254098_at
254099_at 245294_at 245295_at