Chapter 4. Sequence Formats and Inheritance
This chapter applies concepts and techniques from previous chapters
to a concrete project: handling sequence files. The chapter also
introduces a few new techniques including a very important one called
class inheritance. The code developed in this chapter will also be
incorporated into later chapters. Class inheritance allows you to define a new
class by inheriting from other
classesaltering or making additions as needed.
It's a style of software reuse that is particular to
object-oriented design. The first class developed in this chapter is a simple one: reading
and writing files. Using inheritance, you can extend that class to a
new one that can recognize, read, and write data in several different
biological sequence datafile formats. The goal is, as always, to learn enough about Perl to develop
software for your own needs. The code in this chapter is designed
with this goal in mind. In particular, the exercises at the end of
the chapter will ask you to extend and improve the code in various
ways. |