bx.align.core module
Classes that represent alignments between multiple sequences.
- class bx.align.core.Alignment(score=0, attributes=None, species_to_lengths=None)
Bases:
object
- add_component(component)
- column_iter()
- get_component_by_src(src)
- get_component_by_src_start(src)
- get_components_by_src(src)
- get_score()
- limit_to_species(species)
- remove_all_gap_columns()
Remove any columns containing only gaps from alignment components, text of components is modified IN PLACE.
- reverse_complement()
- property score
- set_score(score)
- slice(start, end)
- slice_by_component(component_index, start, end)
Return a slice of the alignment, corresponding to an coordinate interval in a specific component.
- component_index is one of
an integer offset into the components list a string indicating the src of the desired component a component
start and end are relative to the + strand, regardless of the component’s strand.
- src_size(src)
- class bx.align.core.Component(src='', start=0, size=0, strand=None, src_size=None, text='')
Bases:
object
- coord_to_col(pos)
Return the alignment column index corresponding to coordinate pos.
pos is relative to the + strand, regardless of the component’s strand.
- property end
- property forward_strand_end
- property forward_strand_start
- get_end()
- get_forward_strand_end()
- get_forward_strand_start()
- get_src_size()
- reverse_complement()
- set_src_size(src_size)
- slice(start, end)
- slice_by_coord(start, end)
Return the slice of the component corresponding to a coordinate interval.
start and end are relative to the + strand, regardless of the component’s strand.
- property src_size
- bx.align.core.get_indexed(format, filename, index_filename=None, keep_open=False, species_to_lengths=None)
- bx.align.core.get_reader(format, infile, species_to_lengths=None)
- bx.align.core.get_writer(format, outfile, attributes=None)
- bx.align.core.shuffle_columns(a)
Randomize the columns of an alignment
- bx.align.core.src_merge(species, chrom, contig=None)
- bx.align.core.src_split(src)