#################################################################################
#										#
#				S C R I P T S					#
#										#
#################################################################################
Files that come with the package:

./data/AT_Genome_Upstream.fa //All upstream regions we have are as seen on the positive strand
./data/AT_motifs
./data/motif_names //This can be generated instead of being ported
./data/AT_Genomewide_Motifs.txt //FindMotifs.pl run on entire genome
---------------------------------------------------------------------------------
Scriptname: SQL-retrieve-genome-upstream.sql
Syntax: Call as input to psql command from shell
Function: Retrieves all AT upstream regions from pops database
Output: AGI<tab>strand<tab>upstream-seq
Annot: Again, use guest username and password while using this query
with the psql command.
---------------------------------------------------------------------------------
Scriptname: GetPromoter.pl
Syntax: GetPromoter.pl <input file with AT numbers> <output file>     
Function: Connects to 'pops' database on expresso.cs.vt.edu           
           and retrieves upstream regions of the genes whose AGIs      
           are in the input file with AT numbers, one on each line     
Output: Upstream regions, AGI and strand on one line, upstream        
         sequence on next line                                         
Remaining: Connect with some guest username and password. 
Create a guest account in pgsql and use it to access the database 
from the script. That was everybody will be able to use the script.
Check: Working correctly. Error checks incorporated. Mar 18 2005
---------------------------------------------------------------------------------
Scriptname: SelectSequences.pl
Syntax: SelectSequences.pl <File1-AtNums> <File2-Superset Seqfile> <Outfile> <flag>
Function: If flag==1, extract all sequences from File2, whose AtNums are in File1
	  If flag==0, extract all seq from File2 whose AtNums are NOT in File1
Ouput: Same format as input sequence file
Check: Working correctly. Error checks incorporated. Mar 18 2005
---------------------------------------------------------------------------------
Scriptname: GetXUpstream.pl
Syntax: GetXUpstream.pl <Input Fasta File> <Output File> 
        <Number of Upstream bases to extract X>
Function: Extracts X basepairs from the input fasta file sequences
          and output sequences of length X to output file
Output: Same format as input file but sequences of length X
Check: Working correctly. Error checks incorporated. Mar 18 2005
---------------------------------------------------------------------------------
Scriptname: FindMotifs.pl
Syntax: FindMotifs.pl <File1 containing Motifs> <File2 containing upstream 
	sequences to be scanned> <Ouput File>
Function:  Looks for motifs from File1 in sequences in File2
           by exact matching (on both strands) and outputs matches and positions
Output: Records of type Sequence_ID\tMotif_ID\tMatch\tUpstream_Starting_Position
        \tUpstream_Ending_Position\tstrand\tTATAstart\tTATAend\n
Check: Working Correctly. Error checks incorporated. Mar 18 2005
---------------------------------------------------------------------------------
To Be Inserted: Script for eliminating duplicates


---------------------------------------------------------------------------------
Scriptname: CountMotifs.sh
Syntax: CountMotifs.sh <file-with-pattern-names> <output-of-FindMotif>
	<output for genome> <output-file>
Output: Motifwise counts for foreground set vs genome
	<motif><tab><count in promoter set of interest><count in entire genome>
Check: Working Correctly. Error CHecks incorporated. But this script is actually 
       not needed.
---------------------------------------------------------------------------------
Scriptname: GetMotifCounts.pl
Syntax: GetMotifCounts.pl <inputfile> <outputfile> <globalcntfile>
Input: <genename><motifname><motifseq><startpos><endpos><startTATA><endTATA>
       This is the output file of FindMotifs.pl 
Output: Count of each kind of motif in each gene
	Global count of each motif
Check: Tested. Error checks incorporated. Mar 18 2005
---------------------------------------------------------------------------------
Scriptname: MakeAprioriMatrix.pl
Syntax: MakeAprioriMatrix.pl <2-column gene-motif file> <output file-name>
Input: 2-column gene-motif file                               
Output: Apriori Binary Input Matrix 
Check: Tested. Error Checks incorporated. Mar 18 2005
---------------------------------------------------------------------------------
Scriptname: Chi-Square.pl
Function: Builds chi-square contingency table with genome as control
Syntax: Chi-Square.pl <# in expt> <#-control> <countfile> <outfile> 
Output: p-value for each motif
Check: Tested. Error Checks incorporated. Mar 18 2005
---------------------------------------------------------------------------------
Scriptname: Hypergeometric.pl
FUnction: Finds hypergeometric tail p-value for different
          itemsets from Greg's Apriori algorithm
Syntax: Hypergeometric.pl <apriori input> <output file> <sig-itemsets file> <#fam-genes>
Output: Counts for different itemsets in our output & genome 
	p-value for each of these counts
Dependency: Output from GetMotifCounts.pl sgould be called
	    genomemotifcount and placed in the same directory
Catch: Be careful about placing PDF.pm and genomemotifcount in the same directory 
       in which the script is run
Check: Tested. Error Checks incorporated. Mar 19 2005
----------------------------------------------------------------------------------
Scriptname: Sig2Output.pl
Function: This takes as input the file of significant itemsets and the original
	  output file from FindHSEMotifs.
Syntax: Sig2Output.pl <sig-itemset file from apriori> <original output file from FindMotifs> <output file>
Output: Only significant itemset hits from the original output file
Check: Tested. Error Checks incorporated. Mar 19 2005
----------------------------------------------------------------------------------
