#

##

## Introduction

GLINT (Global Linkage based Investigation of Naturally occurring Traits) is a workflow for determining what specific genetic loci contribute to traits that differ between moderately related strains of bacteria. The experimental requirements for the procedure are detailed in a recent publication; this page describes the usage of an accompanying set of software tools for postprocessing GLINT data. These tools may also be used in the analysis of ADAM data, in which case the same strain should be given as both the donor and recipient.

## System Requirements

The GLINT software component consists of a series of python scripts, and thus requires a system installation of python and a number of python modules:

- Biopython
- Numpy
- Scipy
- rpy2 (and a functional R installation)

These should be installed through a package manager whenever possible. GLINT is written for pre-3.0 versions of python, and was developed and tested with python 2.7.3 running on Mac OS 10.7.

## Technical Summary

A complete description of the steps in GLINT postprocessing is given in the GLINT paper. In brief, the experimental component of GLINT provides data on the relative fitness of different portions of the donor strain genome when moved into the recipient strain genome, in the form of relative abundances of transferred genomic regions in libraries selected under either baseline conditions or the condition of interest (the test condition). Genomic regions where donor-derived insertions are over-represented in the test condition indicate that the donor strain genetic content at that site is more favorable under the test condition; the opposite is obviously true for cases where donor-derived insertions are under-represented.

The GLINT postprocessing toolkit takes as input probe-level data on the log ratios of donor-derived DNA under the test condition to that in the reference condition; thus, initial analysis and normalization of raw transposon footprinting data is left to the user. Log ratios are used because they tend to yield approximately normal background distributions of selection scores (as described below, GLINT does not assume normality, but does assume that the background distribution of scores from genomic locations with no significant fitness effects will follow a Student-t distribution). The raw data are then corrected for the presence of large indels between the donor and recipient strains by collapsing regions of the donor genome that are not present in the recipient strain, and by normalizing the selection scores based on the distance of each probe from the nearest large indel. GLINT requires as input an alignment of the donor and recipient genomes (preferrably produced using Mauve; only Mauve .xmfa output files can be used at present).

After normalization and remapping of low homology regions, GLINT identifies significant peaks by parameterizing a background distribution (normal or Student-t, selected using the Bayesian Information Criterion), producing p-values for all scores based on that background distribution, and then flagging all scores that are significant at a user-specified false discovery rate. Peaks are then defined as contiguous regions of a specified minimum width in which significant probes cover the entire region with no more than a user-specified distance between them. All parameters used during peak calling can be modified, as described below; the defaults (used in the GLINT paper) are an FDR of 0.05, minimum peak width of 2.5 kb, and maximum distance between significant probes to be combined into a peak of 1 kb. Thus, each peak must contain at least three significant probes, over a space of at least 2.5 kb, with no more than 1 kb between adjacent cases. Due to the large genomic regions (up to approximately 90 kb) transfered by P1-based transduction, true peaks in GLINT or ADAM fitness score profiless tend to involve a broad region (spanning up to a few tens of kb) near the locus actually making the fitness contribution, informing the design of the peak breadth-based filter used here.

The GLINT postprocessing tools comprise a series of python scripts carrying out specific tasks required for the analysis described above, along with the driver script `glint.py`, which runs these other scripts to carry out the appropriate analysis. All user interaction should occur through `glint.py` unless problems are encountered during the analysis.

While the set of tools used here has only been tested on microarray-based transposon footprinting data, and some of the terminology (e.g., "probes") is microarray-specific, we expect that it would work equally well using a next-gen sequencing readout instead. Investigators may wish to experiment with providing the data at each genomic position as a "probe", or lumping the raw bp-level abundance data into psuedo-probes tiling the genome at intervals of a few tens of bp. The authors would greatly appreciate hearing from anyone who attempts such an application.

## Running GLINT

After obtaining normalized selection scores as described above, a configuration file (see below) should be written for each selection of interest, indicating what strains and selections contributed to a given experiment and providing values for optional parameters involved in peak calling. GLINT can then be run with

`python glint.py CONFIG_FILE`

### Configuration files

All required inputs for GLINT must be specified in a single configuration file, which is given on the command line for `glint.py`. The configuration file consists of a series sections denoted in [square brackets], each section containing one or more "key : value" pairs specifying the actual parameters. Lines beginning with '#' are treated as comments. An example section containing three parameters would read:

`[Environment] # set environment variables needed by GLINT glint_bin_dir : /Users/petefred/src/glint/scripts temp_prefix : tmp_crooks_vs_mg1655_kdg output_prefix : crooks_vs_mg1655_kdg`

A complete example is given in the sample usage case below.

The following headers and parameters are recognized in GLINT configuration files. Sections and parameters given in bold are required; others are optional.

Environment -- Information on file naming and location

- glint_bin_dir -- Path to the GLINT scripts
- temp_prefix -- Prefix for temporary files produced by glint.py
- output_prefix -- Prefix for final output files from GLINT analysis

Genome1 -- Information on the donor strain

- name -- Name to be used in output to refer to the donor strain
- seqfile -- Path to a fasta file containing the donor strain genome

Genome2 -- Information on the recipient strain

- name -- Name to be used in output to refer to the recipient strain
- seqfile -- Path to a fasta file containing the recipient strain genome

Alignment -- Information on alignment of the donor and recipient strain genomes

- xmfa_file -- Path to an xmfa file (output by Mauve) containing an alignment of the donor and recipient strain genomes

Readout -- Tranpsposon footprinting data from selection experiments

- ori_file -- Table of all probe positions and orientations (see files included with the example for formatting)
- intensity_file -- Table containing the normalized log ratios of transposon abundances under test and reference conditions (see files included with the example for formatting)

tlpeakfinder -- Parameters for peak calling. Defaults are provided for all parameters in this section, and are given in parenthesis.

- RAVG_WINDOW_HALFWIDTH_PROBES -- Distance (in probes) in each direction to extend the window used in calculating running averages. (100)
- MIN_PEAKWIDTH -- Minimum width, in bp, for a set of significant probes to be called as a peak (2500)
- SIG_COMBINE_WINDOWSIZE_PROBES -- maximum distance, in probes, between two significant values for them to be combined into a single peak (50)
- EXTREME_TAIL_QUANTILE_RAW -- Percentile boundary beyond which data are not included in normalization; for a given value x, cutoffs are placed at x and 100-x (5)
- HOMOLOGY_LOESS_ALPHA -- Width parameter for loess smoothing during homology normalization (0.3)
- PEAK_FDR -- False discovery rate for calling of significant probes (0.05)
- MIN_OPT_Q -- Minimum data quantile to use in fitting the background distribution (0.25)
- MAX_OPT_Q -- Maximum data quantile to use in fitting the background distribution (0.75)

### Input files

Aside from the configuration file described above, several data files are required for GLINT analysis:

- `ori_file` -- File giving the locations and orientations of all probes used in transposon footprinting (see files given with the example for formatting)
- `intensity_file` -- File containing the normalized log ratio selection scores from the test and reference condition at each probe (see files given with the example for formatting)
- `xmfa_file` -- Multiple alignment file produced by Mauve or an equivalent program. xmfa files output by Mauve may be used directly; anything else may require substantial reformatting

### Output files

During normal operation, glint.py will print a few diagnostic messages but otherwise produces no termnal output. However, intermediate files are saved at each step (with a prefix set in the config file); they may be deleted by the user if analysis is successful, or analyzed for sources of error if it is not. The final output from the GLINT peak finder is comprised of the following files:

- `{PREFIX}_tlpeakfinder_peaks.txt` -- locations and average intensities of all significant peaks in the selection score profiles
- `{PREFIX}_tlpeakfinder_nohcorr_scores.txt` -- normalized selection scores at all probes prior to homology corrections
- `{PREFIX}_tlpeakfinder_normed_scores.txt` -- normalized selection scores at all probes after homology corrections
- `{PREFIX}_tlpeakfiner_normed_ma_scores.txt` -- moving average of the normalized, corrected selection scores; used for peak calling

## Example usage case

The GLINT software distribution includes an `examples` directory containing all data needed to reproduce the KDG case from the original GLINT paper. The input files contained here may also be useful in setting up other GLINT applications. To run the sample case, copy the complete contents of `examples/crooks_kdg` to a fresh directory, edit `glint_kdg.conf` to give the correct value of `glint_bin_dir`, and then run `glint.py glint_kdg.conf`

## Contact

Please direct questions and bug reports to Peter Freddolino.

© 2011 Columbia University