#!/usr/bin/perl -w -I/home/stanley/ViennaRNA-1.5/Perl/blib/arch -I/home/stanley/ViennaRNA-1.5/Perl/blib/lib
############################################################################
# AUTHOR: Stanley NG Kwang Loong, stanley@bii.a-star.edu.sg
# DATE: 31/07/2005
# DESCRIPTION: Generates stats from fasta
############################################################################
use warnings;
use strict;
use Getopt::Long;
use RNA;
############################################################################
# Global Parameters and initialization if any.
############################################################################
my $inFile="&STDIN";
my $outFile="&STDOUT";
#Define the monomers and dimers
my %gl_monomers = ('A' => 0,'C' => 0, 'G' => 0, 'U' => 0);
my %gl_dimers = ('AA' => 0, 'AC' => 0, 'AG' => 0, 'AU' => 0,
'CA' => 0, 'CC' => 0, 'CG' => 0, 'CU' => 0,
'GA' => 0, 'GC' => 0, 'GG' => 0, 'GU' => 0,
'UA' => 0, 'UC' => 0, 'UG' => 0, 'UU' => 0);
my $numseqs = 0;
############################################################################
# File IO
# Parse the command line.
############################################################################
Getopt::Long::Configure ('bundling');
GetOptions (
'i|input_file=s' => \$inFile,
'o|output_file=s' => \$outFile
);
if(scalar(@ARGV) == 1 || !defined($inFile) || !defined($outFile)) {
die ("USAGE: $0 -i -o