3 Image Manipulation
Several bioinformatics applications use images to represent the data. Raw data coming off of a gel sequencer is an image of vertical lanes. Expression arrays originate as an image of thousands of circles. Newer applications associate phenotypes extracted from images with genotype information.
The Python Image Library (PIL) is a third-party module that provides a decent amount of image reading, writing, and manipulation software. This chapter will review the basics of this package and explore some of the basics of digital image processing.
3.1 The Image Module
To employ the PIL, the module is imported in one of two ways. For Versions 1.1.5 or earlier, the command import Image is used; for Version 1.1.6, the from PIL import ...
Get Python for Bioinformatics now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.