segmentmodel_from_lists module#

mrdna.readers.segmentmodel_from_lists.find_stacks(centers, transforms)[source]#
mrdna.readers.segmentmodel_from_lists.basepairs_and_stacks_to_helixmap(basepairs, stacks_above, nucleotide_rank=None)[source]#

Decide how helices should be created from basepair and stack data. Optionally use nucleotide_rank to determine direction of each helix and order of helices

mrdna.readers.segmentmodel_from_lists.set_splines(seg, coordinate, hid, hmap, hrank, fwd, basepair, orientation=None)[source]#
mrdna.readers.segmentmodel_from_lists.model_from_basepair_stack_3prime(coordinate, basepair, stack, three_prime, sequence=None, orientation=None, rank=None, explicitly_unstacked=(), max_basepairs_per_bead=5, max_nucleotides_per_bead=5, local_twist=False, dimensions=(5000, 5000, 5000), **model_parameters)[source]#

Creates a SegmentModel object from lists of each nucleotide’s basepair, its stack (on 3’ side) and its 3’-connected nucleotide

The first argument should be an N-by-3 numpy array containing the coordinate of each nucleotide, where N is the number of nucleotides. The following three arguments should be integer lists where the i-th element corresponds to the i-th nucleotide; the list element should the integer index of the corresponding basepaired / stacked / phosphodiester-bonded nucleotide. If there is no such nucleotide, the value should be -1.

By default, where there is a 3’-to-5’ connection between double-straned helices, they will be connected by an intrahelical connection that makes the helical domain continue across the connection, even if they do not stack in the stacking array. Instead, a “terminal_crossover” representing a relatively free (e.g. kinked) junction can be placed by including the index of one of the participating bases in the optional :explicitly_unstacked: tuple.

Parameters:
  • basepair – List of each nucleotide’s basepair’s index

  • stack – List containing index of the nucleotide stacked on the 3’ of each nucleotide

  • three_prime – List of each nucleotide’s the 3’ end of each nucleotide

Returns:

SegmentModel

mrdna.readers.segmentmodel_from_lists.model_from_pandas(df, coordinate_col='r', bp_col='bp', stack_col='stack', three_prime_col='threeprime', seq_col='seq', orientation_col='orientation', max_basepairs_per_bead=5, max_nucleotides_per_bead=5, local_twist=False, dimensions=(5000, 5000, 5000), **model_parameters)[source]#
mrdna.readers.segmentmodel_from_lists.UNIT_circular()[source]#

Make a circular DNA strand, with dsDNA in the middle