BACKGROUND
comprehensively identifying genetic variation is critical for understanding the rate and character of genome evolution in laboratory experiments  <cit> , locating the mutations that cause mendelian diseases, tracking clonal evolution in cancer progression  <cit> , and profiling the emergence of new microbial pathogens and their evolution during chronic infections  <cit> .
evolutionarily related genomes may exhibit single-nucleotide variation  and short insertion or deletion  variation, but also structural variation  consisting of larger chromosomal deletions, insertions, and rearrangements.
sv may typically have a greater effect on the functions of target genes than snv and indels, and these types of mutations may also give rise to novel phenotypes that are inaccessible by the other classes of mutations  <cit> .
however, sv is more difficult to predict than snv and indel variation from dna sequencing data, particularly short-read data like that produced by many next-generation technologies.
here, we examine the case of genome “resequencing” where a high-quality and complete reference genome exists that is closely related to the dna sequencing sample that is being analyzed.
structural variation in genome resequencing data is commonly predicted using two distinct types of evidence derived from how reads map to a reference genome: paired-end mapping  and split-read alignment  evidence.
programs such as breakdancer  <cit> , svdetect  <cit> , and variationhunter-cr  <cit>  identify possible sv by examining pem data for genomic locations associated with read pairs mapped with anomalous insert sizes or pair orientations.
a disadvantage of using only this information is that, generally, it cannot resolve the exact location of a breakpoint and the new sequence junction it creates.
thus, programs such as pindel  <cit> , fusionseq  <cit> , fusionmap  <cit> , and tophat <dig>  <cit>  predict sv using post-processing modules or read-mapping programs that exploit sra evidence, usually in conjunction with pem evidence, to determine exact sequence breakpoints.
a final strategy for predicting sv is to perform de novo assembly of the sequencing reads and then map the resulting contigs back to the reference genome to find discrepancies resulting from large-scale chromosomal changes  <cit> .
most current software tools for predicting genome structural variation are intended for use with the human genome, or at least a diploid eukaryotic genome.
in these large genomes of  <dig> mb to  <dig> gb, computational speed and memory usage can become an issue, so reads that map to repetitive genomic regions are typically disregarded  <cit>  or may even be removed from a sample prior to sequencing .
the computational search space for valid sras may be further restricted by algorithms that look specifically for gene fusions  or use species-specific databases of repeats  <cit> .
however, many common types of structural variation can only be detected by exploring read alignments to repeat sequences in genomes, and these existing tools are not easily adapted to haploid microbial genomes without substantial modifications and optimization by the end user.
in lieu of a proven software tool for predicting svs in microbial genomes, ad hoc workflows have been employed by labs that resequence microbial genomes.
these approaches may involve manually examining regions where read matches greatly diverge from the reference  <cit> , post-processing the output of sv-prediction tools that examine sra and pem evidence  <cit> , or comparing the output of de novo assembly tools to the reference genome  <cit> .
each of these approaches requires significant manual examination of the results to extract true-positives from a high background rate of spurious predictions and to precisely describe the sequence changes caused by mutations that lead to structural variation.
this high cost in time and effort means that in many cases, structural variation is simply not analyzed  <cit> .
thus, only a fraction of the true genetic variation is profiled in many studies of closely related strains.
we have implemented a split-read alignment analysis procedure that accurately predicts mutational events leading to structural variation in clonal samples of haploid microbial genomes as part of the breseq computational pipeline  <cit> .
preliminary versions of the breseq sv prediction pipeline described here have been previously used in several experimental studies .
here, we fully describe the prediction methods and demonstrate robust performance on simulated e. coli resequencing data sets with typical read lengths and depths of genomic coverage.
then, we use breseq to identify mutations leading to structural variation that evolved during an evolution experiment with e. coli k- <dig> that was previously used to estimate the spontaneous rates of mutations leading to snvs and indels in this organism.
mutations leading to sv, in particular transposition of insertion sequences and deletions mediated by these mobile elements, represent ~25% of the spontaneous mutations in this strain.
their prevalence highlights the importance of predicting sv in genetic studies of microorganisms.
implementation
breseqoverview
breseq  is an integrated computational pipeline intended for predicting mutations in haploid genomes of less than approximately  <dig> mb in total length  <cit>  .
it is implemented in c++ and designed to run as a command-line tool on unix-like platforms, including mac os x and cygwin.
breseq requires samtools , the read mapper/aligner bowtie  <dig> , and the r statistical computing environment .
all of these programs are freely downloadable as either source code or compiled executables.
breseq is invoked using a single command that takes as input fastq formatted dna sequencing reads and reference sequences in genbank, gff <dig>  or fasta format.
providing feature annotations  in the reference files is optional.
when present, they are used to optimize the placement of junction breakpoints with respect to mobile elements and to output additional information about the molecular effects of mutations on specific genes.
the breseq pipeline uses a reference-sequence-based mapping strategy, which includes evaluating new sequence junctions supported by split-read alignments and tracking multiply-mapped reads, to predict point mutations and structural mutations from short-read dna resequencing data.
as output, breseq produces an html archive with human-readable summary tables and the relevant evidence for each predicted mutation, including pileups of read alignments and graphs of read-depth coverage.
output is also provided in a machine-readable genome diff flat file format that contains entries for predicted mutations  linked to evidence supporting each genome sequence change .
the gdtools program packaged with breseq can be used to manipulate genome diff files for further analysis.
for example, it can compare mutations predicted in multiple samples or apply changes in a genome diff file to generate a mutated version of the genome.
aligned reads and mutation predictions are also output in community formats  that can be directly input into other tools or visualization environments such as tablet  <cit>  or the integrative genomics viewer  <cit> .
the following sections describe the specific steps of the breseq pipeline used to predict new sequence junctions and genomic regions that are missing sequencing coverage in a sample and to infer several types of structural variants from this evidence .
then, we evaluate the performance of breseq for detecting these types of mutations in simulated and experimental short-read genome resequencing data sets.
the methods that breseq uses to predict point mutations and small indels from read alignment evidence are described in the online breseq documentation and elsewhere  <cit> , and they are not benchmarked here.figure  <dig>
overview of the steps used by
breseq
to identify and annotate mutations in a haploid microbial genome from short-read resequencing data.
mapping reads
breseq uses bowtie <dig> to map short sequence read data to the reference genome because it performs gapped alignment, finds local matches in the read, and allows exhaustive reporting of all alignments between a read and the reference sequence  <cit> .
bowtie <dig> options are used where alignment scores are set to be equal to the number of base matches minus three times the number of base mismatches , with a gap open penalty of  <dig> and a gap extension penalty of  <dig>  a staged alignment procedure is employed to accelerate read mapping and alignment.
the first, “stringent” phase reports reads with near-perfect matches to the reference genome by using long and sparse seed substrings  and a stringent alignment score threshold .
then, remaining unmapped reads are aligned to the reference in a “relaxed” phase with parameters that enable split-read matches to be reported.
this stage uses shorter seed substring requirements  and a much lower alignment score threshold .
in both stages, every valid alignment to the reference genome is reported, including all information about how reads map to repeat sequences.
depending on whether an alignment to the reference genome matches far enough past a large indel for an extended alignment including both sides to achieve a higher score, different reads that overlap the same genomic site may be reported as two separate alignments or a single alignment with gaps.
to treat these cases uniformly, breseq further splits all initially reported read matches into multiple separate alignments at sites with indels of a certain length or longer .
in this step, there are cases where, due to inserted bases in the sample that exactly repeat existing reference bases , single alignments are rewritten as two overlapping read alignments, rather than simply divided in half, so that the single-alignment mapping results exactly match what would have been output in the two-alignment case.
identifying junction candidates
next, breseq creates a list of potential new sequence junctions, which may indicate that distant genomic sites in the reference sequence are juxtaposed in the sample, from the lists of split-read alignments.
for all reads where no one alignment spans 90% of the total read length, breseq examines all pairs of alignments reported between the read and the reference genome.
each alignment pair uniquely specifies a junction candidate: the new sequence that would exist in the sample dna if two discontinuous regions of the reference genome were joined .
this approach assumes that cases where individual reads from a sample genuinely map to three or more distinct locations in the reference genome will be extremely rare, which will generally be true for short-read data from samples that have not greatly diverged from the reference genome.figure  <dig>
junction candidate creation from split-read alignments that overlap.
a) if two alignments of a read to the reference genome overlap, the overlapping bases at the center of the read could potentially be assigned to two separate locations in the reference sequence.
b) if the read alignments in  had the imperfect alignments pictured here, the coordinates of each match and their overlap would be corrected as pictured by removing overlap until the remainder is a perfect match with no indels or mismatched bases.
c) this type of junction candidate can be fully described by the reference coordinates defining each side of the junction breakpoint, the directions in the reference sequence each junction side continues to match from those breakpoint positions, and the number of overlapping bases in the read alignments.
junction candidate creation from split-read alignments that do not overlap.
a) if two alignments of a read to the reference genome do not meet or overlap in the middle of the read, then there are unique “read-only” bases present between the two matches to the reference sequence that do not match either side.
b) this type of junction candidate can be fully described by the reference coordinates on each side of the junction breakpoint, the directions in the reference sequence each junction side continues to match from those positions, and the identity of the read-only bases inserted at the junction breakpoint.
a junction candidate is defined by the endpoints of the first and second matches of the alignment pair to the reference sequence that are nearest the breakpoint  and the directions each sequence extends away from the breakpoint in reference sequence coordinates .
additionally, there may be overlap between the two alignments  because bases at the breakpoint in the read could be assigned to either location in the reference genome without changing the junction sequence .
if there are base mismatches or indels in the initial alignment of this overlap region to either reference location, then each reference alignment is trimmed back until it consists of only perfect matches to the reference genome in the overlap region .
alternatively, there may be bases at the breakpoint that are unique to the read .
that is, they are not contained within the alignment of either side of the read to the reference genome .
in summary, any junction candidate sequence can be fully specified by six junction description parameters: two reference positions, two orientations with respect to the reference sequence, the number of overlap bases, and the identities of any inserted bases that are in the read and not in the reference .
to reduce the number of possible new junction candidates generated, breseq only considers pairs of split-read alignments that meet all of the following criteria:
one alignment must start at the first base of the read .
if the length of the read is  <dig> bases or less, the other alignment must end on the final base of the read.
for longer reads, the number of unaligned bases at the end of the read must be no more than 10% of the number of bases by which the total read length exceeds  <dig> bases ).
the portion of each alignment that does not overlap the other must span a number of bases in the read at least equal to 20% of its total length  – r1 + 1 ≥  <dig>  l and s <dig> – max  +1 ≥  <dig>  l).
the number of read bases in the overlap between the alignments must be no more than  <dig> plus 40% of the number of bases by which the read length exceeds  <dig> .
the number of bases unique to the read between the matches to reference sequence must be no more than  <dig> plus 40% of the number of bases by which the read length exceeds  <dig> bases .
only alignment pairs with the maximum value of the number of bases spanned in the read by the two alignments  that is observed over all alignment pairs for a given read are eligible to construct junction candidates.
for all alignment pairs for a read that pass these guards, a junction candidate sequence is constructed by taking the corresponding regions of the reference genome and joining them together, accounting for any overlap between the alignments or for any intermediate bases that are in the read but not in the reference genome.
the junction candidate sequence is extended on each end by adding enough bases to ensure that if the longest read in the input data set mapped to the junction across its breakpoint it would have a better alignment score than the best match to anywhere in the reference genome.
this step requires adding a number of bases from the reference to each side equal to one fewer than the maximum read length in the sample, minus the overlap  or read-only sequence  size.
while processing all reads with suitable split mappings to the reference sequence in this manner, the lists of predicted junctions with the exact same junction sequence and junction description parameters are merged into a running list of possibilities.
so that two equivalent junction candidates will be merged together regardless of which dna strand the original reads matched, junction sequences are reverse complemented, if necessary, so that the first side  is always described by the first reference sequence matched of those provided as input  or by the lowest reference coordinate matched if both sides align to the same reference sequence.
because breseq uses read mapping options that report all alignments to sequence repeats in the reference genome, pairs of alignments for the same read that match different reference locations may yield equivalent junction sequences but different junction descriptions.
for example, reads that map to the boundary of a new insertion of a mobile element that is multicopy in the original genome will have multiple alignments to the reference sequence for the portion overlapping the mobile element.
due to differences in the flanking bases at the boundaries of different copies of the multicopy repeat sequence, the same junction may also be described with a different number of overlapping bases or inserted read-only bases at the breakpoint for each of these possibilities.
therefore, breseq next collapses the list of junction predictions further: to the set of the shortest junction candidate sequences that are subsequences of other sequences or their reverse complements, effectively favoring those junctions with the least overlap or smallest number of unique read bases.
in this merging step, it also prefers to keep junctions in which both ends map to the same reference sequence fragment , rather than different ones, and in which the two ends match nearby coordinates if they are on the same reference sequence.
to determine the best merged junction candidates to further test, breseq next assigns a coverage evenness score to each one .
this score is equal to the number of distinct start positions for alignments of reads that extend across the breakpoint far enough to unambiguously support the junction and not the reference sequence.
that is, they must span any overlap or read-only bases in the junction sequence.
if the junction is a short deletion of a few bases in the reference sequence, then it may be required to extend additional bases that are not accounted for in these values — a continuation length — in order to unambiguously support the junction and count toward the actual or possible coverage evenness score .
each read is counted as starting at the position in the reference genome where its first base matches, so alignments with the same start and end coordinates, but on opposite strands will each count toward this evenness score once.
reads overlapping a typical position in the reference genome will have start sites that are relatively evenly distributed before and after that position for reads that align to the top and bottom strands, respectively .
new junctions that are the result of mutations should similarly be supported by reads that cross the breakpoint in many different registers.
in contrast, junction candidates resulting from sequencing artifacts tend to be supported by reads that align unevenly across a junction and may have low evenness scores even when they have very high coverage .
this situation can result from reads with systematic errors, like homopolymeric base calls at their ends, or from reads in the sample that are so significantly different from the reference sequence that they are no longer accurately mapped.figure  <dig>
example of assigning coverage evenness scores to candidate junctions.
reads that align to a candidate new junction sequence may start at many different positions relative to the breakpoint.
reads that do not unambiguously support the new junction  because they do not extend across the breakpoint and any overlap or read-only bases  are not counted toward the evenness score.
although the two examples have the same number of reads that support the new junction because they align across the breakpoint and match the junction better than the reference genome , the example in  is well-supported because these reads start in many different registers with respect to the breakpoint as would be expected for a normal reference genome location, whereas the example in  has reads beginning at a small number of biased positions with respect to the junction.
this coverage evenness score is used to calculate a skew p-value to accept or reject a candidate junction, after also accounting for differences in the maximum number of read start positions that can support each candidate junction.
in cases of tandem duplications much shorter than the read length, reads must also extend several “continuation” bases past any unique-only or overlap sequence to count as supporting a junction, as illustrated in figure  <dig>
case where additional read continuation across a breakpoint is required to support a junction candidate.
in certain cases a read alignment must extend further across a junction breakpoint than just through the alignment overlap or read-only sequences to support the junction versus aligning equally well to the original reference sequence.
one such case, where there is a deletion of four bases in a short tandem repeat region is shown.
in this example, read alignments to the junction candidate sequence must extend across the four overlapping junction bases and the three bases shown on their left side to support the junction.
finally, the list of junction candidates is sorted from high to low by this coverage evenness score and only the top candidates are saved according to an iterative decision procedure.
at each step, all junctions with the next-highest score in the list are considered for inclusion.
if the new total number of junction candidates accepted to this point, including these, would exceed some maximum  or the cumulative length of junction candidate sequences to this point would exceed a threshold value , then these and all lower-scoring junctions are not retained, as long as some minimum number of junction candidates has already been accepted at this point .
in addition to these criteria, a junction candidate must have at least some minimum evenness score to be considered .
evaluating new junction evidence
some sequencing reads may map reasonably well to the original reference genome but actually align better to a junction candidate sequence.
this situation can arise, for example, when the junction sequence spans an insertion or deletion of several bases in the sample relative to the reference.
for junctions between sequences that were distant in the original reference genome, this situation can also occur when a read is not initially mappable to both sides of a junction because it does not extend far enough past the breakpoint to seed and detect a match to one side or the other.
to resolve and properly count these cases when evaluating junctions, breseq re-maps all input reads to the set of candidate junction sequences using bowtie <dig> with the stringent criteria for reporting alignments that were used in the first stage of mapping to the reference genome.
for each read, breseq compares the alignment scores of the best matches to junction sequences and the reference sequence.
if a read matches the reference genome better than all junction candidates, then it is immediately assigned to that location and not considered further with respect to junctions.
if it matches a junction or multiple junctions better than or equally as well as the reference genome, then the read is temporarily saved with those junctions in an unresolved state until evidence from all reads has been compiled.
to evaluate whether to call a genomic variant in the sample, one would like to determine whether the final collection of reads that align to a candidate junction resembles those found at a typical site in the reference genome.
to this end, the coverage evenness score — equal to the number of unique reference positions matched by the first bases of reads extending past the breakpoint and any overlap or read-only junction bases  — is recalculated based on the re-aligned reads that match best to each junction.
this score is now used to rule out junction candidates with unusually low coverage or coverage biased toward certain registers with respect to the breakpoint that may be the result of mapping artifacts, contaminating sequences, or failed reads.
this general approach has been used to manually screen out false-positive predictions of gene fusions  <cit>  and incorporated into the scoring scheme used by tophat <dig>  <cit> .
we score the evenness of read coverage across a predicted breakpoint to evaluate the support for a new sequence junction in the context of a statistical model of read coverage across a haploid genome.
first, to calibrate whether any given coverage evenness score is unusually low with respect to the expectation for a typical position in the reference genome, breseq fits the distribution of coverage read depth across the genome and determines the average chance that at least one read starts at a given position of the reference sequence.
these parameters are estimated from the initial best mappings of reads to the reference genome before resolving candidate junctions.
for short-read resequencing data, the depth of read coverage at different positions in the reference genome is fit well by an overdispersed poisson  distribution  <cit> .
breseq fits this distribution using unique-only reference genome positions  .
before fitting, this data is left-censored at half the average coverage, to account for positions that are truly deleted in the sample but may have a small amount of residual coverage due to incorrect mapping of reads with errors or cross-contamination from sequencing similar genome samples without the deletion at the same time.
the data is also right-censored at  <dig>  times the average coverage so that fitting will be more robust against cases where failed sequencing reads may spuriously map to a small number of genomic locations, creating anomalously high coverage, and to cases where there are increases in copy-number in a sample relative to the reference across a significant portion of the genome.
the negative binomial distribution is described by the mean coverage  and a size parameter  reflecting the overdispersion.
as coverage is tabulated, the number of unique-only positions with no reads beginning there that match a given strand  is also tracked for each reference sequence.
dividing this total count by twice the number of unique-only positions in a reference sequence gives , the average chance that no read will be found to start at a given position extending across a breakpoint, i.e., the chance that a possible position where a read could have started will contribute to the evenness score for a junction.figure  <dig>
missing coverage evidence.
a) the censored fit of read depth at sites with unique-only coverage across the reference genome to a negative binomial distribution is shown for one of the e. coli samples from the mutation accumulation evolution experiment.
the threshold for extending putative deleted regions of the genome is determined by taking the coverage value that produces a left-tail probability from the fit distribution as described in the text .
b) a missing coverage evidence item is shown for the same e. coli sample to illustrate how its boundaries are determined by extending outward from a seed region with zero coverage of uniquely aligned reads through regions with multiply-mapped reads that match genomic repeat sequences until the coverage of uniquely aligned reads exceeds the calculated propagation threshold.
note that the left and right boundaries both correspond to a range of positions because they fall within repeat regions.
in some cases, this type of ambiguity in the extent of the deletion can be resolved by examining new junction evidence matching the endpoints.
after creating this model of the statistics of the evenness score, breseq iterates through all junction candidates, beginning with the one with the highest coverage evenness score, and calculates how extreme this score is relative to expectations to accept or reject the prediction.
in cases where reads are currently unresolved because they matched equally well to more than one junction sequence, these reads are temporarily assigned to the current junction and included in its recalculated evenness score at this point.
the possible values that the coverage evenness score can take for a junction are determined by the maximum read length, but when reads with different lengths are present in a data set, the average read length  gives a better idea of what values of the evenness score to expect.
in addition, junctions with overlap bases or unique read-only bases will have fewer possibilities for reads to be positioned such that they align better to the junction sequence than to the reference genome, and therefore contribute to the coverage evenness score .
as described above, it is also possible – particularly for deletions or duplications of short sequence repeats – that a read aligning from one side of the junction would not be distinguishable as matching the junction better than the reference unless it aligned a certain number of additional bases past the breakpoint .
to account for both of these considerations, the expected maximum possible evenness score  for a particular junction candidate is revised downward by taking into account the overlap  and the numbers of ambiguous continuation bases on side one  and side two :
<dig>
the chance of observing a given evenness score at a typical reference position is calculated by integrating the chances that a certain depth of read coverage would occur and the chance that one would observe the given evenness score at that read depth given the chance that a position would not have any reads with alignments starting at that position on a given strand  and would, thus, not contribute to the score.
therefore, breseq calculates a p-value for rejecting the null hypothesis that the start position and strand distribution of reads across each junction is typical of the rest of the genome according to the following equation:
<dig>
where negbinom  is the probability of observing x events from the negative binomial distribution with mean μ and size parameter α, and binomcdf  is the chance of x of fewer successes in n draws with probability p of a success each time.
the probability of success in this case is the chance that a read will be observed beginning at a given position and on a given strand at an arbitrary position in the reference genome as a whole, estimated as described above.
this calculation uses a value for this chance that scales with the current coverage in the summation relative to the average coverage of the reference sequence.
if the two sides of the junction match two different reference sequences , then a p-value is calculated for each one and the junction is assigned the least-significant value.
the “evenness skew” for the junction candidate is defined as the negative base- <dig> logarithm of this p-value, and breseq rejects predictions with skew scores that exceed some threshold .
for accepted junctions, any unresolved read alignments that mapped equally well to other junctions are claimed by the accepted junction prediction and are not counted toward the score of alternative junctions they matched equally well when they are considered later.
the top-scoring rejected junctions are saved for reporting as marginal predictions in the output.
for accepted junctions, ambiguous placement of the breakpoint with respect to the two disjoint locations of matches in the reference sequence due to overlap is assigned to one side or the other according to the following rules.
first, if reference sequence annotations of type “repeat sequence” or “mobile element” are present, and the breakpoint is within a certain distance of the end of one of these features , then the breakpoint is shifted to exactly align to the end of the annotated feature.
this may involve assigning all of the overlap bases near the breakpoint to one side, or some of these bases to both sides of the junction.
second, if one side of the junction was marked as having only repeat sequence alignments during the phase when candidate junction sequences were constructed, then all of the ambiguous bases at the breakpoint are assigned to the side that had only unique alignments.
if both sides of the junction had unique alignments, then the side with the highest priority when sorting by reference sequence id and then by coordinate, is assigned all overlap bases.
reads mapping across successful junctions are split at the breakpoint and the two pieces are added to the final file of alignments to the reference genome as separate matches so that they are counted correctly toward predictions of other mutations, such as base substitutions.
evaluating missing coverage evidence
in addition to compiling new junction evidence for structural variants as detailed above, breseq includes a step where it examines read coverage for evidence of deleted chromosomal regions.
to do this, it first identifies reference positions where there is zero coverage of both uniquely-mapped and multiply-mapped reads.
these seed intervals are propagated outward and joined through areas where the total of the unique-only read coverage is below a cutoff value.
this threshold is calculated from the negative binomial fit to the coverage distribution  by choosing a coverage value that yields a left-tail probability of  <dig>  divided by the square root of the length of the current reference sequence .
note that this procedure may lead to extending and joining putative missing coverage intervals through regions where multiply-mapped reads align .
when these occur between areas where there is unique-only coverage below a certain threshold or no coverage at all, it is assumed that those regions are also part of a deletion because the reads mapping there match equally well to a region elsewhere in the genome that was not deleted.
when a region with multiply-mapped reads occurs on the margin of a region of missing coverage, the endpoint of the predicted deletion on that side is considered ambiguous, unless resolved by integrating this evidence with junction predictions as described below.
mutation annotation
breseq predicts and annotates several types of mutations that produce structural variation by considering new junction  and missing coverage  evidence together with reference sequence annotations of the locations of mobile elements .
this automated integration of information results in precise  and biologically meaningful  predictions of how a sequence is altered in the sample relative to the reference that would be laborious to reconstruct from the output of other programs that could potentially be used to predict sv in microbial genomes.
the predictions by breseq include:figure  <dig>
predicting structural variation from new junction and missing coverage evidence.
a) types of structural variation for which breseq can predict precise mutational events from new junction sequences  and missing read coverage  evidence are shown in the context of the reference and mutant genomes.
for jc evidence, the matched sequence on each side is shown as a solid arrow with a dashed line connecting the two sides.
orange jc arrows indicate that this side of a new sequence junction maps equally well to multiple locations in the reference genome .
details for the procedure used in each case are described in the text.
b) mobile element insertions may require additional fields to describe the precise sequence change caused by insertion of a new copy.
these may include a target site duplication and deleted or inserted bases on the margins of the new element copy, as shown.
large deletions creating unique junctions  – when the endpoints of a missing coverage evidence item exactly match the breakpoint in a junction evidence item with two uniquely aligned sides, the region between them is predicted as a deletion.
deletions of this kind can be caused by illegitimate recombination.
deletions between by two copies of a repeat element  – when the ends of a missing coverage evidence item both fall within regions of multiply-mapped read coverage that are annotated in the reference genome as copies of the same repeat element in the same orientation, then a deletion is predicted that includes the intervening region between the repeats and the second of the two repeat copies.
these types of deletions may occur via homologous recombination.
short deletions, insertions, substitutions, and tandem amplifications  – when the two sides of a new junction evidence item are uniquely aligned and the breakpoint positions are located within a distance of each other in the reference genome that is smaller than the average read length, then they are resolved to predict the corresponding change.
note that deletions are predicted even without missing coverage evidence in this case because it is possible for one or a few spurious reads or read alignments to prevent the prediction of a very small missing coverage evidence item.
new mobile element insertions  – when two junction evidence items have unique endpoints on one side that are located within  <dig> base pairs of one another and match opposite sides of the same repeat element family annotated in the reference genome, then they are resolved to predict a new insertion of a mobile element.
a target site duplication of several bases typically occurs when a new copy of a bacterial transposable element inserts into a genome.
the size of this duplication is predicted from the locations of the junctions.
additional deletions of a few bases from the ends of the newly inserted element relative to its consensus sequence or insertions of a few bases within the target site duplication may be necessary to reconcile the exact breakpoint sequences in some cases .
deletions mediated by mobile elements  – these mutations are predicted when a missing coverage evidence item exists with one side overlapping a repeat sequence in the reference genome and a new junction evidence item matches the unique side of the missing coverage interval and the proximal side of any copy of the corresponding repeat family in the genome.
in this case, a deletion is predicted that extends from the unique breakpoint on one side of the repeat element up to its boundary.
missing coverage and accepted new junctions that are not resolved into predictions of precise mutational events are displayed as “unassigned evidence” in the html output for further evaluation by the user.
for example, breseq currently does not attempt to resolve new junction evidence that could support tandem sequence duplications greater than the read length.
it also does not attempt to use new junction evidence items in which both sides fall in repeated reference genome sequences to predict mutations.
these cases and other more complex types of events can potentially be resolved by manually examining unassigned evidence items, read-depth coverage graphs, and the relative locations of repeated sequences in the genome to predict the most likely mutational event  <cit> .
in addition, the top-scoring junctions that were rejected according to the statistical tests described above are listed on a separate page that contains “marginal evidence” to potentially aid in resolving other unassigned evidence items.
RESULTS
simulated data sets
to evaluate the performance of junction prediction by breseq we first computationally mutated the e. coli b rel <dig> genome sequence  <cit> .
each simulated genome had many instances of a single type of structural variation that can be detected because it creates new sequence junctions:  large deletions creating unique junctions.
for each test genome,  <dig> deletions of 400– <dig> base pairs that created junctions between non-repeat sequences were simulated.
new mobile element insertions.
an insertion sequence  is a bacterial transposable element that is capable of inserting a new copy of its sequence elsewhere in the genome  <cit> .
for each test genome,  <dig> new is insertions were simulated with the newly inserted sequence randomly chosen from existing is element copies.
the mechanism of is integration typically results in a short duplication of a few bases adjacent to the target site .
we randomly chose to duplicate 1– <dig> bases for each simulated insertion.
deletions mediated by mobile elements.
dna cleavage or insertion of a new is copy may lead to a deletion flanking a nearby, existing copy of an identical is element in a reference genome with the same orientation  <cit> , which eliminates the intervening sequence and one is copy.
for each test genome, only  <dig> of these events were simulated because there are only  <dig> total annotated is elements in the reference genome that could be chosen to mediate an adjacent deletion.
we selected these three types of mutations because they are commonly found in laboratory evolution experiments with this strain  <cit> .
to prevent the endpoints of these mutations from falling in repeat sequences that would lead to ambiguity in predicting their locations from short-read resequencing data and from occurring adjacent to one another and leading to more complicated genetic changes, we further restricted the possible locations for each simulated mutation as follows.
first, we enumerated all exact sequence repeats of ≥ <dig> bases in the reference genome using mummer   <cit> .
then, we required that the sites affected by each mutation be spaced at least  <dig>  bases from one another and from every one of these exact sequence repeats.
for generating is-mediated deletions, an existing is element was randomly chosen and the deletion extended from either the left or right margin with equal probability.
another deletion mediated by the same is element on its other side, was ruled out in adding further mutations to that simulated genome.
we created enough test genomes to have a total of  <dig>  mutations in each of the three categories.
the mason read simulator  was used to simulate fastq files of next-generation sequencing reads that would be obtained by sequencing these reference genomes  <cit> .
specifically, we generated fragment  read data sets under the illumina model with exact read lengths of  <dig>   <dig>   <dig>  and  <dig> bases; and under the roche  <dig> model with varying read lengths averaging  <dig>   <dig>  and  <dig> bases with a standard deviation of 10%.
to test software performance with different levels of read coverage depth, we simulated fastq files with 10-, 20-, 40- and 80-fold genomic coverage for each technology and read length.
the simulated data sets were analyzed by breseq  using default settings.
the same junction sequence can potentially be described in many different yet equivalent ways using our junction description scheme: the breakpoint coordinates can be shifted when there is overlap between the two read matches, or different coordinates and strands can be used to describe a side of a junction that matches a repeated sequence in the reference genome.
therefore, we compared the breseq predictions to our input structural variants at the level of junction sequences rather than junction descriptions.
for the breseq predictions and the original file of input variants, we generated the corresponding junction sequences from the reference genome and added five fewer bases than the average read length being tested as flanking bases on each end of the overlap region at the breakpoint.
if the sequence of a junction in the breseq predictions matched the sequence of a junction in the simulated genome or one of the two junction sequences was an exact subsequence of the other, they were judged to be equivalent predictions.
we evaluated the sensitivity  and precision  for each simulated data set .
all analyses used the default parameters except for the simulated 400-base  <dig> reads with the new mobile element insertions, for which the maximum cumulative length of junction candidate sequences was increased to 25% of the reference genome length and the minimum number of candidate junctions tested was increased to  <dig> so that enough of the longer junction candidates were tested to enable evaluation of all  <dig> true-positive junctions.
predictions of these mutations by breseq were highly specific and sensitive for all technologies and read lengths when there was at least 20-fold coverage of the reference genome.
these results show that the skew score provides a good statistical cutoff at the default significance level  for predicting the new sequence junctions created by all three categories of mutations.figure  <dig>
performance of structural variant prediction on simulated illumina data sets.
data sets with different read lengths and coverage depths were generated according to an illumina error model from simulated e. coli reference sequences with many examples of a single type of mutation causing structural variation randomly introduced.
results in terms of the sensitivity  for recovering true-positives  and the precision, equal to the number of true-positive predictions over the total number of predictions , are graphed as a function of junction skew scores accepted for making predictions.
results are shown for simulated genomes containing only a) deletions with breakpoints in non-repetitive reference genome sequences, b) new insertions of bacterial transposable sequences , and c) deletions with one boundary ending on a repetitive is element.
the default junction skew score cutoff used by breseq is  <dig> .
performance of structural variant prediction on simulated  <dig> data sets.
read data sets with different average read lengths and coverage depths were generated according to a  <dig> error model with a 10% standard deviation in read length from simulated e. coli reference sequences with many examples of a single type of mutation causing structural variation randomly introduced.
results in terms of the sensitivity  for recovering true-positives  and the precision, equal to the number of true-positive predictions over the total number of predictions , are graphed as a function of junction skew scores accepted for making predictions.
results are shown for simulated genomes containing only a) deletions with breakpoints in non-repetitive reference genome sequences, b) new insertions of bacterial transposable sequences , and c) deletions with one boundary ending on a repetitive is element.
the default junction skew score cutoff used by breseq is  <dig> .
we next tested the prediction of junctions in simulated data sets with very high read-depth coverage to determine whether the evenness skew score would become saturated, such that it no longer provided an effective metric for evaluating junctions.
this situation might occur when reads exist that match the reference starting at nearly every reference position on both strands.
we used mason to generate a series of illumina single-end 50-base read data sets for one of the simulated genomes with  <dig> deletions.
these data sets progressively included additional reads to achieve 80-, 160-, 320-, 640-,  <dig> -, and  <dig> -fold genomic coverage.
for each of these samples, breseq identified the  <dig> junctions present in simulated genome perfectly .
at the higher coverage values we observed more spurious junction candidates, but these were all rejected on the basis of their skew scores.
reanalysis of an e. colievolution experiment
because the simulated data does not fully reflect the types of sequencing errors present in a real data set, we next used breseq to predict mutations in genome resequencing data from a mutation accumulation  laboratory evolution experiment with e. coli
<cit> .
in bacterial ma experiments, replicate lineages are cultured for many generations by picking an arbitrary colony and streaking it out on a new agar plate each day.
due to the random choice of which individual colony is chosen and the frequent bottlenecks each time a subsequent colony grows from a single cell, this procedure leads to mutations accumulating over time in a lineage with very little influence from their fitness effects on the organism, as long as they are not lethal.
therefore, the number of mutations that accumulate over time in a ma experiment can be used to estimate the rate of spontaneous mutations in an organism  <cit> .
point mutations and short indels  were previously identified in the genomes of e. coli clones isolated at the end of this ma experiment, but structural variation was not analyzed.
we tested sv prediction by breseq with default settings on the  <dig> genomes that had evolved for  <dig>  generations as part of this ma experiment.
the illumina resequencing data sets for these genomes consist of paired-end data with 90-base reads and an average coverage depth of approximately 100-fold.
we first examined breseq output for genetic differences from the e. coli k- <dig> mg <dig>  reference genome that were shared by all  <dig> ma clones.
these mutations were likely present in the ma experiment ancestor, so we generated an updated ancestral genome sequence incorporating these changes and used this as input into breseq to predict new mutations that evolved independently in each of the  <dig> ma lineages .
in total, breseq predicted  <dig> evolved mutations that led to structural variation —  <dig> deletions,  <dig> is-mediated deletions,  <dig> tandem duplications, and  <dig> is-element insertions — from  <dig> new junction and  <dig> missing coverage evidence items.
all of the remaining  <dig> unassigned new junction evidence items and  <dig> missing coverage item could be manually resolved into  <dig> additional mutations:  <dig> is-element insertions located in genomic repeat sequences that made one or both of the supporting junctions match multiple sites in the reference sequence equally well;  <dig> deletion between is elements in which at least one of the two supporting junctions had one side that was ambiguously placed; and  <dig> tandem repeat of  <dig> bases that was not automatically predicted because this is longer than the read length.
manually examining all evidence items also showed that one prediction of a point mutation was spurious and actually resulted from the deletion of one 8-bp unit from a sequence repeat that initially consisted of eight of these 8-bp units in the reference genome.
several pieces of unassigned missing coverage evidence  appeared to be due to locally low read coverage that dipped to zero at locations in the genome.
as many of the chromosomal regions with this missing coverage were found in common between multiple independently evolved ma lines, it is possible that they result from systematic biases in coverage due to a library preparation artifact or more complex mutations that are already present in the ancestral strain of e. coli but cannot be resolved from mapping short-read data to the reference sequence.
new junctions were also predicted that correspond to a 1829-bp inversion caused by the pine recombinase within the e <dig> prophage  <cit> .
the ancestral e. coli strain appeared to have the p orientation instead of the p orientation in the mg <dig> reference sequence.
reversions to the p orientation were found in some of the evolved genomes.
in most cases these mutations were not present in 100% of the sample, as determined by counting the number of reads aligned to the p form versus the p form in the same data set, perhaps indicating that this region may be genetically unstable and commonly “switch” during outgrowth of the selected clone, creating a mixture before genomic dna is isolated for sequencing.
in addition to these mutations giving rise to sv, breseq predicted  <dig> indels  and  <dig> base substitutions in these genomes.
these values are slightly higher in each case than the  <dig> and  <dig>  respectively, predicted in the initial report  <cit> .
this discrepancy is likely due to differences in the stringency of read alignment and quality control cutoffs, as all of the breseq indel and snv predictions appeared to be high quality upon manual examination.
we cannot directly evaluate the performance of breseq on this e. coli data since the full set of true-positive mutations is unknown.
however, we note that in other cases where breseq has been applied to sets of evolutionarily related genomes and when specific mutation predictions have been experimentally validated that its accuracy and sensitivity have been found to be similar to what was obtained with the simulated data sets  for the types of sv that it predicts  <cit> .
overall, we found that 24% of the  <dig> mutations predicted in the mutation accumulation experiment led to structural variation in the e. coli chromosome .
insertions of new copies of insertion sequence elements, particularly is <dig>  dominated among these events.
this reanalysis enables us to estimate a spontaneous rate of sv mutations, which accounts for all mutations that are not single-base substitutions or short indels, in e. coli k- <dig> mg <dig> of  <dig>  mutations per genome per generation .
of the sv predicted, 92% of the events were fully predicted by breseq without the need for any manual examination of “orphan” pieces of evidence to resolve them into precise molecular events.
thus, breseq is a useful tool for discovering mutations that cause structural variation in order to more comprehensively understand how microbial genomes evolve.figure  <dig>
reanalysis of evolved
e. coli
samples for structural variation.
a) summary of mutations predicted by breseq in  <dig> clones sequenced after  <dig>  generations of growth in a mutation accumulation experiment  <cit> .
these samples were previously analyzed for single-base substitutions and small indels.
the line extending across the bars separates single-base substitutions and indels from mutations affecting more bases that were classified as structural variants.
full details for all mutations predicted in the ancestor of this experiment and each evolved lineage are provided in additional file  <dig>  b) overall representation of the different types of structural variants predicted from combinations of new junction  and missing coverage  evidence across all  <dig> genomes.
one structural variant was predicted from spurious read alignment  evidence, as described in the text.
planned future directions
metagenomic resequencing data, generated from a mixture of haploid microbial genomes that have evolved from a common ancestor, can currently be analyzed by breseq to estimate the frequencies of single-base substitution and indel variants in a population  <cit> .
we intend to extend this capability, leveraging the work described here, to predict the frequencies of polymorphic structural variants in mixed population samples.
the frequencies of mutations involving new junctions can be estimated by counting sequencing reads that span new junction candidates versus those that support unmutated reference genome sequences  <cit> .
this procedure could potentially detect structural variants at much lower frequencies than single-nucleotide or indel variants, as the occurrence of chimeric reads generating false-positive evidence for such mutations may be much rarer than the rate of base errors in sequencing data, but this hypothesis remains to be tested.
we also plan to have breseq integrate additional kinds of evidence from more fully analyzing short-read dna sequencing data to make new and more precise mutation predictions.
we have shown that split-read alignment information is very effective for predicting sv and other mutations in haploid microbial genomes, in agreement with other studies  <cit> .
however, using paired-end read mapping and analyzing “discordant pair” evidence could further aid in resolving breseq mutation predictions in or near repetitive genomic regions.
new types of sv, such as large gene duplications, could also be predicted without user intervention in the future by examining anomalies in read-depth coverage across the reference genome to create “copy number” evidence.
this analysis might use a circular binary segmentation algorithm  <cit>  after accounting for biases in read-depth coverage based on dna fragment gc-content  <cit> , location in a chromosome with respect to an origin of dna replication  <cit> , and other factors.
finally, we intend to further improve breseq’s ability to fully resolve and annotate complex events that may involve successive mutations.
for example, we commonly observe genomes where a first is insertion was followed by a second, adjacent is-mediated deletion in genomes derived from the lenski long-term laboratory evolution experiment with e. coli
<cit> .
currently, these compound events must be manually annotated as two mutations from a combination of evidence consisting of two new sequence junctions and one missing coverage interval.
CONCLUSIONS
structural variation in microbial genomes is a common source of genetic diversity that can be important during strain evolution inside and outside the laboratory.
currently, ad hoc or non-automated approaches with unproven performance are often used to detect sv in microbial genome resequencing data sets, or sv is neglected entirely and only single-nucleotide and short indel variation are analyzed.
we have demonstrated that breseq can fully predict many types of sv in clonal samples from information about regions of a reference genome joined by split-read alignments and regions lacking sequencing coverage.
for example, we found that 24% of the mutations detected in a breseq reanalysis of genomes from an e. coli k- <dig> evolution experiment resulted in sv, with new insertions of transposable elements dominating among these major chromosomal changes.
the sv-prediction capability of breseq should be useful for more fully characterizing genetic diversity in similar studies of evolving microorganisms.
availability and requirements
project name:breseq
project home page:http://barricklab.org/breseq
operating systems: linux, mac osx, windows
programming languages: c++, r
other requirements: bowtie  <dig> version  <dig> .
<dig> or higher, r version  <dig>  or higher
license: gnu general public license
any restrictions to use by non-academics: none
electronic supplementary material
additional file 1:
.
source code archive for breseq computational pipeline .
additional file 2:
.
archive detailing breseq predictions of mutations in genomes from the e. coli mutation accumulation  experiment.
file contents are as follows: ancestor.gd, differences between the ancestor strain of the ma experiment and the e. coli mg <dig> reference genome  in genome diff format.
this text-based file format is described in the breseq documentation; ancestor.gff, an annotated genome sequence of the ma ancestor in gff <dig> format, constructed by applying these mutations to the e. coli reference sequence; other *.gd files, genome diff files describing mutations predicted in each of the  <dig> clones that were resequenced after  <dig>  generations of evolution in the ma experiment.
abbreviations
jcnew junction evidence
mcmissing coverage evidence
snvsingle-nucleotide variation
svstructural variation
srasplit-read alignment
pempaired-end read mapping.
competing interests
the authors declare that they have no competing interests.
authors’ contributions
jeb, gc, ded, mds, jjb, ddk, ar, and agm coded breseq.
jeb, gc, and cct analyzed simulated data.
jeb and ded analyzed e. coli ma genomes.
jeb, gc, ded, and cct created figures and wrote the manuscript.
all authors edited and approved the manuscript.

 comprehensively identifying genetic variation is critical for understanding the rate and character of genome evolution in laboratory experiments, locating the mutations that cause mendelian diseases, tracking clonal evolution in cancer progression, and profiling the emergence of new microbial pathogens and their evolution during chronic infections. evolutionarily related genomes may exhibit single-nucleotide variation and short insertion or deletion variation, but also structural variation consisting of larger chromosomal deletions, insertions, and rearrangements. sv may typically have a greater effect on the functions of target genes than snv and indels, and these types of mutations may also give rise to novel phenotypes that are inaccessible by the other classes of mutations. however, sv is more difficult to predict than snv and indel variation from dna sequencing data, particularly short-read data like that produced by many next-generation technologies. here, we examine the case of genome “resequencing” where a high-quality and complete reference genome exists that is closely related to the dna sequencing sample that is being analyzed. structural variation in genome resequencing data is commonly predicted using two distinct types of evidence derived from how reads map to a reference genome: paired-end mapping and split-read alignment evidence. programs such as breakdancer, svdetect, and variationhunter-cr identify possible sv by examining pem data for genomic locations associated with read pairs mapped with anomalous insert sizes or pair orientations. a disadvantage of using only this information is that, generally, it cannot resolve the exact location of a breakpoint and the new sequence junction it creates. thus, programs such as pindel, fusionseq, fusionmap, and tophat predict sv using post-processing modules or read-mapping programs that exploit sra evidence, usually in conjunction with pem evidence, to determine exact sequence breakpoints. a final strategy for predicting sv is to perform de novo assembly of the sequencing reads and then map the resulting contigs back to the reference genome to find discrepancies resulting from large-scale chromosomal changes. most current software tools for predicting genome structural variation are intended for use with the human genome, or at least a diploid eukaryotic genome. in these large genomes of mb to gb, computational speed and memory usage can become an issue, so reads that map to repetitive genomic regions are typically disregarded or may even be removed from a sample prior to sequencing. the computational search space for valid sras may be further restricted by algorithms that look specifically for gene fusions or use species-specific databases of repeats. however, many common types of structural variation can only be detected by exploring read alignments to repeat sequences in genomes, and these existing tools are not easily adapted to haploid microbial genomes without substantial modifications and optimization by the end user. in lieu of a proven software tool for predicting svs in microbial genomes, ad hoc workflows have been employed by labs that resequence microbial genomes. these approaches may involve manually examining regions where read matches greatly diverge from the reference, post-processing the output of sv-prediction tools that examine sra and pem evidence, or comparing the output of de novo assembly tools to the reference genome. each of these approaches requires significant manual examination of the results to extract true-positives from a high background rate of spurious predictions and to precisely describe the sequence changes caused by mutations that lead to structural variation. this high cost in time and effort means that in many cases, structural variation is simply not analyzed. thus, only a fraction of the true genetic variation is profiled in many studies of closely related strains. we have implemented a split-read alignment analysis procedure that accurately predicts mutational events leading to structural variation in clonal samples of haploid microbial genomes as part of the breseq computational pipeline. preliminary versions of the breseq sv prediction pipeline described here have been previously used in several experimental studies. here, we fully describe the prediction methods and demonstrate robust performance on simulated e. coli resequencing data sets with typical read lengths and depths of genomic coverage. then, we use breseq to identify mutations leading to structural variation that evolved during an evolution experiment with e. coli k- that was previously used to estimate the spontaneous rates of mutations leading to snvs and indels in this organism. mutations leading to sv, in particular transposition of insertion sequences and deletions mediated by these mobile elements, represent ~25% of the spontaneous mutations in this strain. their prevalence highlights the importance of predicting sv in genetic studies of microorganisms. implementation breseqoverview breseq is an integrated computational pipeline intended for predicting mutations in haploid genomes of less than approximately mb in total length. it is implemented in c++ and designed to run as a command-line tool on unix-like platforms, including mac os x and cygwin. breseq requires samtools, the read mapper/aligner bowtie, and the r statistical computing environment. all of these programs are freely downloadable as either source code or compiled executables. breseq is invoked using a single command that takes as input fastq formatted dna sequencing reads and reference sequences in genbank, gff or fasta format. providing feature annotations in the reference files is optional. when present, they are used to optimize the placement of junction breakpoints with respect to mobile elements and to output additional information about the molecular effects of mutations on specific genes. the breseq pipeline uses a reference-sequence-based mapping strategy, which includes evaluating new sequence junctions supported by split-read alignments and tracking multiply-mapped reads, to predict point mutations and structural mutations from short-read dna resequencing data. as output, breseq produces an html archive with human-readable summary tables and the relevant evidence for each predicted mutation, including pileups of read alignments and graphs of read-depth coverage. output is also provided in a machine-readable genome diff flat file format that contains entries for predicted mutations linked to evidence supporting each genome sequence change. the gdtools program packaged with breseq can be used to manipulate genome diff files for further analysis. for example, it can compare mutations predicted in multiple samples or apply changes in a genome diff file to generate a mutated version of the genome. aligned reads and mutation predictions are also output in community formats that can be directly input into other tools or visualization environments such as tablet or the integrative genomics viewer. the following sections describe the specific steps of the breseq pipeline used to predict new sequence junctions and genomic regions that are missing sequencing coverage in a sample and to infer several types of structural variants from this evidence. then, we evaluate the performance of breseq for detecting these types of mutations in simulated and experimental short-read genome resequencing data sets. the methods that breseq uses to predict point mutations and small indels from read alignment evidence are described in the online breseq documentation and elsewhere, and they are not benchmarked here.figure overview of the steps used by breseq to identify and annotate mutations in a haploid microbial genome from short-read resequencing data. mapping reads breseq uses bowtie to map short sequence read data to the reference genome because it performs gapped alignment, finds local matches in the read, and allows exhaustive reporting of all alignments between a read and the reference sequence. bowtie options are used where alignment scores are set to be equal to the number of base matches minus three times the number of base mismatches, with a gap open penalty of and a gap extension penalty of a staged alignment procedure is employed to accelerate read mapping and alignment. the first, “stringent” phase reports reads with near-perfect matches to the reference genome by using long and sparse seed substrings and a stringent alignment score threshold. then, remaining unmapped reads are aligned to the reference in a “relaxed” phase with parameters that enable split-read matches to be reported. this stage uses shorter seed substring requirements and a much lower alignment score threshold. in both stages, every valid alignment to the reference genome is reported, including all information about how reads map to repeat sequences. depending on whether an alignment to the reference genome matches far enough past a large indel for an extended alignment including both sides to achieve a higher score, different reads that overlap the same genomic site may be reported as two separate alignments or a single alignment with gaps. to treat these cases uniformly, breseq further splits all initially reported read matches into multiple separate alignments at sites with indels of a certain length or longer. in this step, there are cases where, due to inserted bases in the sample that exactly repeat existing reference bases, single alignments are rewritten as two overlapping read alignments, rather than simply divided in half, so that the single-alignment mapping results exactly match what would have been output in the two-alignment case. identifying junction candidates next, breseq creates a list of potential new sequence junctions, which may indicate that distant genomic sites in the reference sequence are juxtaposed in the sample, from the lists of split-read alignments. for all reads where no one alignment spans 90% of the total read length, breseq examines all pairs of alignments reported between the read and the reference genome. each alignment pair uniquely specifies a junction candidate: the new sequence that would exist in the sample dna if two discontinuous regions of the reference genome were joined. this approach assumes that cases where individual reads from a sample genuinely map to three or more distinct locations in the reference genome will be extremely rare, which will generally be true for short-read data from samples that have not greatly diverged from the reference genome.figure junction candidate creation from split-read alignments that overlap. a) if two alignments of a read to the reference genome overlap, the overlapping bases at the center of the read could potentially be assigned to two separate locations in the reference sequence. b) if the read alignments in had the imperfect alignments pictured here, the coordinates of each match and their overlap would be corrected as pictured by removing overlap until the remainder is a perfect match with no indels or mismatched bases. c) this type of junction candidate can be fully described by the reference coordinates defining each side of the junction breakpoint, the directions in the reference sequence each junction side continues to match from those breakpoint positions, and the number of overlapping bases in the read alignments. junction candidate creation from split-read alignments that do not overlap. a) if two alignments of a read to the reference genome do not meet or overlap in the middle of the read, then there are unique “read-only” bases present between the two matches to the reference sequence that do not match either side. b) this type of junction candidate can be fully described by the reference coordinates on each side of the junction breakpoint, the directions in the reference sequence each junction side continues to match from those positions, and the identity of the read-only bases inserted at the junction breakpoint. a junction candidate is defined by the endpoints of the first and second matches of the alignment pair to the reference sequence that are nearest the breakpoint and the directions each sequence extends away from the breakpoint in reference sequence coordinates. additionally, there may be overlap between the two alignments because bases at the breakpoint in the read could be assigned to either location in the reference genome without changing the junction sequence. if there are base mismatches or indels in the initial alignment of this overlap region to either reference location, then each reference alignment is trimmed back until it consists of only perfect matches to the reference genome in the overlap region. alternatively, there may be bases at the breakpoint that are unique to the read. that is, they are not contained within the alignment of either side of the read to the reference genome. in summary, any junction candidate sequence can be fully specified by six junction description parameters: two reference positions, two orientations with respect to the reference sequence, the number of overlap bases, and the identities of any inserted bases that are in the read and not in the reference. to reduce the number of possible new junction candidates generated, breseq only considers pairs of split-read alignments that meet all of the following criteria: one alignment must start at the first base of the read. if the length of the read is bases or less, the other alignment must end on the final base of the read. for longer reads, the number of unaligned bases at the end of the read must be no more than 10% of the number of bases by which the total read length exceeds bases ). the portion of each alignment that does not overlap the other must span a number of bases in the read at least equal to 20% of its total length – r1 + 1 ≥  l and s – max +1 ≥  l). the number of read bases in the overlap between the alignments must be no more than plus 40% of the number of bases by which the read length exceeds. the number of bases unique to the read between the matches to reference sequence must be no more than plus 40% of the number of bases by which the read length exceeds bases. only alignment pairs with the maximum value of the number of bases spanned in the read by the two alignments that is observed over all alignment pairs for a given read are eligible to construct junction candidates. for all alignment pairs for a read that pass these guards, a junction candidate sequence is constructed by taking the corresponding regions of the reference genome and joining them together, accounting for any overlap between the alignments or for any intermediate bases that are in the read but not in the reference genome. the junction candidate sequence is extended on each end by adding enough bases to ensure that if the longest read in the input data set mapped to the junction across its breakpoint it would have a better alignment score than the best match to anywhere in the reference genome. this step requires adding a number of bases from the reference to each side equal to one fewer than the maximum read length in the sample, minus the overlap or read-only sequence size. while processing all reads with suitable split mappings to the reference sequence in this manner, the lists of predicted junctions with the exact same junction sequence and junction description parameters are merged into a running list of possibilities. so that two equivalent junction candidates will be merged together regardless of which dna strand the original reads matched, junction sequences are reverse complemented, if necessary, so that the first side is always described by the first reference sequence matched of those provided as input or by the lowest reference coordinate matched if both sides align to the same reference sequence. because breseq uses read mapping options that report all alignments to sequence repeats in the reference genome, pairs of alignments for the same read that match different reference locations may yield equivalent junction sequences but different junction descriptions. for example, reads that map to the boundary of a new insertion of a mobile element that is multicopy in the original genome will have multiple alignments to the reference sequence for the portion overlapping the mobile element. due to differences in the flanking bases at the boundaries of different copies of the multicopy repeat sequence, the same junction may also be described with a different number of overlapping bases or inserted read-only bases at the breakpoint for each of these possibilities. therefore, breseq next collapses the list of junction predictions further: to the set of the shortest junction candidate sequences that are subsequences of other sequences or their reverse complements, effectively favoring those junctions with the least overlap or smallest number of unique read bases. in this merging step, it also prefers to keep junctions in which both ends map to the same reference sequence fragment, rather than different ones, and in which the two ends match nearby coordinates if they are on the same reference sequence. to determine the best merged junction candidates to further test, breseq next assigns a coverage evenness score to each one. this score is equal to the number of distinct start positions for alignments of reads that extend across the breakpoint far enough to unambiguously support the junction and not the reference sequence. that is, they must span any overlap or read-only bases in the junction sequence. if the junction is a short deletion of a few bases in the reference sequence, then it may be required to extend additional bases that are not accounted for in these values — a continuation length — in order to unambiguously support the junction and count toward the actual or possible coverage evenness score. each read is counted as starting at the position in the reference genome where its first base matches, so alignments with the same start and end coordinates, but on opposite strands will each count toward this evenness score once. reads overlapping a typical position in the reference genome will have start sites that are relatively evenly distributed before and after that position for reads that align to the top and bottom strands, respectively. new junctions that are the result of mutations should similarly be supported by reads that cross the breakpoint in many different registers. in contrast, junction candidates resulting from sequencing artifacts tend to be supported by reads that align unevenly across a junction and may have low evenness scores even when they have very high coverage. this situation can result from reads with systematic errors, like homopolymeric base calls at their ends, or from reads in the sample that are so significantly different from the reference sequence that they are no longer accurately mapped.figure example of assigning coverage evenness scores to candidate junctions. reads that align to a candidate new junction sequence may start at many different positions relative to the breakpoint. reads that do not unambiguously support the new junction because they do not extend across the breakpoint and any overlap or read-only bases are not counted toward the evenness score. although the two examples have the same number of reads that support the new junction because they align across the breakpoint and match the junction better than the reference genome, the example in is well-supported because these reads start in many different registers with respect to the breakpoint as would be expected for a normal reference genome location, whereas the example in has reads beginning at a small number of biased positions with respect to the junction. this coverage evenness score is used to calculate a skew p-value to accept or reject a candidate junction, after also accounting for differences in the maximum number of read start positions that can support each candidate junction. in cases of tandem duplications much shorter than the read length, reads must also extend several “continuation” bases past any unique-only or overlap sequence to count as supporting a junction, as illustrated in figure  case where additional read continuation across a breakpoint is required to support a junction candidate. in certain cases a read alignment must extend further across a junction breakpoint than just through the alignment overlap or read-only sequences to support the junction versus aligning equally well to the original reference sequence. one such case, where there is a deletion of four bases in a short tandem repeat region is shown. in this example, read alignments to the junction candidate sequence must extend across the four overlapping junction bases and the three bases shown on their left side to support the junction. finally, the list of junction candidates is sorted from high to low by this coverage evenness score and only the top candidates are saved according to an iterative decision procedure. at each step, all junctions with the next-highest score in the list are considered for inclusion. if the new total number of junction candidates accepted to this point, including these, would exceed some maximum or the cumulative length of junction candidate sequences to this point would exceed a threshold value, then these and all lower-scoring junctions are not retained, as long as some minimum number of junction candidates has already been accepted at this point. in addition to these criteria, a junction candidate must have at least some minimum evenness score to be considered. evaluating new junction evidence some sequencing reads may map reasonably well to the original reference genome but actually align better to a junction candidate sequence. this situation can arise, for example, when the junction sequence spans an insertion or deletion of several bases in the sample relative to the reference. for junctions between sequences that were distant in the original reference genome, this situation can also occur when a read is not initially mappable to both sides of a junction because it does not extend far enough past the breakpoint to seed and detect a match to one side or the other. to resolve and properly count these cases when evaluating junctions, breseq re-maps all input reads to the set of candidate junction sequences using bowtie with the stringent criteria for reporting alignments that were used in the first stage of mapping to the reference genome. for each read, breseq compares the alignment scores of the best matches to junction sequences and the reference sequence. if a read matches the reference genome better than all junction candidates, then it is immediately assigned to that location and not considered further with respect to junctions. if it matches a junction or multiple junctions better than or equally as well as the reference genome, then the read is temporarily saved with those junctions in an unresolved state until evidence from all reads has been compiled. to evaluate whether to call a genomic variant in the sample, one would like to determine whether the final collection of reads that align to a candidate junction resembles those found at a typical site in the reference genome. to this end, the coverage evenness score — equal to the number of unique reference positions matched by the first bases of reads extending past the breakpoint and any overlap or read-only junction bases — is recalculated based on the re-aligned reads that match best to each junction. this score is now used to rule out junction candidates with unusually low coverage or coverage biased toward certain registers with respect to the breakpoint that may be the result of mapping artifacts, contaminating sequences, or failed reads. this general approach has been used to manually screen out false-positive predictions of gene fusions and incorporated into the scoring scheme used by tophat. we score the evenness of read coverage across a predicted breakpoint to evaluate the support for a new sequence junction in the context of a statistical model of read coverage across a haploid genome. first, to calibrate whether any given coverage evenness score is unusually low with respect to the expectation for a typical position in the reference genome, breseq fits the distribution of coverage read depth across the genome and determines the average chance that at least one read starts at a given position of the reference sequence. these parameters are estimated from the initial best mappings of reads to the reference genome before resolving candidate junctions. for short-read resequencing data, the depth of read coverage at different positions in the reference genome is fit well by an overdispersed poisson distribution. breseq fits this distribution using unique-only reference genome positions. before fitting, this data is left-censored at half the average coverage, to account for positions that are truly deleted in the sample but may have a small amount of residual coverage due to incorrect mapping of reads with errors or cross-contamination from sequencing similar genome samples without the deletion at the same time. the data is also right-censored at times the average coverage so that fitting will be more robust against cases where failed sequencing reads may spuriously map to a small number of genomic locations, creating anomalously high coverage, and to cases where there are increases in copy-number in a sample relative to the reference across a significant portion of the genome. the negative binomial distribution is described by the mean coverage and a size parameter reflecting the overdispersion. as coverage is tabulated, the number of unique-only positions with no reads beginning there that match a given strand is also tracked for each reference sequence. dividing this total count by twice the number of unique-only positions in a reference sequence gives, the average chance that no read will be found to start at a given position extending across a breakpoint, i.e., the chance that a possible position where a read could have started will contribute to the evenness score for a junction.figure missing coverage evidence. a) the censored fit of read depth at sites with unique-only coverage across the reference genome to a negative binomial distribution is shown for one of the e. coli samples from the mutation accumulation evolution experiment. the threshold for extending putative deleted regions of the genome is determined by taking the coverage value that produces a left-tail probability from the fit distribution as described in the text. b) a missing coverage evidence item is shown for the same e. coli sample to illustrate how its boundaries are determined by extending outward from a seed region with zero coverage of uniquely aligned reads through regions with multiply-mapped reads that match genomic repeat sequences until the coverage of uniquely aligned reads exceeds the calculated propagation threshold. note that the left and right boundaries both correspond to a range of positions because they fall within repeat regions. in some cases, this type of ambiguity in the extent of the deletion can be resolved by examining new junction evidence matching the endpoints. after creating this model of the statistics of the evenness score, breseq iterates through all junction candidates, beginning with the one with the highest coverage evenness score, and calculates how extreme this score is relative to expectations to accept or reject the prediction. in cases where reads are currently unresolved because they matched equally well to more than one junction sequence, these reads are temporarily assigned to the current junction and included in its recalculated evenness score at this point. the possible values that the coverage evenness score can take for a junction are determined by the maximum read length, but when reads with different lengths are present in a data set, the average read length gives a better idea of what values of the evenness score to expect. in addition, junctions with overlap bases or unique read-only bases will have fewer possibilities for reads to be positioned such that they align better to the junction sequence than to the reference genome, and therefore contribute to the coverage evenness score. as described above, it is also possible – particularly for deletions or duplications of short sequence repeats – that a read aligning from one side of the junction would not be distinguishable as matching the junction better than the reference unless it aligned a certain number of additional bases past the breakpoint. to account for both of these considerations, the expected maximum possible evenness score for a particular junction candidate is revised downward by taking into account the overlap and the numbers of ambiguous continuation bases on side one and side two: the chance of observing a given evenness score at a typical reference position is calculated by integrating the chances that a certain depth of read coverage would occur and the chance that one would observe the given evenness score at that read depth given the chance that a position would not have any reads with alignments starting at that position on a given strand and would, thus, not contribute to the score. therefore, breseq calculates a p-value for rejecting the null hypothesis that the start position and strand distribution of reads across each junction is typical of the rest of the genome according to the following equation: where negbinom is the probability of observing x events from the negative binomial distribution with mean μ and size parameter α, and binomcdf is the chance of x of fewer successes in n draws with probability p of a success each time. the probability of success in this case is the chance that a read will be observed beginning at a given position and on a given strand at an arbitrary position in the reference genome as a whole, estimated as described above. this calculation uses a value for this chance that scales with the current coverage in the summation relative to the average coverage of the reference sequence. if the two sides of the junction match two different reference sequences, then a p-value is calculated for each one and the junction is assigned the least-significant value. the “evenness skew” for the junction candidate is defined as the negative base- logarithm of this p-value, and breseq rejects predictions with skew scores that exceed some threshold. for accepted junctions, any unresolved read alignments that mapped equally well to other junctions are claimed by the accepted junction prediction and are not counted toward the score of alternative junctions they matched equally well when they are considered later. the top-scoring rejected junctions are saved for reporting as marginal predictions in the output. for accepted junctions, ambiguous placement of the breakpoint with respect to the two disjoint locations of matches in the reference sequence due to overlap is assigned to one side or the other according to the following rules. first, if reference sequence annotations of type “repeat sequence” or “mobile element” are present, and the breakpoint is within a certain distance of the end of one of these features, then the breakpoint is shifted to exactly align to the end of the annotated feature. this may involve assigning all of the overlap bases near the breakpoint to one side, or some of these bases to both sides of the junction. second, if one side of the junction was marked as having only repeat sequence alignments during the phase when candidate junction sequences were constructed, then all of the ambiguous bases at the breakpoint are assigned to the side that had only unique alignments. if both sides of the junction had unique alignments, then the side with the highest priority when sorting by reference sequence id and then by coordinate, is assigned all overlap bases. reads mapping across successful junctions are split at the breakpoint and the two pieces are added to the final file of alignments to the reference genome as separate matches so that they are counted correctly toward predictions of other mutations, such as base substitutions. evaluating missing coverage evidence in addition to compiling new junction evidence for structural variants as detailed above, breseq includes a step where it examines read coverage for evidence of deleted chromosomal regions. to do this, it first identifies reference positions where there is zero coverage of both uniquely-mapped and multiply-mapped reads. these seed intervals are propagated outward and joined through areas where the total of the unique-only read coverage is below a cutoff value. this threshold is calculated from the negative binomial fit to the coverage distribution by choosing a coverage value that yields a left-tail probability of divided by the square root of the length of the current reference sequence. note that this procedure may lead to extending and joining putative missing coverage intervals through regions where multiply-mapped reads align. when these occur between areas where there is unique-only coverage below a certain threshold or no coverage at all, it is assumed that those regions are also part of a deletion because the reads mapping there match equally well to a region elsewhere in the genome that was not deleted. when a region with multiply-mapped reads occurs on the margin of a region of missing coverage, the endpoint of the predicted deletion on that side is considered ambiguous, unless resolved by integrating this evidence with junction predictions as described below. mutation annotation breseq predicts and annotates several types of mutations that produce structural variation by considering new junction and missing coverage evidence together with reference sequence annotations of the locations of mobile elements. this automated integration of information results in precise and biologically meaningful predictions of how a sequence is altered in the sample relative to the reference that would be laborious to reconstruct from the output of other programs that could potentially be used to predict sv in microbial genomes. the predictions by breseq include:figure predicting structural variation from new junction and missing coverage evidence. a) types of structural variation for which breseq can predict precise mutational events from new junction sequences and missing read coverage evidence are shown in the context of the reference and mutant genomes. for jc evidence, the matched sequence on each side is shown as a solid arrow with a dashed line connecting the two sides. orange jc arrows indicate that this side of a new sequence junction maps equally well to multiple locations in the reference genome. details for the procedure used in each case are described in the text. b) mobile element insertions may require additional fields to describe the precise sequence change caused by insertion of a new copy. these may include a target site duplication and deleted or inserted bases on the margins of the new element copy, as shown. large deletions creating unique junctions – when the endpoints of a missing coverage evidence item exactly match the breakpoint in a junction evidence item with two uniquely aligned sides, the region between them is predicted as a deletion. deletions of this kind can be caused by illegitimate recombination. deletions between by two copies of a repeat element – when the ends of a missing coverage evidence item both fall within regions of multiply-mapped read coverage that are annotated in the reference genome as copies of the same repeat element in the same orientation, then a deletion is predicted that includes the intervening region between the repeats and the second of the two repeat copies. these types of deletions may occur via homologous recombination. short deletions, insertions, substitutions, and tandem amplifications – when the two sides of a new junction evidence item are uniquely aligned and the breakpoint positions are located within a distance of each other in the reference genome that is smaller than the average read length, then they are resolved to predict the corresponding change. note that deletions are predicted even without missing coverage evidence in this case because it is possible for one or a few spurious reads or read alignments to prevent the prediction of a very small missing coverage evidence item. new mobile element insertions – when two junction evidence items have unique endpoints on one side that are located within base pairs of one another and match opposite sides of the same repeat element family annotated in the reference genome, then they are resolved to predict a new insertion of a mobile element. a target site duplication of several bases typically occurs when a new copy of a bacterial transposable element inserts into a genome. the size of this duplication is predicted from the locations of the junctions. additional deletions of a few bases from the ends of the newly inserted element relative to its consensus sequence or insertions of a few bases within the target site duplication may be necessary to reconcile the exact breakpoint sequences in some cases. deletions mediated by mobile elements – these mutations are predicted when a missing coverage evidence item exists with one side overlapping a repeat sequence in the reference genome and a new junction evidence item matches the unique side of the missing coverage interval and the proximal side of any copy of the corresponding repeat family in the genome. in this case, a deletion is predicted that extends from the unique breakpoint on one side of the repeat element up to its boundary. missing coverage and accepted new junctions that are not resolved into predictions of precise mutational events are displayed as “unassigned evidence” in the html output for further evaluation by the user. for example, breseq currently does not attempt to resolve new junction evidence that could support tandem sequence duplications greater than the read length. it also does not attempt to use new junction evidence items in which both sides fall in repeated reference genome sequences to predict mutations. these cases and other more complex types of events can potentially be resolved by manually examining unassigned evidence items, read-depth coverage graphs, and the relative locations of repeated sequences in the genome to predict the most likely mutational event. in addition, the top-scoring junctions that were rejected according to the statistical tests described above are listed on a separate page that contains “marginal evidence” to potentially aid in resolving other unassigned evidence items.  simulated data sets to evaluate the performance of junction prediction by breseq we first computationally mutated the e. coli b rel genome sequence. each simulated genome had many instances of a single type of structural variation that can be detected because it creates new sequence junctions: large deletions creating unique junctions. for each test genome, deletions of 400– base pairs that created junctions between non-repeat sequences were simulated. new mobile element insertions. an insertion sequence is a bacterial transposable element that is capable of inserting a new copy of its sequence elsewhere in the genome. for each test genome, new is insertions were simulated with the newly inserted sequence randomly chosen from existing is element copies. the mechanism of is integration typically results in a short duplication of a few bases adjacent to the target site. we randomly chose to duplicate 1– bases for each simulated insertion. deletions mediated by mobile elements. dna cleavage or insertion of a new is copy may lead to a deletion flanking a nearby, existing copy of an identical is element in a reference genome with the same orientation, which eliminates the intervening sequence and one is copy. for each test genome, only of these events were simulated because there are only total annotated is elements in the reference genome that could be chosen to mediate an adjacent deletion. we selected these three types of mutations because they are commonly found in laboratory evolution experiments with this strain. to prevent the endpoints of these mutations from falling in repeat sequences that would lead to ambiguity in predicting their locations from short-read resequencing data and from occurring adjacent to one another and leading to more complicated genetic changes, we further restricted the possible locations for each simulated mutation as follows. first, we enumerated all exact sequence repeats of ≥ bases in the reference genome using mummer. then, we required that the sites affected by each mutation be spaced at least bases from one another and from every one of these exact sequence repeats. for generating is-mediated deletions, an existing is element was randomly chosen and the deletion extended from either the left or right margin with equal probability. another deletion mediated by the same is element on its other side, was ruled out in adding further mutations to that simulated genome. we created enough test genomes to have a total of mutations in each of the three categories. the mason read simulator was used to simulate fastq files of next-generation sequencing reads that would be obtained by sequencing these reference genomes. specifically, we generated fragment read data sets under the illumina model with exact read lengths of and bases; and under the roche model with varying read lengths averaging and bases with a standard deviation of 10%. to test software performance with different levels of read coverage depth, we simulated fastq files with 10-, 20-, 40- and 80-fold genomic coverage for each technology and read length. the simulated data sets were analyzed by breseq using default settings. the same junction sequence can potentially be described in many different yet equivalent ways using our junction description scheme: the breakpoint coordinates can be shifted when there is overlap between the two read matches, or different coordinates and strands can be used to describe a side of a junction that matches a repeated sequence in the reference genome. therefore, we compared the breseq predictions to our input structural variants at the level of junction sequences rather than junction descriptions. for the breseq predictions and the original file of input variants, we generated the corresponding junction sequences from the reference genome and added five fewer bases than the average read length being tested as flanking bases on each end of the overlap region at the breakpoint. if the sequence of a junction in the breseq predictions matched the sequence of a junction in the simulated genome or one of the two junction sequences was an exact subsequence of the other, they were judged to be equivalent predictions. we evaluated the sensitivity and precision for each simulated data set. all analyses used the default parameters except for the simulated 400-base reads with the new mobile element insertions, for which the maximum cumulative length of junction candidate sequences was increased to 25% of the reference genome length and the minimum number of candidate junctions tested was increased to so that enough of the longer junction candidates were tested to enable evaluation of all true-positive junctions. predictions of these mutations by breseq were highly specific and sensitive for all technologies and read lengths when there was at least 20-fold coverage of the reference genome. these results show that the skew score provides a good statistical cutoff at the default significance level for predicting the new sequence junctions created by all three categories of mutations.figure performance of structural variant prediction on simulated illumina data sets. data sets with different read lengths and coverage depths were generated according to an illumina error model from simulated e. coli reference sequences with many examples of a single type of mutation causing structural variation randomly introduced. results in terms of the sensitivity for recovering true-positives and the precision, equal to the number of true-positive predictions over the total number of predictions, are graphed as a function of junction skew scores accepted for making predictions. results are shown for simulated genomes containing only a) deletions with breakpoints in non-repetitive reference genome sequences, b) new insertions of bacterial transposable sequences, and c) deletions with one boundary ending on a repetitive is element. the default junction skew score cutoff used by breseq is. performance of structural variant prediction on simulated data sets. read data sets with different average read lengths and coverage depths were generated according to a error model with a 10% standard deviation in read length from simulated e. coli reference sequences with many examples of a single type of mutation causing structural variation randomly introduced. results in terms of the sensitivity for recovering true-positives and the precision, equal to the number of true-positive predictions over the total number of predictions, are graphed as a function of junction skew scores accepted for making predictions. results are shown for simulated genomes containing only a) deletions with breakpoints in non-repetitive reference genome sequences, b) new insertions of bacterial transposable sequences, and c) deletions with one boundary ending on a repetitive is element. the default junction skew score cutoff used by breseq is. we next tested the prediction of junctions in simulated data sets with very high read-depth coverage to determine whether the evenness skew score would become saturated, such that it no longer provided an effective metric for evaluating junctions. this situation might occur when reads exist that match the reference starting at nearly every reference position on both strands. we used mason to generate a series of illumina single-end 50-base read data sets for one of the simulated genomes with deletions. these data sets progressively included additional reads to achieve 80-, 160-, 320-, 640-, -, and -fold genomic coverage. for each of these samples, breseq identified the junctions present in simulated genome perfectly. at the higher coverage values we observed more spurious junction candidates, but these were all rejected on the basis of their skew scores. reanalysis of an e. colievolution experiment because the simulated data does not fully reflect the types of sequencing errors present in a real data set, we next used breseq to predict mutations in genome resequencing data from a mutation accumulation laboratory evolution experiment with e. coli. in bacterial ma experiments, replicate lineages are cultured for many generations by picking an arbitrary colony and streaking it out on a new agar plate each day. due to the random choice of which individual colony is chosen and the frequent bottlenecks each time a subsequent colony grows from a single cell, this procedure leads to mutations accumulating over time in a lineage with very little influence from their fitness effects on the organism, as long as they are not lethal. therefore, the number of mutations that accumulate over time in a ma experiment can be used to estimate the rate of spontaneous mutations in an organism. point mutations and short indels were previously identified in the genomes of e. coli clones isolated at the end of this ma experiment, but structural variation was not analyzed. we tested sv prediction by breseq with default settings on the genomes that had evolved for generations as part of this ma experiment. the illumina resequencing data sets for these genomes consist of paired-end data with 90-base reads and an average coverage depth of approximately 100-fold. we first examined breseq output for genetic differences from the e. coli k- mg reference genome that were shared by all ma clones. these mutations were likely present in the ma experiment ancestor, so we generated an updated ancestral genome sequence incorporating these changes and used this as input into breseq to predict new mutations that evolved independently in each of the ma lineages. in total, breseq predicted evolved mutations that led to structural variation — deletions, is-mediated deletions, tandem duplications, and is-element insertions — from new junction and missing coverage evidence items. all of the remaining unassigned new junction evidence items and missing coverage item could be manually resolved into additional mutations: is-element insertions located in genomic repeat sequences that made one or both of the supporting junctions match multiple sites in the reference sequence equally well; deletion between is elements in which at least one of the two supporting junctions had one side that was ambiguously placed; and tandem repeat of bases that was not automatically predicted because this is longer than the read length. manually examining all evidence items also showed that one prediction of a point mutation was spurious and actually resulted from the deletion of one 8-bp unit from a sequence repeat that initially consisted of eight of these 8-bp units in the reference genome. several pieces of unassigned missing coverage evidence appeared to be due to locally low read coverage that dipped to zero at locations in the genome. as many of the chromosomal regions with this missing coverage were found in common between multiple independently evolved ma lines, it is possible that they result from systematic biases in coverage due to a library preparation artifact or more complex mutations that are already present in the ancestral strain of e. coli but cannot be resolved from mapping short-read data to the reference sequence. new junctions were also predicted that correspond to a 1829-bp inversion caused by the pine recombinase within the e prophage. the ancestral e. coli strain appeared to have the p orientation instead of the p orientation in the mg reference sequence. reversions to the p orientation were found in some of the evolved genomes. in most cases these mutations were not present in 100% of the sample, as determined by counting the number of reads aligned to the p form versus the p form in the same data set, perhaps indicating that this region may be genetically unstable and commonly “switch” during outgrowth of the selected clone, creating a mixture before genomic dna is isolated for sequencing. in addition to these mutations giving rise to sv, breseq predicted indels and base substitutions in these genomes. these values are slightly higher in each case than the and respectively, predicted in the initial report. this discrepancy is likely due to differences in the stringency of read alignment and quality control cutoffs, as all of the breseq indel and snv predictions appeared to be high quality upon manual examination. we cannot directly evaluate the performance of breseq on this e. coli data since the full set of true-positive mutations is unknown. however, we note that in other cases where breseq has been applied to sets of evolutionarily related genomes and when specific mutation predictions have been experimentally validated that its accuracy and sensitivity have been found to be similar to what was obtained with the simulated data sets for the types of sv that it predicts. overall, we found that 24% of the mutations predicted in the mutation accumulation experiment led to structural variation in the e. coli chromosome. insertions of new copies of insertion sequence elements, particularly is dominated among these events. this reanalysis enables us to estimate a spontaneous rate of sv mutations, which accounts for all mutations that are not single-base substitutions or short indels, in e. coli k- mg of mutations per genome per generation. of the sv predicted, 92% of the events were fully predicted by breseq without the need for any manual examination of “orphan” pieces of evidence to resolve them into precise molecular events. thus, breseq is a useful tool for discovering mutations that cause structural variation in order to more comprehensively understand how microbial genomes evolve.figure reanalysis of evolved e. coli samples for structural variation. a) summary of mutations predicted by breseq in clones sequenced after generations of growth in a mutation accumulation experiment. these samples were previously analyzed for single-base substitutions and small indels. the line extending across the bars separates single-base substitutions and indels from mutations affecting more bases that were classified as structural variants. full details for all mutations predicted in the ancestor of this experiment and each evolved lineage are provided in additional file b) overall representation of the different types of structural variants predicted from combinations of new junction and missing coverage evidence across all genomes. one structural variant was predicted from spurious read alignment evidence, as described in the text. planned future directions metagenomic resequencing data, generated from a mixture of haploid microbial genomes that have evolved from a common ancestor, can currently be analyzed by breseq to estimate the frequencies of single-base substitution and indel variants in a population. we intend to extend this capability, leveraging the work described here, to predict the frequencies of polymorphic structural variants in mixed population samples. the frequencies of mutations involving new junctions can be estimated by counting sequencing reads that span new junction candidates versus those that support unmutated reference genome sequences. this procedure could potentially detect structural variants at much lower frequencies than single-nucleotide or indel variants, as the occurrence of chimeric reads generating false-positive evidence for such mutations may be much rarer than the rate of base errors in sequencing data, but this hypothesis remains to be tested. we also plan to have breseq integrate additional kinds of evidence from more fully analyzing short-read dna sequencing data to make new and more precise mutation predictions. we have shown that split-read alignment information is very effective for predicting sv and other mutations in haploid microbial genomes, in agreement with other studies. however, using paired-end read mapping and analyzing “discordant pair” evidence could further aid in resolving breseq mutation predictions in or near repetitive genomic regions. new types of sv, such as large gene duplications, could also be predicted without user intervention in the future by examining anomalies in read-depth coverage across the reference genome to create “copy number” evidence. this analysis might use a circular binary segmentation algorithm after accounting for biases in read-depth coverage based on dna fragment gc-content, location in a chromosome with respect to an origin of dna replication, and other factors. finally, we intend to further improve breseq’s ability to fully resolve and annotate complex events that may involve successive mutations. for example, we commonly observe genomes where a first is insertion was followed by a second, adjacent is-mediated deletion in genomes derived from the lenski long-term laboratory evolution experiment with e. coli. currently, these compound events must be manually annotated as two mutations from a combination of evidence consisting of two new sequence junctions and one missing coverage interval.  structural variation in microbial genomes is a common source of genetic diversity that can be important during strain evolution inside and outside the laboratory. currently, ad hoc or non-automated approaches with unproven performance are often used to detect sv in microbial genome resequencing data sets, or sv is neglected entirely and only single-nucleotide and short indel variation are analyzed. we have demonstrated that breseq can fully predict many types of sv in clonal samples from information about regions of a reference genome joined by split-read alignments and regions lacking sequencing coverage. for example, we found that 24% of the mutations detected in a breseq reanalysis of genomes from an e. coli k- evolution experiment resulted in sv, with new insertions of transposable elements dominating among these major chromosomal changes. the sv-prediction capability of breseq should be useful for more fully characterizing genetic diversity in similar studies of evolving microorganisms. availability and requirements project name:breseq project home page:http://barricklab.org/breseq operating systems: linux, mac osx, windows programming languages: c++, r other requirements: bowtie version. or higher, r version or higher license: gnu general public license any restrictions to use by non-academics: none electronic supplementary material additional file 1:. source code archive for breseq computational pipeline. additional file 2:. archive detailing breseq predictions of mutations in genomes from the e. coli mutation accumulation experiment. file contents are as follows: ancestor.gd, differences between the ancestor strain of the ma experiment and the e. coli mg reference genome in genome diff format. this text-based file format is described in the breseq documentation; ancestor.gff, an annotated genome sequence of the ma ancestor in gff format, constructed by applying these mutations to the e. coli reference sequence; other *.gd files, genome diff files describing mutations predicted in each of the clones that were resequenced after generations of evolution in the ma experiment. abbreviations jcnew junction evidence mcmissing coverage evidence snvsingle-nucleotide variation svstructural variation srasplit-read alignment pempaired-end read mapping. competing interests the authors declare that they have no competing interests. authors’ contributions jeb, gc, ded, mds, jjb, ddk, ar, and agm coded breseq. jeb, gc, and cct analyzed simulated data. jeb and ded analyzed e. coli ma genomes. jeb, gc, ded, and cct created figures and wrote the manuscript. all authors edited and approved the manuscript. 
we demonstrate the performance of breseq on simulated escherichia coli genomes with deletions generating unique breakpoint sequences, new insertions of mobile genetic elements, and deletions mediated by mobile elements. we have implemented an algorithm for identifying structural variation from dna resequencing data as part of the breseq computational pipeline for predicting mutations in haploid microbial genomes. most current software programs for predicting structural variation from short-read dna resequencing data are intended primarily for use on human genomes. then, we reanalyze data from an e. coli k- mutation accumulation evolution experiment in which structural variation was not previously identified. in all cases, we find that breseq is able to reliably predict structural variation with modest read-depth coverage of the reference genome. using breseq to predict structural variation should be useful for studies of microbial epidemiology, experimental evolution, synthetic biology, and genetics when a reference genome for a closely related strain is available. they typically disregard information in reads mapping to repeat sequences, and significant post-processing and manual examination of their output is often required to rule out false-positive predictions and precisely describe mutational events. our method evaluates the support for new sequence junctions present in a clonal sample from split-read alignments to a reference genome, including matches to repeat sequences. then, it uses a statistical model of read coverage evenness to accept or reject these predictions. finally, breseq combines predictions of new junctions and deleted chromosomal regions to output biologically relevant descriptions of mutations and their effects on genes. transposon insertions and large-scale chromosomal changes detected by breseq account for ~25% of spontaneous mutations in this strain.
 mutations that alter chromosomal structure play critical roles in evolution and disease, including in the origin of new lifestyles and pathogenic traits in microbes. large-scale rearrangements in genomes are often mediated by recombination events involving new or existing copies of mobile genetic elements, recently duplicated genes, or other repetitive sequences. most current software programs for predicting structural variation from short-read dna resequencing data are intended primarily for use on human genomes. they typically disregard information in reads mapping to repeat sequences, and significant post-processing and manual examination of their output is often required to rule out false-positive predictions and precisely describe mutational events.  we have implemented an algorithm for identifying structural variation from dna resequencing data as part of the breseq computational pipeline for predicting mutations in haploid microbial genomes. our method evaluates the support for new sequence junctions present in a clonal sample from split-read alignments to a reference genome, including matches to repeat sequences. then, it uses a statistical model of read coverage evenness to accept or reject these predictions. finally, breseq combines predictions of new junctions and deleted chromosomal regions to output biologically relevant descriptions of mutations and their effects on genes. we demonstrate the performance of breseq on simulated escherichia coli genomes with deletions generating unique breakpoint sequences, new insertions of mobile genetic elements, and deletions mediated by mobile elements. then, we reanalyze data from an e. coli k- mutation accumulation evolution experiment in which structural variation was not previously identified. transposon insertions and large-scale chromosomal changes detected by breseq account for ~25% of spontaneous mutations in this strain. in all cases, we find that breseq is able to reliably predict structural variation with modest read-depth coverage of the reference genome.  using breseq to predict structural variation should be useful for studies of microbial epidemiology, experimental evolution, synthetic biology, and genetics when a reference genome for a closely related strain is available. in these cases, breseq can discover mutations that may be responsible for important or unintended changes in genomes that might otherwise go undetected. electronic supplementary material the online version of this article contains supplementary material, which is available to authorized users. keywords genome resequencingexperimental evolutionstrain engineeringinsertion sequencetranslocationissue-copyright-statement© the author 2014 