Bio.Affy.CelFile module¶
Reading information from Affymetrix CEL files version 3 and 4.
-
exception
Bio.Affy.CelFile.
ParserError
(*args)¶ Bases:
ValueError
Affymetrix parser error.
-
__init__
(self, *args)¶ Initialise class.
-
-
class
Bio.Affy.CelFile.
Record
¶ Bases:
object
Stores the information in a cel file.
Example usage:
>>> from Bio.Affy import CelFile >>> with open("Affy/affy_v3_example.CEL", "r") as handle: ... c = CelFile.read(handle) ... >>> print(c.ncols, c.nrows) 5 5 >>> print(c.intensities) [[ 234. 170. 22177. 164. 22104.] [ 188. 188. 21871. 168. 21883.] [ 188. 193. 21455. 198. 21300.] [ 188. 182. 21438. 188. 20945.] [ 193. 20370. 174. 20605. 168.]] >>> print(c.stdevs) [[ 24. 34.5 2669. 19.7 3661.2] [ 29.8 29.8 2795.9 67.9 2792.4] [ 29.8 88.7 2976.5 62. 2914.5] [ 29.8 76.2 2759.5 49.2 2762. ] [ 38.8 2611.8 26.6 2810.7 24.1]] >>> print(c.npix) [[25 25 25 25 25] [25 25 25 25 25] [25 25 25 25 25] [25 25 25 25 25] [25 25 25 25 25]]
-
__init__
(self)¶ Initialize class.
-
-
Bio.Affy.CelFile.
read
(handle)¶ Read Affymetrix CEL file and return Record object.
CEL files version 3 and 4 are supported, and the parser attempts version detection.
Example Usage:
>>> from Bio.Affy import CelFile >>> with open("Affy/affy_v4_example.CEL", "rb") as handle: ... c = CelFile.read(handle) ... >>> c.version == 4 True
-
Bio.Affy.CelFile.
read_v4
(f)¶ Read verion 4 Affymetrix CEL file, returns corresponding Record object.
Most importantly record.intensities correspond to intensities from the CEL file.
record.mask and record.outliers are not set.
Example Usage:
>>> from Bio.Affy import CelFile >>> with open("Affy/affy_v4_example.CEL", "rb") as handle: ... c = CelFile.read_v4(handle) ... >>> c.version == 4 True >>> print("%i by %i array" % c.intensities.shape) 5 by 5 array
-
Bio.Affy.CelFile.
read_v3
(handle)¶ Read version 3 Affymetrix CEL file, and return corresponding Record object.
Example Usage:
>>> from Bio.Affy import CelFile >>> with open("Affy/affy_v3_example.CEL", "r") as handle: ... c = CelFile.read_v3(handle) ... >>> c.version == 3 True