+#!/usr/bin/env perl
+#
+#
+# Script to convert GERALD export files to SAM format.
+#
+#
+#
+########## License:
+#
+# The MIT License
+#
+# Original SAMtools version 0.1.2 copyright (c) 2008-2009 Genome Research Ltd.
+# Modifications from version 0.1.2 to 2.0.0 copyright (c) 2010 Illumina, Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+#
+#
+########## ChangeLog:
+#
+# Version: 2.0.0 (15FEB2010)
+# Script updated by Illumina in conjunction with CASAVA 1.7.0 release.
+# Major changes are as follows:
+# - The CIGAR string has been updated to include all gaps from ELANDv2 alignments.
+# - The ELAND single read alignment score is always stored in the optional "SM" field
+# and the ELAND paired read alignment score is stored in the optional "AS" field
+# when it exists.
+# - The MAPQ value is set to the higher of the two alignment scores, but no greater
+# than 254, i.e. min(254,max(SM,AS))
+# - The SAM "proper pair" bit (0x0002) is now set for read pairs meeting ELAND's
+# expected orientation and insert size criteria.
+# - The default quality score translation is set for export files which contain
+# Phread+64 quality values. An option, "--qlogodds", has been added to
+# translate quality values from the Solexa+64 format used in export files prior
+# to Pipeline 1.3
+# - The export match descriptor is now reverse-complemented when necessary such that
+# it always corresponds to the forward strand of the reference, to be consistent
+# with other information in the SAM record. It is now written to the optional
+# 'XD' field (rather than 'MD') to acknowledge its minor differences from the
+# samtools match descriptor (see additional detail below).
+# - An option, "--nofilter", has been added to include reads which have failed
+# primary analysis quality filtration. Such reads will have the corresponding
+# SAM flag bit (0x0200) set.
+# - Labels in the export 'contig' field are preserved by setting RNAME to
+# "$export_chromosome/$export_contig" when then contig label exists.
+#
+#