latex Module

Module for running LaTex (pdflatex) for mapmuts package..

This module contains functions that run pdflatex, if it can be found in the current search path. This can be assessed using PdflatexAvailable. If PdflatexAvailable() == False, none of the other functions in this module will run.

Written by Jesse Bloom.

List of functions

PdflatexAvailable : is pdflatex available?

MakeAlignmentsSummary : uses pdflatex to make a summary of the plots generated by mapmuts.main.MakeAlignmentsPlots.

MakeParseSummary : uses pdflatex to make a summary of the plots generated by mapmuts.main.MakeParseNTCodonCountsPlots.

Documentation for functions

Documentation for individual functions is provided in their definitions below.

latex.MakeAlignmentsSummary(outfileprefix, minq, maxn, minoverlap, maxrm, maxa1m, maxa2m, maxgenem, title)

Makes PDF summary of mapmuts.main.MakeAlignments output.

This function assembles the plots created by mapmuts.main.MakeAlignmentsPlots into a single LaTex file, which is then compiled using pdflatex. The resulting output PDF will contain all of the plots created by mapmuts.main.MakeAlignmentsPlots, plus information about the alignment settings. This function requires the plots created by mapmuts.main.MakeAlignmentsPlots to already be created.

The first nine calling arguments have the exact same meaning as in mapmuts.main.MakeAlignmentsPlots.

title specifies a string that is printed as the summary title.

The final output file generated will have the name "%s_makealignments_summary.pdf" % outfileprefix. Various other LaTex files (such as *.aux and *.tex files) of the same base name will also be created.

This function will raise an exception if PdflatexAvailable() == False, since in that case the Latex summary cannot be created.

latex.MakeParseSummary(outfileprefix, r1exclude, r2exclude, title)

Makes PDF summary of mapmuts.main.ParseNTCodonCounts output.

This function assembles the plots created by mapmuts.main.ParseNTCodonCountsPlots into a single LaTex file, which is then compiled using pdflatex. The resulting output PDF will contain all of the plots created by mapmuts.main.ParseNTCodonCountsPlots, plus information about the alignment settings. This function requires the plots created by mapmuts.main.ParseNTCodonCountsPlots to already be created.

The first three calling arguments have the exact same meaning as in mapmuts.main.MakeAlignmentsPlots.

title specifies a string that is printed as the summary title.

The final output file generated will have the name "%s_parsesummary.pdf" % outfileprefix. Various other LaTex files (such as *.aux and *.tex files) of the same base name will also be created.

This function will raise an exception if PdflatexAvailable() == False, since in that case the Latex summary cannot be created.

latex.PdflatexAvailable()

Tests of pdflatex can be accessed in the current path.

If pdflatex is not available, returns False.

Otherwise, returns a non-empty string giving the version number of pdflatex.

latex.Runpdflatex(infile)

Runs pdflatex on a *.tex file.

This function can only be run if PdflatexAvailable().

infile : name of a *.tex file on which we run pdflatex twice to generate the output *.pdf file from infile. If a PDF file with this basename already exists, it is deleted before running pdflatex.