ArticleslgStudy

computer science

Phrap

Phrap is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Phrap rather than just read about it. In short: Phrap is a widely used program for DNA sequence assembly. It is part of the Phred-Phrap-Consed package.

Key takeaways

  • Phrap belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Phrap to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Phrap from memory before moving on to harder problems.

Reference excerpt

Phrap is a widely used program for DNA sequence assembly. It is part of the Phred-Phrap-Consed package.

History Phrap was originally developed by Prof. Phil Green for the assembly of cosmids in large-scale cosmid shotgun sequencing within the Human Genome Project. Phrap has been widely used for many different sequence assembly projects, including bacterial genome assemblies and EST assemblies. Phrap was written as a command line program for easy integration into automated data workflows in genome sequencing centers. For users who want to use Phrap from a graphical interface, the commercial programs MacVector (for Mac OS X only) and CodonCode Aligner (for Mac OS X and Microsoft Windows) are available.

Methods A detailed (albeit partially outdated) description of the Phrap algorithms can be found in the Phrap documentation. A recurring thread within the Phrap algorithms is the use of Phred quality scores. Phrap used quality scores to mitigate a problem that other assembly programs had struggled with at the beginning of the Human Genome Project: correctly assembling frequent imperfect repeats, in particular Alu sequences. Phrap uses quality scores to tell if any observed differences in repeated regions are likely to be due to random ambiguities in the sequencing process, or more likely to be due to the sequences being from different copies of the Alu repeat. Typically, Phrap had no problems differentiating between the different Alu copies in a cosmid, and to correctly assemble the cosmids (or, later, BACs). The logic is simple: a base call with a high probability of being correct should never be aligned with another high quality but different base. However, Phrap does not rule out such alignments entirely, and the cross_match alignment gap and alignment penalties used while looking for local alignments are not always optimal for typical sequencing errors and a search for overlapping (contiguous) sequences. (Affine gaps are helpful for homology searches but not usually for sequencing error alignment). Phrap attempts to classify chimeras, vector sequences and low quality end regions all in a single alignment and will sometimes make mistakes. Furthermore, Phrap has more than one round of assembly building internally and later rounds are less stringent - Greedy algorithm. These design choices were helpful in the 1990s when the program was originally written (at Washington University in St. Louis) but are less so now. Phrap appears error prone in comparison with newer assemblers like Euler and cannot use mate-pair information directly to guide assembly and assemble past perfect repeats. Phrap is not free software so it has not been extended and enhanced like less restricted open-source software Sequence assembly.

Quality based consensus sequences Another use of Phred quality scores by Phrap that contributed to the program's success was the determination of consensus sequences using sequence qualities. In effect, Phrap automated a step that was a major bottleneck in the early phases of the Human Genome Project: to determine the correct consensus sequence at all positions where the assembled sequences had discrepant bases. This approach had been suggested by Bonfield and Staden in 1995, and was implemented and further optimized in Phrap. Basically, at any consensus position with discrepant bases, Phrap examines the quality scores of the aligned sequences to find the highest quality sequence. In the process, Phrap takes confirmation of local sequence by other reads into account, after considering direction and sequencing chemistry. The mathematics of this approach were rather simple, since Phred quality scores are logarithmically linked to error probabilities. This means that the quality scores of confirming reads can simply be added, as long as the error distributions are sufficiently independent. To satisfy this independence criterion, reads must typically be in different direction, since peak patterns that cause base calling errors are often identical when a region is sequenced several times in the same direction. If a consensus base is covered by both high-quality sequence and (discrepant) low-quality sequence, Phrap's selection of the higher quality sequence will in most cases be correct. Phrap then assigns the confirmed base quality to the consensus sequence base. This makes it easy to (a) find consensus regions that are not covered by high quality sequence (which will also have low quality), and (b) to quickly calculate a reasonably accurate estimate of the error rate of the consensus sequence. This information can then be used to direct finishing efforts, for example re-sequencing of problem regions. The combination of accurate, base-specific quality scores and a quality-based consensus sequence was a critical element in the success of the Human Genome Project. Phred and Phrap, and similar programs who picked up on the ideas pioneered by these two programs, enabled the assembly of large parts of the human genome (and many other genomes) at an accuracy that was substantially higher (less than 1 error in 10,000 bases) than the typical accuracy of carefully hand-edited sequences that had been submitted to the GenBank database before.

References

External links Phrap homepage

Other Software Phred Consed DNA Baser Command Line Tool

Worked examples

Example 1 — a first encounter with Phrap

Start with the simplest possible case. Write down what Phrap claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Phrap before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Phrap ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Phrap

In research
Phrap appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Phrap in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Phrap is common in secondary-school and first-year university syllabi. It links to neighbouring topics Bioinformatics software, Computational science, so understanding it makes those chapters shorter.
In everyday life
Look for Phrap outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Phrap” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Phrap in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Phrap means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Phrap out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Phrap in simple terms?

Phrap is a widely used program for DNA sequence assembly. It is part of the Phred-Phrap-Consed package.

Why does Phrap matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Phrap?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Phrap.

Tags

  • Bioinformatics software
  • Computational science

Keep exploring