###########################################################################
# RNAcop Utility Scripts                                                  # 
# #######################                                                 #
#                                                                         #
# Scripts for data processing and visualization of RNAcop output          #
#                                                                         #
#    Copyright (C) 2015  Nikolai Hecker                                   #
#                                                                         #
#   This program is free software: you can redistribute it and/or modify  #
#   it under the terms of the GNU General Public License as published by  #
#   the Free Software Foundation, either version 3 of the License, or     #
#   (at your option) any later version.                                   #
#                                                                         #
#   This program is distributed in the hope that it will be useful,       #
#   but WITHOUT ANY WARRANTY; without even the implied warranty of        #
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         #
#   GNU General Public License for more details.                          #
#                                                                         #
#   You should have received a copy of the GNU General Public License     #
#   along with this program.  If not, see <http://www.gnu.org/licenses/>. #
#                                                                         #
###########################################################################

If you have suggestions for improvement, comments or for reporting bugs, please
send me an email: hecker@rth.dk

CONTENT
#######
1) rank_flanks.pl
2) flank_viennaconstraint.pl
3) overlay_dotplots.pl
4) mat_contour.R
5) convert_rddG2logProb.Rscript
6) plot_mat_contour.Rscript
7) plot_mat_contour_png.Rscrip
8) sort_goodregion.Rscript




1) rank_flanks.pl
##################
'rank_flanks.pl' creates a ranked list of flanking regions for each entry 
separately from RNAcop output. IMPORTANT RNAcop has be run with the option to 
print all pair-wise combinations of flanking regions (This is the default).
For each entry a separate tab-separated file (TSV) is generated. 
The suffix '_rddG.tsv' will be appended to each output file.

2) flank_viennaconstraint.pl
############################
'flank_viennaconstraint.pl' is a script which can be used to extract a 
sequence-structure constraint with specified flanking region lengths from
a full lengths sequence-structure constraint file.

3) overlay_dotplots.pl
######################
Given dot plots generated by RNAfold (ViennaRNA package) of two 
structure-constraint files which contain the same base pair constraints, but a
different sequence lengths, 'overlay_dotplots.pl' generates overlayed dot plots.
The consensus structure and base pair probabilities overlapping with the
consensus structure are indicated by empty and filled rectangles, respectively.

4) mat_contour.R
################
Contains R functions for converting 'rank_flanks.pl' output into probability
matrices, etc.

5) convert_rddG2logProb.Rscript
###############################
Convert 'rank_flanks.pl' output TSV into a log10 probability TSV file. 
Requires 'mat_contour.R' to be in the folder where it is executed.

6) plot_mat_contour.Rscript
###########################
Creates a probability landscape plot from '*rddG.tsv' files, i.e. 
'rank_flanks.pl' output files. Generates postscript output.
Requires 'mat_contour.R' to be in the folder where it is executed.

7) plot_mat_contour_png.Rscript
###############################
Creates a probability landscape plot from '*rddG.tsv' files, i.e. 
'rank_flanks.pl' output files. Generates PNG output.
Requires 'mat_contour.R' to be in the folder where it is executed.

8) sort_goodregion.Rscript
##########################
Sorts 'findgoodregion' output by first by maximum area size ('area'), 
second by maximum log10 probability ('logp').
Requires 'mat_contour.R' to be in the folder where it is executed.
