BACKGROUND
high-throughput methods for genome sequencing, in combination with increased computer power and better algorithms for sequence assembly, have yielded a plethora of genomes accessible for analysis.
however, complicated parts of sequenced genomes tend to be left unfinished to a large extent.
this is especially the case for eukaryotic genomes, where the majority of the genomes presently sequenced have repeated regions that were left unresolved .
current shotgun sequencing assembly programs are not designed to handle long stretches of repeated dna in the target sequence, and it is common that repeated sequences are left out of the assembly altogether.
in addition, repeats often cause assembly errors, e.g.
large artificial rearrangements due to misassembled repeat regions.
also common are assemblies with the repeat copies merged into alignments of high coverage, with reads of the repeat region piled on top of each other.
although many repeats appear to have no discernible biological function, in many cases the repeats play an important role in the biology of the organism  <cit> , and some organisms have a significant amount of their genes organized into head-to-tail tandem arrays consisting of nearly identical genes.
one example is trypanosoma cruzi, a protozoan parasite with a highly repetitive genome  <cit>  containing multi-copy gene families such as cruzipain  <cit> , histone h <dig>  <cit>  and hsp <dig>  <cit> .
the presence of repeated regions in the target sequence is thus the key problem in shotgun sequencing.
this is especially true for the whole genome shotgun  approach that has emerged as the method of choice in recent years.
where the previous clone-by-clone strategies allowed for compartmentalizing the genome and handling of repeat regions locally, the wgs approach requires handling of all copies of a repeat region simultaneously, even if they are spread throughout the genome.
the problems caused by repeats can be somewhat reduced by combining the two approaches, but the incidence of repeats remains a key problem and major cause of errors in shotgun sequencing assemblies.
a successful strategy for solving the problem for short repeat regions has been the use of mate pairs  <cit> .
using mate pairs it is possible to correctly assemble tandem repeat regions or single repeat units dispersed in unique genomic sequence, depending on the order in which the fragments are assembled and providing that a sufficient amount of the sequence reads sampling the repeat copies have mate pairs in the unique regions.
however, this strategy fails when nearly identical repeats are organized in tandem stretches longer than twice the shotgun fragment insert length.
in this case, the mate pairs of reads sampling repeat units, sample another part of the same repeat region, which makes it impossible for current assembly algorithms to determine the correct layout of the shotgun fragment reads.
these problems of the common assembly methods place a heavy burden on the biologists working on the finishing stage of sequencing projects and add to the bottleneck that finishing constitutes.
a number of tools have been developed to aid this process  <cit> .
however, these tools, although very useful for non-repeated sequences, are not designed for finishing complex, repeated regions.
generally, a major problem with current finishing tools is that they provide either a close-up view of the shotgun reads in the different contigs of the assembly, or a zoomed out view of the entire genome, with nothing in between.
with a rigid close-up view, the user can only view a small portion of the repeat region at a time, and much scrolling is required in order to get a clear understanding of the region, whereas a genome wide view does not allow for manual inspection and correction at the read level.
furthermore, common tools generally lack the flexibility needed to correct obvious errors in a straight forward fashion, often requiring the user to re-run the whole assembly and hope for the reads to end up in the correct positions.
most importantly, although other systems use high quality mismatches between reads in attempt to separate repeats, none of them have adequate specificity and fully utilize the presence of single base differences between repeat copies as a resource in repeat resolution.
we here present dnptrapper, an assembly editing and visualization tool specifically designed for manual analysis and finishing of repeated regions.
it differs from previous tools by providing flexibility and an overview that greatly simplifies the finishing process, by allowing the user to view whole repeat regions at once and to edit assembly errors manually by drag and drop.
the program implements and visualizes the results of a previously described statistical method that detects defined nucleotide positions  in the presence of sequencing errors  <cit> .
the source code is available from the authors under an open source license.
implementation
overview
dnptrapper is a sequence alignment editing tool developed for finishing complicated shotgun sequencing projects.
it combines relatively simple but powerful algorithms with visualization of problematic assembly locations, thus providing detailed information for biologists and allowing rapid decision making to make necessary corrections.
the main goal of dnptrapper is to provide more power to the user than other finishing tools.
the user can move sequences using drag and drop; re-align them; cut, copy, and paste them; run algorithms on them; add and remove features; choose between view modes; zoom in and out.
the user interface is a front end to a database, and changes made using trapper are automatically propagated to the database.
dnptrapper is essentially an editor that visualizes assemblies of shotgun sequence fragment reads as gapped multiple alignments.
the assemblies can be produced by any assembler that produces the supported file formats , and can be exported to the same format after repeat analysis and resolution.
in addition to the read sequences, different features and data such as dnps, vector sequence, quality values, chromatograms and mate pairs are visualized in the editor according to the preferences of the user.
sequence features can be present in the input assembly files, or be added during the finishing process by running default built-in algorithms that detect and label the desired features.
finishing of repeated regions is made less complicated using dnptrapper by providing three key features that common finishing tools lack.
the first feature is the availability of a birds-eye view of all the reads in a contig.
by zooming out, the user gets an overview of the contig, its length and depth, and can get a clear picture of the general properties of the region at once.
in combination with the second key feature, the built-in dnp visualization, this is very powerful for resolving repeats that differ in only a few positions along the repeat unit.
the dnps are color coded, which makes it possible to distinguish different repeat groups in a high coverage alignment by eye .
whereas other finishing tools can be quite rigid in the editing choices available to the user, dnptrapper also allows for manual editing operations such as cut, copy and paste.
in this respect, dnptrapper is similar to editors from other problem domains, e.g.
word processing software.
this flexibility offered to the user is the third key feature of the program.
it enables the user to correct errors in the assembly directly in the program window, without having to re-run the previous assembly step, and also to use a "sand-box" approach, which allows a user to try out different editing solutions in parallel within a single session.
by using drag and drop, it is possible to sort reads into different repeat groups according to dnp content.
by default, only vertical movement of reads is allowed to avoid breaking the overall layout of the assembly but horizontal moving of reads followed by re-aligning can also be performed.
together with default built-in algorithms for sorting reads according to a variety of criteria , these features allow for semi-automatic resolution of almost identical repeats in a straight forward fashion, reducing finishing time for such regions from days to a matter of hours or even minutes.
below, the flow of a typical session with dnptrapper is outlined, with description of some key aspects of program use.
importing data
the first step in a dnptrapper session is to import data into the editor.
file formats currently supported are the phrap .ace format and a native xml format described in the documentation.
other formats will be added; in the meantime there are free converters between different file formats available at the amos website  <cit> .
after importing, contigs in the project are available for analysis.
in the default visualization mode after opening a contig, sequence reads are represented by black-bordered boxes on white background.
when zooming in, the base sequences and quality values, visualized by a grey-scale, become visible.
the user can customize the visualization mode of quality values and other features.
realigning
since most assembly programs produce assemblies that are locally non-optimal, the next step is to apply the built-in realign algorithm  <cit>  to the contigs that appear to contain repeats.
this step is crucial for the subsequent application of the dnp algorithm.
dnp method
when the selected contig has been realigned, the dnp algorithm can be run with the desired parameters  in order to detect single base differences between repeat copies.
these appear as color coded dots in the alignment.
the different colors represent different dnp types, where a type is defined by the consensus base and the base of the single base difference.
there are thus twelve different dnp types and twelve corresponding colors.
repeat resolution
when the dnps have been detected, the actual finishing begins.
using the dnps the reads can be separated into different repeat groups, and the color coding of the dnps makes it possible to distinguish patterns in the alignment visually.
two different techniques are available in order to perform the separation.
one is to start with a read, select one of its dnps and automatically locate and group all other reads containing a dnp of the same type at the same column in the alignment.
another dnp present in the group can subsequently be selected to locate other reads that belong in the same group.
in this way, the user "walks" along the dnps in a group to extend it in both directions until all the dnps of the group have been exhausted .
the same procedure is subsequently performed on the reads that are left after extraction of the group.
individual reads or groups of reads can be dragged in and out of repeat groups as the user sees fit.
another strategy is to start by applying a sorting algorithm to the contig before finishing.
it sorts the reads into different groups according to their dnp content by picking out a read and locating all other reads sharing dnps with the original read and adding them to the set.
since the newly found reads may contain additional dnps, the process is repeated until all the dnps in the set have been exhausted.
however, the dnp detection method may produce false positives, and it is often necessary to perform manual correction of the group assignments after sorting since groups may have been merged together due to erroneous dnp assignments.
still, this simple algorithm performs remarkably well due to the low error rate of the dnp detection method, and errors are easy to resolve using human judgment and other available data such as mate pairs and chromatograms.
the most straightforward way to use dnptrapper is to use the sorting procedure and resolve the remaining ambiguities manually.
exporting data
after analysis and resolution, the database can be exported as a flat file , so that the data can re-enter the normal finishing pipeline.
there are also other export options that are more suitable if the objective is analysis rather than finishing; arbitrary subsets of sequences, or their consensus sequence, can be extracted and written to file in fasta format for analysis with other tools.
implementation
dnptrapper has been implemented using c++ and relies on open source software.
the graphical user interface library is qt  <cit> , and the berkeley database  <cit>  is used for storing the data.
great care has been taken to make the system suitable for projects of varying sizes.
all data is stored in the database and is read from a disc on request from the gui.
this makes the ram requirement low, allowing handling of projects of virtually any size.
this includes, but is not limited to, mammalian size genomes.
the parsers used for importing data into dnptrapper are event-based and file size is thus not a limiting factor.
apart from the scalability, flexibility has also been a major design goal.
a plug-in system and a well documented application program interface makes adding new algorithms, visualization modes and sequence features simple.
dnptrapper currently runs under linux fedora core  <dig> and have been tested on  <dig> and  <dig> bit platforms.
ports to other platforms may be carried out in the future.
RESULTS
in order to further illustrate the functionality of dnptrapper, we have tested it on three data sets, one simulated and two from the t. cruzi whole genome shotgun sequencing project  <cit> .
in all three cases, the reads from each project were assembled with phrap and subsequently imported into dnptrapper for further analysis.
phred quality values were not used in the assembly steps, in order to make sure that all reads with sequence similarity ended up aligned to each other.
the use of quality values causes phrap to partially resolve repeated regions, which makes for en incomplete analysis.
instead, the parameter -default_qual was set to  <dig>  regions of 89% average phred quality or more in the reads was subjected to dnp analysis.
the simulated data set was included as a proof of concept, to verify the correctness of the implementation of the dnp method and the functionality of the program.
the regions from t. cruzi were chosen since they are examples of complicated genomic regions of biological importance , and regions where the assembly program  has failed to assemble the reads correctly.
furthermore, they constitute two different types of tandem repeats that can be resolved using dnptrapper.
these genes have not been characterized previously in t. cruzi.
the regions were located by scanning the assembly for regions with unusually high shotgun coverage, and reads matching these regions where extracted by performing sequence similarity searches in the read database.
simulated project
we simulated shotgun sequencing of a  <dig> kb template sequence consisting of  <dig> repeat units of  <dig> kb in tandem, with a pair-wise sequence difference between any two repeat copies of 2%.
the simulation was performed using sim_gun , an in-house shotgun sequencing simulation program that emulates the sequencing process as closely as possible.
it uses quality values from real shotgun projects when constructing reads at random places in the target sequence.
this dataset could be resolved and divided into the ten repeat groups known to be present within minutes using the dnp sorting algorithm built into dnptrapper in combination with manual curation .
the algorithm performed the division almost single-handedly, apart from a case where erroneous dnp assignments had caused two groups to merge .
this error was easily corrected manually by moving reads directly in the dnptrapper window.
elongation factor  <dig>
the consensus sequence of the t. cruzi whole genome shotgun assembly contains a region with strong sequence homology to ef <dig>  crucial for the translocation step in eukaryote protein synthesis  <cit> .
the assembly program had assembled  <dig> shotgun reads covering this region into one pile, unable to separate the repeat copies.
the sequence similarity search located an additional  <dig> reads from this gene that had not been included in the original assembly.
the phrap assembly of these  <dig> reads was readily divided into two large groups  using a combination of manual and automatic sorting by dnp content.
within each group, no further division was possible.
the region illustrates a previously observed phenomenon in t. cruzi, where genes repeated in tandem are conserved within the repeat arrays on each allelic chromosome locus and more divergent between homologs.
in this analysis, the division into two groups was confirmed by examining the distribution of mate pairs in the assembly .
no reads in one group had mate pairs in the other group, which supports the hypothesis that this is indeed a case where the repeats are virtually identical within one homolog and differ across homologs.
the mechanism behind this phenomenon is currently unknown; this separation of the two haplotypes, pinpointing their differences, enables further studies.
monoglyceride lipase
another region present in the t. cruzi assembly is homologous to mgl, which is part of the fat digestion pathway  <cit> .
again, the reads sampling this region had been assembled in one pile consisting of  <dig> reads.
another  <dig> reads matching this region, discarded by the assembly program, were also located in the read database.
this repeat region was found to have a different structure than the ef <dig> region described above.
instead of two large groups corresponding to conserved repeat arrays on each homolog, the reads could be divided into several small groups representing repeat units present in one or two copies each.
the phrap alignment consisted of  <dig> reads and had a maximum coverage of  <dig> reads.
due to the fact that a high coverage yields more erroneous dnp assignments, most of the repeat separation had to be performed manually since false dnp positives have a bad effect on the dnp sorting algorithm.
still, within one hour's work by one person,  <dig> distinct repeat groups could be identified and separated , with their respective unique sites pinpointed.
a coverage analysis of the different groups indicated that four repeat units were present in one copy, seven were present in two copies, and eleven were present in one or two copies.
three additional groups had higher coverage, indicating copy numbers between three and eight.
again, the reason for this arrangement in the parasite genome is not understood, much due to the fact that such regions previously have been too difficult to resolve and characterize.
with the single base differences between repeat copies identified, it becomes possible to study such regions in detail and determine the functional consequences of the different variants present in repeat arrays.
discussion
repeated regions remain the key problem in shotgun sequencing.
current assembly algorithms are unable to assemble nearly identical repeats correctly.
repeated parts of the target genome are routinely left out of the assembly altogether, and when they are included, the resulting assemblies are full of errors such as large rearrangements, merged repeat copies and broken scaffolds.
finishing is the major bottleneck in sequencing projects, and complex, repeated regions are often left unresolved.
despite the fact that repeats are the main reason for assembly errors, commonly used finishing tools, e.g.
consed, are not designed with the repeat problem in mind.
the software is very useful for gap closure and other finishing operations on non-repeated sequences.
however, when repeats are encountered, current tools lack in flexibility and overview, not allowing the user to correct obvious errors manually and presenting a rigid, too close-up view of the repeat region.
moreover, no current finishing software utilizes single base differences between repeat copies as a tool for repeat separation.
with this in mind, we have developed a shotgun sequencing assembly editor specifically designed to cope with the problems encountered when the target sequence contains nearly identical repeats.
by zooming out of a contig, the user gets an overview of its length and depth, and the color coding of dnps makes it possible to directly see patterns of repeat groups in the data, which allows for rapid manual repeat separation.
instead of only allowing assembly programs to determine the positions of reads, the user is allowed to drag and drop sequences into the positions they see fit.
the option of re-assembly is still available, and the number of options for finishing is therefore increased.
these three features – dnp method, overview, and flexibility – set this tool apart from other finishing software and introduce a new concept for finishing.
the structure of dnptrapper makes it possible to add new features.
several possible extensions can already be envisaged.
most important is the addition of an algorithm that uses mate pairs to order the resolved repeat groups.
other improvements include supporting more input file formats, adding more viewable features, and adding a global view of all contigs in a project, with specific algorithms for comparing, ordering and merging contigs.
also, work is in progress to interface dnptrapper to tigr's open source assembler amos  <cit> .
CONCLUSIONS
our results show that finishing tasks previously deemed impossible to resolve or very time consuming can be performed in a straight-forward fashion using dnptrapper.
using this tool, the process of resolving repeat regions that would take days or weeks using current software, instead can be resolved within hours or even minutes.
the use of dnptrapper as a finishing tool reduces finishing times and thus costs.
it also allows in-depth studies and characterization of the poorly understood repeat regions present in most genomes.
availability and requirements
project name: dnptrapper
project home page:
operating system: linux
programming language: c++
license: bsd open source license
any restrictions to use by non-academics: no restrictions
authors' contributions
ea, mtt and ba planned the project.
ea implemented the algorithms and supervised implementation of the gui.
ek and ant acquired the data.
all authors read and approved the final manuscript.

 high-throughput methods for genome sequencing, in combination with increased computer power and better algorithms for sequence assembly, have yielded a plethora of genomes accessible for analysis. however, complicated parts of sequenced genomes tend to be left unfinished to a large extent. this is especially the case for eukaryotic genomes, where the majority of the genomes presently sequenced have repeated regions that were left unresolved. current shotgun sequencing assembly programs are not designed to handle long stretches of repeated dna in the target sequence, and it is common that repeated sequences are left out of the assembly altogether. in addition, repeats often cause assembly errors, e.g. large artificial rearrangements due to misassembled repeat regions. also common are assemblies with the repeat copies merged into alignments of high coverage, with reads of the repeat region piled on top of each other. although many repeats appear to have no discernible biological function, in many cases the repeats play an important role in the biology of the organism, and some organisms have a significant amount of their genes organized into head-to-tail tandem arrays consisting of nearly identical genes. one example is trypanosoma cruzi, a protozoan parasite with a highly repetitive genome containing multi-copy gene families such as cruzipain, histone h and hsp. the presence of repeated regions in the target sequence is thus the key problem in shotgun sequencing. this is especially true for the whole genome shotgun approach that has emerged as the method of choice in recent years. where the previous clone-by-clone strategies allowed for compartmentalizing the genome and handling of repeat regions locally, the wgs approach requires handling of all copies of a repeat region simultaneously, even if they are spread throughout the genome. the problems caused by repeats can be somewhat reduced by combining the two approaches, but the incidence of repeats remains a key problem and major cause of errors in shotgun sequencing assemblies. a successful strategy for solving the problem for short repeat regions has been the use of mate pairs. using mate pairs it is possible to correctly assemble tandem repeat regions or single repeat units dispersed in unique genomic sequence, depending on the order in which the fragments are assembled and providing that a sufficient amount of the sequence reads sampling the repeat copies have mate pairs in the unique regions. however, this strategy fails when nearly identical repeats are organized in tandem stretches longer than twice the shotgun fragment insert length. in this case, the mate pairs of reads sampling repeat units, sample another part of the same repeat region, which makes it impossible for current assembly algorithms to determine the correct layout of the shotgun fragment reads. these problems of the common assembly methods place a heavy burden on the biologists working on the finishing stage of sequencing projects and add to the bottleneck that finishing constitutes. a number of tools have been developed to aid this process. however, these tools, although very useful for non-repeated sequences, are not designed for finishing complex, repeated regions. generally, a major problem with current finishing tools is that they provide either a close-up view of the shotgun reads in the different contigs of the assembly, or a zoomed out view of the entire genome, with nothing in between. with a rigid close-up view, the user can only view a small portion of the repeat region at a time, and much scrolling is required in order to get a clear understanding of the region, whereas a genome wide view does not allow for manual inspection and correction at the read level. furthermore, common tools generally lack the flexibility needed to correct obvious errors in a straight forward fashion, often requiring the user to re-run the whole assembly and hope for the reads to end up in the correct positions. most importantly, although other systems use high quality mismatches between reads in attempt to separate repeats, none of them have adequate specificity and fully utilize the presence of single base differences between repeat copies as a resource in repeat resolution. we here present dnptrapper, an assembly editing and visualization tool specifically designed for manual analysis and finishing of repeated regions. it differs from previous tools by providing flexibility and an overview that greatly simplifies the finishing process, by allowing the user to view whole repeat regions at once and to edit assembly errors manually by drag and drop. the program implements and visualizes the results of a previously described statistical method that detects defined nucleotide positions in the presence of sequencing errors. the source code is available from the authors under an open source license. implementation overview dnptrapper is a sequence alignment editing tool developed for finishing complicated shotgun sequencing projects. it combines relatively simple but powerful algorithms with visualization of problematic assembly locations, thus providing detailed information for biologists and allowing rapid decision making to make necessary corrections. the main goal of dnptrapper is to provide more power to the user than other finishing tools. the user can move sequences using drag and drop; re-align them; cut, copy, and paste them; run algorithms on them; add and remove features; choose between view modes; zoom in and out. the user interface is a front end to a database, and changes made using trapper are automatically propagated to the database. dnptrapper is essentially an editor that visualizes assemblies of shotgun sequence fragment reads as gapped multiple alignments. the assemblies can be produced by any assembler that produces the supported file formats, and can be exported to the same format after repeat analysis and resolution. in addition to the read sequences, different features and data such as dnps, vector sequence, quality values, chromatograms and mate pairs are visualized in the editor according to the preferences of the user. sequence features can be present in the input assembly files, or be added during the finishing process by running default built-in algorithms that detect and label the desired features. finishing of repeated regions is made less complicated using dnptrapper by providing three key features that common finishing tools lack. the first feature is the availability of a birds-eye view of all the reads in a contig. by zooming out, the user gets an overview of the contig, its length and depth, and can get a clear picture of the general properties of the region at once. in combination with the second key feature, the built-in dnp visualization, this is very powerful for resolving repeats that differ in only a few positions along the repeat unit. the dnps are color coded, which makes it possible to distinguish different repeat groups in a high coverage alignment by eye. whereas other finishing tools can be quite rigid in the editing choices available to the user, dnptrapper also allows for manual editing operations such as cut, copy and paste. in this respect, dnptrapper is similar to editors from other problem domains, e.g. word processing software. this flexibility offered to the user is the third key feature of the program. it enables the user to correct errors in the assembly directly in the program window, without having to re-run the previous assembly step, and also to use a "sand-box" approach, which allows a user to try out different editing solutions in parallel within a single session. by using drag and drop, it is possible to sort reads into different repeat groups according to dnp content. by default, only vertical movement of reads is allowed to avoid breaking the overall layout of the assembly but horizontal moving of reads followed by re-aligning can also be performed. together with default built-in algorithms for sorting reads according to a variety of criteria, these features allow for semi-automatic resolution of almost identical repeats in a straight forward fashion, reducing finishing time for such regions from days to a matter of hours or even minutes. below, the flow of a typical session with dnptrapper is outlined, with description of some key aspects of program use. importing data the first step in a dnptrapper session is to import data into the editor. file formats currently supported are the phrap.ace format and a native xml format described in the documentation. other formats will be added; in the meantime there are free converters between different file formats available at the amos website. after importing, contigs in the project are available for analysis. in the default visualization mode after opening a contig, sequence reads are represented by black-bordered boxes on white background. when zooming in, the base sequences and quality values, visualized by a grey-scale, become visible. the user can customize the visualization mode of quality values and other features. realigning since most assembly programs produce assemblies that are locally non-optimal, the next step is to apply the built-in realign algorithm to the contigs that appear to contain repeats. this step is crucial for the subsequent application of the dnp algorithm. dnp method when the selected contig has been realigned, the dnp algorithm can be run with the desired parameters in order to detect single base differences between repeat copies. these appear as color coded dots in the alignment. the different colors represent different dnp types, where a type is defined by the consensus base and the base of the single base difference. there are thus twelve different dnp types and twelve corresponding colors. repeat resolution when the dnps have been detected, the actual finishing begins. using the dnps the reads can be separated into different repeat groups, and the color coding of the dnps makes it possible to distinguish patterns in the alignment visually. two different techniques are available in order to perform the separation. one is to start with a read, select one of its dnps and automatically locate and group all other reads containing a dnp of the same type at the same column in the alignment. another dnp present in the group can subsequently be selected to locate other reads that belong in the same group. in this way, the user "walks" along the dnps in a group to extend it in both directions until all the dnps of the group have been exhausted. the same procedure is subsequently performed on the reads that are left after extraction of the group. individual reads or groups of reads can be dragged in and out of repeat groups as the user sees fit. another strategy is to start by applying a sorting algorithm to the contig before finishing. it sorts the reads into different groups according to their dnp content by picking out a read and locating all other reads sharing dnps with the original read and adding them to the set. since the newly found reads may contain additional dnps, the process is repeated until all the dnps in the set have been exhausted. however, the dnp detection method may produce false positives, and it is often necessary to perform manual correction of the group assignments after sorting since groups may have been merged together due to erroneous dnp assignments. still, this simple algorithm performs remarkably well due to the low error rate of the dnp detection method, and errors are easy to resolve using human judgment and other available data such as mate pairs and chromatograms. the most straightforward way to use dnptrapper is to use the sorting procedure and resolve the remaining ambiguities manually. exporting data after analysis and resolution, the database can be exported as a flat file, so that the data can re-enter the normal finishing pipeline. there are also other export options that are more suitable if the objective is analysis rather than finishing; arbitrary subsets of sequences, or their consensus sequence, can be extracted and written to file in fasta format for analysis with other tools. implementation dnptrapper has been implemented using c++ and relies on open source software. the graphical user interface library is qt, and the berkeley database is used for storing the data. great care has been taken to make the system suitable for projects of varying sizes. all data is stored in the database and is read from a disc on request from the gui. this makes the ram requirement low, allowing handling of projects of virtually any size. this includes, but is not limited to, mammalian size genomes. the parsers used for importing data into dnptrapper are event-based and file size is thus not a limiting factor. apart from the scalability, flexibility has also been a major design goal. a plug-in system and a well documented application program interface makes adding new algorithms, visualization modes and sequence features simple. dnptrapper currently runs under linux fedora core and have been tested on and bit platforms. ports to other platforms may be carried out in the future.  in order to further illustrate the functionality of dnptrapper, we have tested it on three data sets, one simulated and two from the t. cruzi whole genome shotgun sequencing project. in all three cases, the reads from each project were assembled with phrap and subsequently imported into dnptrapper for further analysis. phred quality values were not used in the assembly steps, in order to make sure that all reads with sequence similarity ended up aligned to each other. the use of quality values causes phrap to partially resolve repeated regions, which makes for en incomplete analysis. instead, the parameter -default_qual was set to regions of 89% average phred quality or more in the reads was subjected to dnp analysis. the simulated data set was included as a proof of concept, to verify the correctness of the implementation of the dnp method and the functionality of the program. the regions from t. cruzi were chosen since they are examples of complicated genomic regions of biological importance, and regions where the assembly program has failed to assemble the reads correctly. furthermore, they constitute two different types of tandem repeats that can be resolved using dnptrapper. these genes have not been characterized previously in t. cruzi. the regions were located by scanning the assembly for regions with unusually high shotgun coverage, and reads matching these regions where extracted by performing sequence similarity searches in the read database. simulated project we simulated shotgun sequencing of a kb template sequence consisting of repeat units of kb in tandem, with a pair-wise sequence difference between any two repeat copies of 2%. the simulation was performed using sim_gun, an in-house shotgun sequencing simulation program that emulates the sequencing process as closely as possible. it uses quality values from real shotgun projects when constructing reads at random places in the target sequence. this dataset could be resolved and divided into the ten repeat groups known to be present within minutes using the dnp sorting algorithm built into dnptrapper in combination with manual curation. the algorithm performed the division almost single-handedly, apart from a case where erroneous dnp assignments had caused two groups to merge. this error was easily corrected manually by moving reads directly in the dnptrapper window. elongation factor the consensus sequence of the t. cruzi whole genome shotgun assembly contains a region with strong sequence homology to ef crucial for the translocation step in eukaryote protein synthesis. the assembly program had assembled shotgun reads covering this region into one pile, unable to separate the repeat copies. the sequence similarity search located an additional reads from this gene that had not been included in the original assembly. the phrap assembly of these reads was readily divided into two large groups using a combination of manual and automatic sorting by dnp content. within each group, no further division was possible. the region illustrates a previously observed phenomenon in t. cruzi, where genes repeated in tandem are conserved within the repeat arrays on each allelic chromosome locus and more divergent between homologs. in this analysis, the division into two groups was confirmed by examining the distribution of mate pairs in the assembly. no reads in one group had mate pairs in the other group, which supports the hypothesis that this is indeed a case where the repeats are virtually identical within one homolog and differ across homologs. the mechanism behind this phenomenon is currently unknown; this separation of the two haplotypes, pinpointing their differences, enables further studies. monoglyceride lipase another region present in the t. cruzi assembly is homologous to mgl, which is part of the fat digestion pathway. again, the reads sampling this region had been assembled in one pile consisting of reads. another reads matching this region, discarded by the assembly program, were also located in the read database. this repeat region was found to have a different structure than the ef region described above. instead of two large groups corresponding to conserved repeat arrays on each homolog, the reads could be divided into several small groups representing repeat units present in one or two copies each. the phrap alignment consisted of reads and had a maximum coverage of reads. due to the fact that a high coverage yields more erroneous dnp assignments, most of the repeat separation had to be performed manually since false dnp positives have a bad effect on the dnp sorting algorithm. still, within one hour's work by one person, distinct repeat groups could be identified and separated, with their respective unique sites pinpointed. a coverage analysis of the different groups indicated that four repeat units were present in one copy, seven were present in two copies, and eleven were present in one or two copies. three additional groups had higher coverage, indicating copy numbers between three and eight. again, the reason for this arrangement in the parasite genome is not understood, much due to the fact that such regions previously have been too difficult to resolve and characterize. with the single base differences between repeat copies identified, it becomes possible to study such regions in detail and determine the functional consequences of the different variants present in repeat arrays. discussion repeated regions remain the key problem in shotgun sequencing. current assembly algorithms are unable to assemble nearly identical repeats correctly. repeated parts of the target genome are routinely left out of the assembly altogether, and when they are included, the resulting assemblies are full of errors such as large rearrangements, merged repeat copies and broken scaffolds. finishing is the major bottleneck in sequencing projects, and complex, repeated regions are often left unresolved. despite the fact that repeats are the main reason for assembly errors, commonly used finishing tools, e.g. consed, are not designed with the repeat problem in mind. the software is very useful for gap closure and other finishing operations on non-repeated sequences. however, when repeats are encountered, current tools lack in flexibility and overview, not allowing the user to correct obvious errors manually and presenting a rigid, too close-up view of the repeat region. moreover, no current finishing software utilizes single base differences between repeat copies as a tool for repeat separation. with this in mind, we have developed a shotgun sequencing assembly editor specifically designed to cope with the problems encountered when the target sequence contains nearly identical repeats. by zooming out of a contig, the user gets an overview of its length and depth, and the color coding of dnps makes it possible to directly see patterns of repeat groups in the data, which allows for rapid manual repeat separation. instead of only allowing assembly programs to determine the positions of reads, the user is allowed to drag and drop sequences into the positions they see fit. the option of re-assembly is still available, and the number of options for finishing is therefore increased. these three features – dnp method, overview, and flexibility – set this tool apart from other finishing software and introduce a new concept for finishing. the structure of dnptrapper makes it possible to add new features. several possible extensions can already be envisaged. most important is the addition of an algorithm that uses mate pairs to order the resolved repeat groups. other improvements include supporting more input file formats, adding more viewable features, and adding a global view of all contigs in a project, with specific algorithms for comparing, ordering and merging contigs. also, work is in progress to interface dnptrapper to tigr's open source assembler amos.  our results show that finishing tasks previously deemed impossible to resolve or very time consuming can be performed in a straight-forward fashion using dnptrapper. using this tool, the process of resolving repeat regions that would take days or weeks using current software, instead can be resolved within hours or even minutes. the use of dnptrapper as a finishing tool reduces finishing times and thus costs. it also allows in-depth studies and characterization of the poorly understood repeat regions present in most genomes. availability and requirements project name: dnptrapper project home page: operating system: linux programming language: c++ license: bsd open source license any restrictions to use by non-academics: no restrictions authors' contributions ea, mtt and ba planned the project. ea implemented the algorithms and supervised implementation of the gui. ek and ant acquired the data. all authors read and approved the final manuscript. 
we have developed dnptrapper, a shotgun sequence finishing tool, specifically designed to address the problems posed by the presence of repeated regions in the target sequence. the program detects and visualizes single base differences between nearly identical repeat copies, and offers the overview and flexibility needed to rapidly resolve complex regions within a working session. the use of a database allows large amounts of data to be stored and handled, and allows viewing of mammalian size genomes. finishing is the most time consuming step in sequencing and current finishing tools are not designed with particular attention to the repeat problem. the program is available under an open source license.
 many genome projects are left unfinished due to complex, repeated regions. finishing is the most time consuming step in sequencing and current finishing tools are not designed with particular attention to the repeat problem.  we have developed dnptrapper, a shotgun sequence finishing tool, specifically designed to address the problems posed by the presence of repeated regions in the target sequence. the program detects and visualizes single base differences between nearly identical repeat copies, and offers the overview and flexibility needed to rapidly resolve complex regions within a working session. the use of a database allows large amounts of data to be stored and handled, and allows viewing of mammalian size genomes. the program is available under an open source license.  with dnptrapper, it is possible to separate repeated regions that previously were considered impossible to resolve, and finishing tasks that previously took days or weeks can be resolved within hours or even minutes. 