fractaldna.dna_models.dnachain.EightStrandDNAChain

class fractaldna.dna_models.dnachain.EightStrandDNAChain(genome, sep1, sep2, turn=False, twist=False)

Bases: DNAChain

Construct eight DNA chains that can turn 90 degrees if turn=True

Chain indices are assigned anticlockwise starting from the +y strand, first to the inner four strands, then two the outer four strands. i.e.:

____________________
|                  |
|        4         |
|        0         |
|  5  1     3  7   |
|        2         |
|        6         |
|__________________|

Strands 1 and 3, 0 and 2 are separated by sep1 Strands 4 and 6, 5 and 7 are separated by sep2

Parameters:
  • genome (str) – string of GATC specifying genome order

  • sep1 (float) – separation of inner strands from the center in angstroms

  • sep2 (float) – separation of outer strands from the center in angstroms

  • turn (bool) – boolean, turn strands 90 degrees along box

  • twist (bool) – boolean, add a 90 deg twist to each chain

__init__(genome, sep1, sep2, turn=False, twist=False)

EightStrandTurnedDNAChain(genome, sep1, sep2, turn=False, twist=False)

Methods

__init__(genome, sep1, sep2[, turn, twist])

EightStrandTurnedDNAChain(genome, sep1, sep2, turn=False, twist=False)

center_in_z()

Center the molecule around the z=0 plane

to_frame([suppress_hash])

Return the molecules as a pandas data frame

to_line_plot([size])

Return a mayavi figure instance with histone and linkers shown

to_plot([plot_p, plot_b, plot_s])

Return a matplotlib.Figure instance with molecules plotted

to_strand_plot([plot_p, plot_b, plot_s, plot_bp])

Return a mayavi figure instance with strands plotted

to_surface_plot()

Plot the surfaces of each molecule in the chain.

to_text([seperator])

Return a description of the molecules in the chain as text

center_in_z()

Center the molecule around the z=0 plane

to_frame(suppress_hash=False)

Return the molecules as a pandas data frame

Parameters:

suppress_hash (bool) – Hide the hash in front of the ‘name’ column which is kept for compatibiilty with the Geant4 DNA simulation format

Return type:

DataFrame

Returns:

Pandas data frame with molecule information

to_line_plot(size=(400, 350))

Return a mayavi figure instance with histone and linkers shown

Parameters:

size (Tuple[int, int]) – Figure size (width, height)

Returns:

mayavi figure

Raises:

ImportError – MayaVi likely Not installed

to_plot(plot_p=True, plot_b=True, plot_s=True)

Return a matplotlib.Figure instance with molecules plotted

Parameters:
  • plot_p (bool) – Show Phosphates in plot

  • plot_b (bool) – Show Bases in plot

  • plot_s (bool) – Show sugars in plot

Return type:

Figure

Returns:

Matplotlib Figure

to_strand_plot(plot_p=True, plot_b=True, plot_s=True, plot_bp=False)

Return a mayavi figure instance with strands plotted

:param plot_p : plot phosphate strands :param plot_s : plot sugar strands :param plot_b : plot base strands :param plot_bp : join base pairs together

Returns:

Mayavi Figure

Raises:

ImportError – MayaVi not imported

to_surface_plot()

Plot the surfaces of each molecule in the chain. Avoid this with large chains, this assumes each molecule is an ellipse

Return type:

Figure

Returns:

Matplotlib figure (contour plot)

to_text(seperator=' ')

Return a description of the molecules in the chain as text

Parameters:

seperator (str) – column seperator

Return type:

str