usage
-----
./averageDistribution peaksGenes.txt gff3File.gff3 samFile.sam #upstreamBases #downstreamBases relativeSize

Description
-----------
Each gene region (promoters (A), exons (B) or downstream regions (C)) has been subdivided in "relativeSize" (parameter set at 100 for this paper) consecutives and equispaced segments. 
"averageDistribution" application counts the number of reads (from sam file) that affect to each segment (for each gene).

Output files
------------
sheet_Promoters.txt      : for each promoter   of each gene from peaksGenes.txt reports the amount of reads that affect each segment.
sheet_Exons.txt          : for each exon       of each gene from peaksGenes.txt reports the amount of reads that affect each segment.
sheet_Terminators.txt    : for each terminator of each gene from peaksGenes.txt reports the amount of reads that affect each segment.
genesVsAmountOfExons.dat : reports amount of exons of each gene from file peaksGenes.txt




Execution Steps
---------------
1) Save the files in a directory
2) type: make
3) Edit executeIt file and verify:
   a) the gff3 file is at ../../../../data/tomatoGenome/ITAG_pre2.3_gene_models.gff3  directory. Otherwise modify it.
   b) the sam  file is at ../../../../data/tomatoGenome/A8_400.sam                    directory. Otherwise edit the executeIt script file.
4) type: source executeIt

The output will be placed at result directory. 


Included files
--------------
averageDistribution.cpp   : main code
Tools.cpp                 : common routines
Tools.h                   : common routines
AnnotationGFF3.cpp        : code to work with gff3 file
AnnotationGFF3.h          : code to work with gff3 file
Makefile                  : file to automatize the compilation of the application
peakGenes_Promoters       : data file with peak gene names (only preferred binding location at promoters  )
peakGenes_Exons           : data file with peak gene names (only preferred binding location at exons      )
peakGenes_Terminators     : data file with peak gene names (only preferred binding location at terminators)
executeIt                 : A script to execute the application to generate the paper input data
readme.txt                : This file
sheet_PromotersPeak.xls   : A summary of results from executeIt execution (genes which preferred binding location is at promoters  )
sheet_ExonsPeak.xls       : A summary of results from executeIt execution (genes which preferred binding location is at exons      )
sheet_TerminatorsPeak.xls : A summary of results from executeIt execution (genes which preferred binding location is at terminators)