Bio.Affy.CelFile模块

从AffySYS CEL文件版本3和4中读取信息。

exception Bio.Affy.CelFile.ParserError(*args)

基类:ValueError

AffySYS解析器错误。

__init__(*args)

初始化课程。

__firstlineno__ = 22
__static_attributes__ = ()
class Bio.Affy.CelFile.Record

基类:object

将信息存储在cel文件中。

示例使用:

>>> from Bio.Affy import CelFile
>>> with open("Affy/affy_v3_example.CEL") 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__()

初始化课程。

__firstlineno__ = 30
__static_attributes__ = ('Algorithm', 'AlgorithmParameters', 'DatHeader', 'GridCornerLL', 'GridCornerLR', 'GridCornerUL', 'GridCornerUR', 'NumberCells', 'intensities', 'mask', 'modified', 'ncols', 'nmask', 'noutliers', 'npix', 'nrows', 'outliers', 'stdevs', 'version')
Bio.Affy.CelFile.read(handle, version=None)

读取AffyData CEL文件并返回Record对象。

支持MEL文件格式版本3和4。如果版本参数已知,请将CEL文件格式指定为3或4。如果未指定版本号,解析器将尝试从文件内容中检测版本。

此函数返回的Record对象将CEL文件中的强度存储在record.intentives中。目前,解析版本4的CEL文件时未设置record. march和record.outliers。

示例使用:

>>> from Bio.Affy import CelFile
>>> with open("Affy/affy_v3_example.CEL") as handle:
...     record = CelFile.read(handle)
...
>>> record.version == 3
True
>>> print("%i by %i array" % record.intensities.shape)
5 by 5 array
>>> with open("Affy/affy_v4_example.CEL", "rb") as handle:
...     record = CelFile.read(handle, version=4)
...
>>> record.version == 4
True
>>> print("%i by %i array" % record.intensities.shape)
5 by 5 array