*** Limitations ***

1) last-reduce-alignments.sh does not work with centroid alignments.

2) The scripts that read MAF format work with the simple subset of MAF
   produced by lastal, but they don't necessarily work with more
   complex MAF data from elsewhere.


*** last-dotplot.py ***

This script makes a dotplot, a.k.a. Oxford Grid, of alignments in LAST
tabular format.  It requires the Python Imaging Library to be
installed.  If there are too many chromosomes, the dotplot will be
very cluttered, or the script might give up with an error message.  So
you may want to remove alignments involving fragmentary chromosomes
first, e.g. using "grep -v".  To get a usage message:

  last-dotplot.py --help

To make a png-format dotplot of alignments in a file called "a":

  last-dotplot.py a a.png

To get a nicer font, try something like:

  last-dotplot.py -f /usr/share/fonts/truetype/freefont/FreeSans.ttf a a.png

If the fonts are located somewhere different on your computer, change
this as appropriate.  To limit the plot to 500x500 pixels:

  last-dotplot.py -x 500 -y 500 a a.png


*** maf2tab.py ***

This script simply converts MAF-format alignments to tabular format.
This is needed to feed MAF alignments to last-dotplot.py.  Usage:

  maf2tab.py my-alignments.maf > my-alignments.tab


*** last-reduce-alignments.sh ***

This script removes "uninteresting" alignments from LAST genome
comparisons in MAF format.  Roughly speaking, it removes paralog
alignments and keeps ortholog alignments.  More precisely, if region A
in genome 1 aligns with region B in genome 2, but if A also aligns
more strongly with a different region X and B aligns more strongly
with a different region Y, then the alignment of A with B is removed.
This procedure is conservative: it is unlikely to remove one-to-one
orthologs, but it may keep some paralogs, e.g. if the ortholog is
(wholly or partially) deleted in one genome.  The usage is simple:

  last-reduce-alignments.sh my-alignments.maf > reduced-alignments.maf

There is also an option to remove alignments more aggressively: if A
aligns more strongly with X *or* B aligns more strongly with Y, then
the alignment of A with B is removed.  This is still unlikely to
remove one-to-one orthologs, but it may cause some regions that are
alignable to something to be aligned to nothing.  This option is
selected with "-d":

  last-reduce-alignments.sh -d my-alignments.maf > reduced-alignments.maf


*** maf-sort.sh, maf-swap.py, last-remove-dominated.py ***

These scripts are used by last-reduce-alignments.sh, but you might
find other uses for them.  maf-swap.py swaps the order of the
sequences in MAF-format alignments, and makes sure the new top
sequence is '+'-stranded.  maf-sort.sh sorts MAF-format alignments by
sequence name, then start position, then end position, of the top
sequence. last-remove-dominated.py reads sorted alignments, and
removes alignments of A in genome 1 with B in genome 2 if A also
aligns more strongly to a different region X.
