Bio.Align.bigbed模块

Bio.Align支持bigBed格式的对齐文件。

bigBed格式将一系列成对排列存储在单个索引二进制文件中。通常,它们用于转录本与基因组的比对。与BED格式一样,排列位置和排列分数被存储,但排列序列不被存储。

请访问http://genome.ucsc.edu/goldenPath/help/bigBed.html了解更多信息。

您需要通过Bio.Align功能使用此模块。

class Bio.Align.bigbed.Field(as_type, name, comment)

基类:tuple

__getnewargs__()

将自我返回为一个简单的二元组。 由复制和腌制使用。

__match_args__ = ('as_type', 'name', 'comment')
static __new__(_cls, as_type, name, comment)

创建Field的新实例(as_类型、名称、注释)

__replace__(**kwds)

返回新Field对象,用新值替换指定字段

__repr__()

返回格式良好的表示字符串

__slots__ = ()
as_type

字段号0的收件箱

comment

字段2的收件箱

name

字段号1的收件箱

class Bio.Align.bigbed.AutoSQLTable(name, comment, fields)

基类:list

AutoSQL表描述(可能扩展)BED格式的列。

default: AutoSQLTable = [('string', 'chrom', 'Reference sequence chromosome or scaffold'), ('uint', 'chromStart', 'Start position in chromosome'), ('uint', 'chromEnd', 'End position in chromosome'), ('string', 'name', 'Name of item.'), ('uint', 'score', 'Score (0-1000)'), ('char[1]', 'strand', '+ or - for strand'), ('uint', 'thickStart', 'Start of where display should be thick (start codon)'), ('uint', 'thickEnd', 'End of where display should be thick (stop codon)'), ('uint', 'reserved', 'Used as itemRgb as of 2004-11-22'), ('int', 'blockCount', 'Number of blocks'), ('int[blockCount]', 'blockSizes', 'Comma separated list of block sizes'), ('int[blockCount]', 'chromStarts', 'Start positions relative to chromStart')]
__init__(name, comment, fields)

创建描述(扩展)BED格式的列的AutoSQL表。

classmethod from_bytes(data)

返回使用字节对象数据初始化的AutoSQL Table。

classmethod from_string(data)

返回使用字符串对象数据初始化的AutoMQTable。

__str__()

返回url(self)。

__bytes__()
__getitem__(i)

回归自我 [index] .

__annotations__ = {'default': 'AutoSQLTable'}
__firstlineno__ = 72
__static_attributes__ = ('comment', 'name')
class Bio.Align.bigbed.AlignmentWriter(target, bedN=12, declaration=None, targets=None, compress=True, itemsPerSlot=512, blockSize=256, extraIndex=())

基类:AlignmentWriter

用于bigBed文件格式的对齐文件编写器。

fmt: str | None = 'bigBed'
mode = 'b'
__init__(target, bedN=12, declaration=None, targets=None, compress=True, itemsPerSlot=512, blockSize=256, extraIndex=())

创建AlignmentWriter对象。

论点:
  • 目标 - 输出流或文件名。

  • 床N - BED文件中的列数。

    它必须介于3和12之间;默认值为12。

  • 声明-一个AutoMQTable对象,声明

    床文件。仅当BED文件包含额外(自定义)字段时才需要。默认值为无。

  • 目标 - 包含染色体的SeqRecord对象列表

    它们在排列中出现的顺序。每个SeqRecord中的序列内容可能未定义,但必须定义序列长度,如本例所示:

    SeqRecord(Seq(无,长度=248956422),id=“chr1”)

    如果targets为“无”(默认值),则对齐必须具有一个属性.targets,以提供SeqRecord对象列表。

  • 压缩 - 如果为True(默认),请使用zlib压缩数据。

    如果为假,则不压缩数据。使用compress=False以更快地搜索。

  • blockSize - 要在r树中捆绑的项目数。

    有关更多信息,请参阅UCSC的bedToBigBed计划。默认值为256。

  • itemsPerSlot -最低级别捆绑的数据点数量。

    有关更多信息,请参阅UCSC的bedToBigBed计划。使用itemsPerSlot=1可加快搜索速度。默认值为512。

  • extra Index - 包含额外列名称的字符串列表

    索引。默认值是空列表。

write_file(stream, alignments)

将对齐方式写入文件流,并返回对齐方式的数量。

对齐-返回对齐对象流的列表或迭代器 - 输出文件流。

write_alignments(alignments, output, reductions, extra_indices)

将对齐方式写入输出文件,并返回对齐方式的数量。

对齐-返回对齐对象流的列表或迭代器 - 输出文件流。

__abstractmethods__ = frozenset({})
__annotations__ = {'fmt': 'Optional[str]'}
__firstlineno__ = 216
__static_attributes__ = ('bedN', 'blockSize', 'compress', 'declaration', 'extraIndexNames', 'itemsPerSlot', 'targets')
class Bio.Align.bigbed.AlignmentIterator(source)

基类:AlignmentIterator

bigBed文件的对齐迭代器。

存储在bigBed文件中的成对比对被增量加载和返回。 附加对齐信息存储为每个对齐的属性。

fmt: str | None = 'bigBed'
mode = 'b'
__len__()

返回对齐数量。

缓存对齐数量。如果尚未计算,则迭代器倒带到开头,并通过迭代对齐来计算对齐数量。然后迭代器返回到文件中的原始位置。

search(chromosome=None, start=None, end=None)

重复与指定染色体区域重叠的比对。

该方法搜索索引以找到与开始和结束之间的染色体区域完全或部分重叠的指定染色体的比对。

论点:
  • 染色体-染色体名称。如果无(默认值),则包括所有路线。

  • 开始 - 染色体上的起始位置。如果无(默认值),则使用0作为开始位置。

  • 端 - 染色体上的末端位置。如果无(默认值),则使用染色体长度作为结束位置。

__abstractmethods__ = frozenset({})
__annotations__ = {'fmt': 'Optional[str]'}
__firstlineno__ = 691
__static_attributes__ = ('_compressed', '_custom_fields', '_data', '_length', 'bedN', 'byteorder', 'declaration', 'itemsPerSlot', 'targets', 'tree')