concurrent.framework.samples.dnacurve package

Submodules

concurrent.framework.samples.dnacurve.app module

Sample application demostrating the implementation of a DNA Curve Analysis. The implemnetation has been based on work from Christoph Gohlke (http://www.lfd.uci.edu/~gohlke/)

NOTE: The implementation is not finsihed and not working but demostrates the capabilities!

File: dnacurve.app.py

class concurrent.framework.samples.dnacurve.app.DNACurveNode(compmgr, init=None, cls=<class 'concurrent.framework.samples.dnacurve.app.DNACurveNode'>)[source]

Bases: concurrent.framework.nodes.applicationnode.ApplicationNode

DNA Curve Analysis application

app_init()[source]

Called just before the main entry. Used as the initialization point instead of the ctor

app_main()[source]

Applications main entry

factor

How many workloads does a single task get assigned, in our a workload is considered a row

get_task_system()[source]

Called from the base class when we are connected to a MasterNode and we are able to send computation tasks over

push_tasksystem_failed(result)[source]

We failed to push a ITaskSystem on the computation framework!

push_tasksystem_response(result)[source]

We just added a ITaskSystem on the framwork. Check result for more info

work_finished(result, task_system)[source]

Called when the work has been done, the results is what our ITaskSystem sent back to us. Check resukt for more info

class concurrent.framework.samples.dnacurve.app.DNACurveTask(name, system_id, client_id, **kwargs)[source]

Bases: concurrent.core.async.task.Task

clean_up()[source]

Called once a task has been performed and its results are about to be sent back. This is used to optimize our network and to cleanup the tasks input data

finished(result, error)[source]

Once the task is finished. Called on the MasterNode within the main thread once the node has recovered the result data.

class concurrent.framework.samples.dnacurve.app.DNACurveTaskSystem(sequence, model='trifonov', name='Untitled', curvature_window=10, bend_window=2, curve_window=15, maxlen=510, factor=1)[source]

Bases: concurrent.core.async.api.ITaskSystem

The task system that is executed on the MasterNode and controls what jobs are required to be performed

center()[source]

Center atomic coordinates at origin.

coordinates_post()[source]

Calculate coordinates and normal vectors from sequence and model.

curvature()[source]

Calculate normalized curvature and bend angles.

gather_result(master)[source]

Once the system stated that it has finsihed the MasterNode will request the required results that are to be send to the originator. Returns a tuple like (result, Error)

generate_tasks(master)[source]

From the analysis of the sequential version of the algorithm we conclude that each analysis of each sequence takes on average 0.006 seconds. We will split the workload so that we expect to send as much sequences to each worker so that the worker is busy for 1 second. This makes a total of 166 sequences for each task, the last tasks will vary in seuqences though.

init_system(master)[source]

Initialize the system

is_complete(master)[source]

Ask the system if the computation has finsihed. If not we will go on and generate more tasks. This gets performed every time a tasks finishes.

name[source]
p_coord = (8.91, -5.2, 2.08)
reorient()[source]

Reorient coordinates.

task_finished(master, task, result, error)[source]

Called once a task has been performed

class concurrent.framework.samples.dnacurve.app.Model(model=None, **kwargs)[source]

Bases: object

N-mer DNA-bending model.

Transformation parameters and matrices for all oligonucleotides of certain length.

name : str
Human readable label.
order : int
Order of model, i.e. length of oligonucleotides. Order 2 is a dinucleotide model, order 3 a trinucleotide model etc.
rise : float
Displacement along the Z axis.
twist : dict
Rotation angle in deg about the Z axis for all oligonucleotides.
roll : dict
Rotation angle in deg about the Y axis for all oligonucleotides.
tilt : dict
Rotation angle in deg about the Z axis for all oligonucleotides.
matrices : dict
Homogeneous transformation matrices for all oligonucleotides.
>>> m = Model("AAWedge")
>>> m = Model("Nucleosome")
>>> m = Model(**Model.STRAIGHT)
>>> m = Model(Model.CALLADINE, name="My Model", rise=4.0)
>>> m.name == "My Model" and m.rise == 4.0
True
>>> m = Model(name="Test", rise=3.38,
...           oligo="AA AC AG AT CA GG CG GA GC TA".split(),
...           twist=(34.29, )*10, roll=(0., )*10, tilt=(0., )*10)
>>> m.save("_test.dat")
>>> m.twist == Model("_test.dat").twist
True
AAWEDGE = {'twist': (35.62, 34.4, 27.7, 31.5, 34.5, 33.67, 29.8, 36.9, 40.0, 36.0), 'oligo': 'AA AC AG AT CA GG CG GA GC TA', 'name': 'AA Wedge', 'tilt': (2.4, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), 'rise': 3.38, 'roll': (-8.4, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)}
CALLADINE = {'twist': (35.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0), 'oligo': 'AA AC AG AT CA GG CG GA GC TA', 'name': 'Calladine & Drew', 'tilt': (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), 'rise': 3.38, 'roll': (0.0, 3.3, 3.3, 3.3, 3.3, 3.3, 3.3, 3.3, 3.3, 6.6)}
DESANTIS = {'twist': (35.9, 34.6, 35.6, 35.0, 34.5, 33.0, 33.7, 35.8, 33.3, 34.6), 'oligo': 'AA AC AG AT CA GG CG GA GC TA', 'name': 'Cacchione & De Santis', 'tilt': (-0.5, -2.7, -1.6, 0.0, 0.4, -0.6, 0.0, -1.7, 0.0, 0.0), 'rise': 3.38, 'roll': (-5.4, -2.4, 1.0, -7.3, 6.7, 1.3, 4.6, 2.0, -3.7, 8.0)}
NUCLEOSOME = {'twist': (34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3), 'oligo': '\n AAA ATA AGA ACA TAA TTA TGA TCA\n GAA GTA GGA GCA CAA CTA CGA CCA\n AAT ATT AGT ACT TAT TTT TGT TCT\n GAT GTT GGT GCT CAT CTT CGT CCT\n AAG ATG AGG ACG TAG TTG TGG TCG\n GAG GTG GGG GCG CAG CTG CGG CCG\n AAC ATC AGC ACC TAC TTC TGC TCC\n GAC GTC GGC GCC CAC CTC CGC CCC', 'name': 'Nucleosome Positioning', 'tilt': (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), 'rise': 3.38, 'roll': (0.0, 2.8, 3.3, 5.2, 2.0, 2.0, 5.4, 5.4, 3.0, 3.7, 3.8, 5.4, 3.3, 2.2, 8.3, 5.4, 0.7, 0.7, 5.8, 5.8, 2.8, 0.0, 5.2, 3.3, 5.3, 3.7, 5.4, 7.5, 6.7, 5.2, 5.4, 5.4, 5.2, 6.7, 5.4, 5.4, 2.2, 3.3, 5.4, 8.3, 5.4, 6.5, 6.0, 7.5, 4.2, 4.2, 4.7, 4.7, 3.7, 5.3, 7.5, 5.4, 3.7, 3.0, 6.0, 3.8, 5.4, 5.4, 10.0, 10.0, 6.5, 5.4, 7.5, 6.0)}
REVERSED = {'twist': (35.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0), 'oligo': 'AA AC AG AT CA GG CG GA GC TA', 'name': 'Reversed Calladine & Drew', 'tilt': (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), 'rise': 3.38, 'roll': (3.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -3.3)}
STRAIGHT = {'twist': (34.285714285714285, 34.285714285714285, 34.285714285714285, 34.285714285714285, 34.285714285714285, 34.285714285714285, 34.285714285714285, 34.285714285714285, 34.285714285714285, 34.285714285714285), 'oligo': 'AA AC AG AT CA GG CG GA GC TA', 'name': 'Straight', 'tilt': (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), 'rise': 3.38, 'roll': (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)}
TRIFONOV = {'twist': (35.62, 34.4, 27.7, 31.5, 34.5, 33.67, 29.8, 36.9, 40.0, 36.0), 'oligo': 'AA AC AG AT CA GG CG GA GC TA', 'name': 'Bolshoi & Trifonov', 'tilt': (3.2, -0.7, -0.3, 0.0, 3.1, -1.8, 0.0, -4.6, 0.0, 0.0), 'rise': 3.38, 'roll': (-6.5, -0.9, 8.4, 2.6, 1.6, 1.2, 6.7, -2.7, -5.0, 0.9)}
save(path)[source]

Save model to file.

class concurrent.framework.samples.dnacurve.app.Sequence(arg, name='Untitled', comment='', maxlen=1048576)[source]

Bases: object

DNA nucleotide sequence.

name : str
Human readable label.
comment : str
Single line description of sequence.
string : str
Sequence string containing only ATCG.

FASTA files must contain >name<space>comment<newline>sequence. SEQ files must contain name<newline>comment<newline>sequence. Nucleotides other than ATCG are ignored.

>>> Sequence("0AxT-C:G a`t~c&g      ")[:]
'ATCGATCG'
>>> seq = Sequence("ATGCAAATTG"*3, name="Test")
>>> seq == "ATGCAAATTG"*3
True
>>> seq == None
False
>>> seq.save("_test.seq")
>>> seq == Sequence("_test.seq")
True
KINETOPLAST = '\n GATCTAGACT AGACGCTATC GATAAAGTTT AAACAGTACA ACTATCGTGC TACTCACCTG\n TTGCCAAACA TTGCAAAAAT GCAAAATTGG GCTTGTGGAC GCGGAGAGAA TTCCCAAAAA\n TGTCAAAAAA TAGGCAAAAA ATGCCAAAAA TCCCAAACTT TTTAGGTCCC TCAGGTAGGG\n GCGTTCTCCG AAAACCGAAA AATGCATGCA GAAACCCCGT TCAAAAATCG GCCAAAATCG\n CCATTTTTTC AATTTTCGTG TGAAACTAGG GGTTGGTGTA AAATAGGGGT GGGGCTCCCC\n GGGGTAATTC TGGAAATTCG GGCCCTCAGG CTAGACCGGT CAAAATTAGG CCTCCTGACC\n CGTATATTTT TGGATTTCTA AATTTTGTGG CTTTAGATGT GGGAGATTTG GATC'
OUT_OF_PHASE_AAAAAA = 'CGCGCGCAAAAAACG'
PHASED_AAAAAA = 'CGAAAAAACG'
PHASED_GGGCCC = 'GAGGGCCCTA'
format(block=10, line=6)[source]

Return string of sequence formatted in blocks and lines.

save(path)[source]

Save sequence to file.

string[source]

Return sequence as string.

concurrent.framework.samples.dnacurve.app.chunks(sequence, size=10)[source]

Return sequence in chunks of size.

>>> chunks('ATCG'*4, 10)
['ATCGATCGAT', 'CGATCG']
concurrent.framework.samples.dnacurve.app.complementary(sequence)[source]

Return complementary sequence.

>>> complementary('AT CG')
'CGAT'
concurrent.framework.samples.dnacurve.app.dinuc_window(sequence, size)[source]

Return window of nucleotides around each dinucleotide in sequence.

Return None if window overlaps border.

>>> list(dinuc_window('ATCG', 2))
['AT', 'TC', 'CG']
>>> list(dinuc_window('ATCG', 3))
['ATC', 'TCG', None]
>>> list(dinuc_window('ATCG', 4))
[None, 'ATCG', None]
concurrent.framework.samples.dnacurve.app.dinucleotide_matrix(rise, twist, roll, tilt)[source]

Return transformation matrix to move from one nucleotide to next.

concurrent.framework.samples.dnacurve.app.norm(vector)[source]

Return length of vector, i.e. its euclidean norm.

concurrent.framework.samples.dnacurve.app.oligonucleotides(length, nucleotides='AGCT')[source]

Generate all oligonucleotide sequences of length.

>>> " ".join(oligonucleotides(2))
'AA AG AC AT GA GG GC GT CA CG CC CT TA TG TC TT'
concurrent.framework.samples.dnacurve.app.overlapping_chunks(sequence, size, overlap)[source]

Return iterator over overlapping chunks of sequence.

>>> list(overlapping_chunks('ATCG'*4, 4, 2))
[(0, 'ATCGATCG'), (4, 'ATCGATCG'), (8, 'ATCGATCG')]
concurrent.framework.samples.dnacurve.app.superimpose_matrix(v0, v1)[source]

Return matrix to transform given vector set to second vector set.

concurrent.framework.samples.dnacurve.app.unique_oligos(length, nucleotides='AGCT')[source]

Generate all unique oligonucleotide sequences of length.

>>> " ".join(unique_oligos(2))
'AA AG AC AT GA GG GC CA CG TA'

concurrent.framework.samples.dnacurve.dnacurve module

DNA Curvature Analysis.

Calculate the global 3D structure of a B-DNA molecule from its nucleotide sequence according to the dinucleotide wedge model. Analyze local bending angles and macroscopic curvature at each nucleotide.

For command line usage run python dnacurve.py --help

Author:Christoph Gohlke
Version:2013.11.21

Revisions

2013.11.21
Overlapping chunks iterator.
2013.11.17
Limit maximum sequence length to 510 nucleotides. Read simple Fasta sequence files. Save positive coordinates to PDB files. Fix sequence display for matplotlib 1.3.

Notes

The API is not stable yet and is expected to change between revisions.

The algorithms, plots, and PDB format are not meant to be used with very long sequences. By default sequences are truncated to 510 nucleotides, which can be overridden by the user.

To render PDB files as ribbons in PyMOL enable the Ribbon->Trace Atoms setting.

References

  1. Bending and curvature calculations in B-DNA. Goodsell DS, Dickerson RE. Nucleic Acids Res 22, 5497-503, 1994. See also http://mgl.scripps.edu/people/goodsell/research/bend/
  2. Curved DNA without A-A: experimental estimation of all 16 DNA wedge angles. Bolshoy A et al. Proc Natl Acad Sci USA 88, 2312-6, 1991.
  3. A comparison of six DNA bending models. Tan RK and Harvey SC. J Biomol Struct Dyn 5, 497-512, 1987.
  4. Curved DNA: design, synthesis, and circularization. Ulanovsky L et al. Proc Natl Acad Sci USA 83, 862-6, 1986.
  5. The ten helical twist angles of B-DNA. Kabsch W, Sander C, and Trifonov EN. Nucleic Acids Res 10, 1097-1104, 1982.

Examples

>>> from dnacurve import CurvedDNA
>>> result = CurvedDNA("ATGCAAATTG"*5, "trifonov", name="Example")
>>> result.curvature[:, 18:22]
array([[ 0.58061616,  0.58163338,  0.58277938,  0.583783  ],
       [ 0.08029914,  0.11292516,  0.07675816,  0.03166286],
       [ 0.57923902,  0.57580064,  0.57367815,  0.57349872]])
>>> result.save_csv("_test.csv")
>>> result.save_pdb("_test.pdb")
>>> result.plot("_test.png", dpi=160)
class concurrent.framework.samples.dnacurve.dnacurve.CurvedDNA(sequence, model='trifonov', name='Untitled', curvature_window=10, bend_window=2, curve_window=15, maxlen=510)[source]

Bases: object

Calculate, plot or save helix coordinates, local bending and curvature.

model : Model
The curvature model.
sequence : Sequence
The DNA sequence to analyze.
coordinates : 3D ndarray
Homogeneous coordinates at each nucleotide of: Index 0) helix axis, Index 1) phosphate of 5’-3’ strand, Index 2) phosphate of antiparallel strand, Index 3) basepair normal vector, Index 4) smoothed basepair normal vector.
curvature : 2D ndarray
Values at each nucleotide, normalized relative to curvature in nucleosome: Index 0) curvature, Index 1) local bend angle, Index 2) curvature angle.
windows : sequence of int
Window sizes for calculating curvature, local bend angle, and curvature angle.
scales : 2D ndarray
Scaling factors used to normalize curvature array.

Atomic coordinates are centered at origin and oriented such that: (1) helix-axis endpoints lie on x-axis and (2) maximum deviation of DNA- from x-axis is along the z-axis. Coordinates in PDB files are shifted to the positive domain.

The curvature at nucleotide N is one over the radius of a circle passing through helix axis coordinates N-window, N, and N+window, which are separated by one respectively two helix turns. The three points define a triangle. The radius is the product of the length of the triangle sides divided by four times the area of the triangle. A window size of 10 is optimal for B-DNA.

The local bend angle at nucleotide N is the angle between the normal vectors of base pairs N-window and N+window. The window size should be one or two.

The curvature angle at nucleotide N is the angle between the smoothed normal vectors of basepair N-window and N+window. The window size should be in the order of 15.

The curvature and bend values are normalized relative to the DNA curvature in a nucleosome (0.0234).

See module examples.

name[source]
p_coord = (8.91, -5.2, 2.08)
plot(arg=True, dpi=96)[source]

Plot results using matplotlib.pyplot.

arg : bool or str
False: don’t plot. True: interactive plot. String: path name to save figure.
dpi : int
Resolution of plot in dots per inch.
save_csv(path)[source]

Save coordinates and curvature values to CSV file.

save_pdb(path)[source]

Save atomic coordinates to PDB file.

class concurrent.framework.samples.dnacurve.dnacurve.Model(model=None, **kwargs)[source]

Bases: object

N-mer DNA-bending model.

Transformation parameters and matrices for all oligonucleotides of certain length.

name : str
Human readable label.
order : int
Order of model, i.e. length of oligonucleotides. Order 2 is a dinucleotide model, order 3 a trinucleotide model etc.
rise : float
Displacement along the Z axis.
twist : dict
Rotation angle in deg about the Z axis for all oligonucleotides.
roll : dict
Rotation angle in deg about the Y axis for all oligonucleotides.
tilt : dict
Rotation angle in deg about the Z axis for all oligonucleotides.
matrices : dict
Homogeneous transformation matrices for all oligonucleotides.
>>> m = Model("AAWedge")
>>> m = Model("Nucleosome")
>>> m = Model(**Model.STRAIGHT)
>>> m = Model(Model.CALLADINE, name="My Model", rise=4.0)
>>> m.name == "My Model" and m.rise == 4.0
True
>>> m = Model(name="Test", rise=3.38,
...           oligo="AA AC AG AT CA GG CG GA GC TA".split(),
...           twist=(34.29, )*10, roll=(0., )*10, tilt=(0., )*10)
>>> m.save("_test.dat")
>>> m.twist == Model("_test.dat").twist
True
AAWEDGE = {'twist': (35.62, 34.4, 27.7, 31.5, 34.5, 33.67, 29.8, 36.9, 40.0, 36.0), 'oligo': 'AA AC AG AT CA GG CG GA GC TA', 'name': 'AA Wedge', 'tilt': (2.4, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), 'rise': 3.38, 'roll': (-8.4, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)}
CALLADINE = {'twist': (35.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0), 'oligo': 'AA AC AG AT CA GG CG GA GC TA', 'name': 'Calladine & Drew', 'tilt': (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), 'rise': 3.38, 'roll': (0.0, 3.3, 3.3, 3.3, 3.3, 3.3, 3.3, 3.3, 3.3, 6.6)}
DESANTIS = {'twist': (35.9, 34.6, 35.6, 35.0, 34.5, 33.0, 33.7, 35.8, 33.3, 34.6), 'oligo': 'AA AC AG AT CA GG CG GA GC TA', 'name': 'Cacchione & De Santis', 'tilt': (-0.5, -2.7, -1.6, 0.0, 0.4, -0.6, 0.0, -1.7, 0.0, 0.0), 'rise': 3.38, 'roll': (-5.4, -2.4, 1.0, -7.3, 6.7, 1.3, 4.6, 2.0, -3.7, 8.0)}
NUCLEOSOME = {'twist': (34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3, 34.3), 'oligo': '\n AAA ATA AGA ACA TAA TTA TGA TCA\n GAA GTA GGA GCA CAA CTA CGA CCA\n AAT ATT AGT ACT TAT TTT TGT TCT\n GAT GTT GGT GCT CAT CTT CGT CCT\n AAG ATG AGG ACG TAG TTG TGG TCG\n GAG GTG GGG GCG CAG CTG CGG CCG\n AAC ATC AGC ACC TAC TTC TGC TCC\n GAC GTC GGC GCC CAC CTC CGC CCC', 'name': 'Nucleosome Positioning', 'tilt': (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), 'rise': 3.38, 'roll': (0.0, 2.8, 3.3, 5.2, 2.0, 2.0, 5.4, 5.4, 3.0, 3.7, 3.8, 5.4, 3.3, 2.2, 8.3, 5.4, 0.7, 0.7, 5.8, 5.8, 2.8, 0.0, 5.2, 3.3, 5.3, 3.7, 5.4, 7.5, 6.7, 5.2, 5.4, 5.4, 5.2, 6.7, 5.4, 5.4, 2.2, 3.3, 5.4, 8.3, 5.4, 6.5, 6.0, 7.5, 4.2, 4.2, 4.7, 4.7, 3.7, 5.3, 7.5, 5.4, 3.7, 3.0, 6.0, 3.8, 5.4, 5.4, 10.0, 10.0, 6.5, 5.4, 7.5, 6.0)}
REVERSED = {'twist': (35.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0), 'oligo': 'AA AC AG AT CA GG CG GA GC TA', 'name': 'Reversed Calladine & Drew', 'tilt': (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), 'rise': 3.38, 'roll': (3.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -3.3)}
STRAIGHT = {'twist': (34.285714285714285, 34.285714285714285, 34.285714285714285, 34.285714285714285, 34.285714285714285, 34.285714285714285, 34.285714285714285, 34.285714285714285, 34.285714285714285, 34.285714285714285), 'oligo': 'AA AC AG AT CA GG CG GA GC TA', 'name': 'Straight', 'tilt': (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), 'rise': 3.38, 'roll': (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)}
TRIFONOV = {'twist': (35.62, 34.4, 27.7, 31.5, 34.5, 33.67, 29.8, 36.9, 40.0, 36.0), 'oligo': 'AA AC AG AT CA GG CG GA GC TA', 'name': 'Bolshoi & Trifonov', 'tilt': (3.2, -0.7, -0.3, 0.0, 3.1, -1.8, 0.0, -4.6, 0.0, 0.0), 'rise': 3.38, 'roll': (-6.5, -0.9, 8.4, 2.6, 1.6, 1.2, 6.7, -2.7, -5.0, 0.9)}
save(path)[source]

Save model to file.

class concurrent.framework.samples.dnacurve.dnacurve.Sequence(arg, name='Untitled', comment='', maxlen=1048576)[source]

Bases: object

DNA nucleotide sequence.

name : str
Human readable label.
comment : str
Single line description of sequence.
string : str
Sequence string containing only ATCG.

FASTA files must contain >name<space>comment<newline>sequence. SEQ files must contain name<newline>comment<newline>sequence. Nucleotides other than ATCG are ignored.

>>> Sequence("0AxT-C:G a`t~c&g      ")[:]
'ATCGATCG'
>>> seq = Sequence("ATGCAAATTG"*3, name="Test")
>>> seq == "ATGCAAATTG"*3
True
>>> seq == None
False
>>> seq.save("_test.seq")
>>> seq == Sequence("_test.seq")
True
KINETOPLAST = '\n GATCTAGACT AGACGCTATC GATAAAGTTT AAACAGTACA ACTATCGTGC TACTCACCTG\n TTGCCAAACA TTGCAAAAAT GCAAAATTGG GCTTGTGGAC GCGGAGAGAA TTCCCAAAAA\n TGTCAAAAAA TAGGCAAAAA ATGCCAAAAA TCCCAAACTT TTTAGGTCCC TCAGGTAGGG\n GCGTTCTCCG AAAACCGAAA AATGCATGCA GAAACCCCGT TCAAAAATCG GCCAAAATCG\n CCATTTTTTC AATTTTCGTG TGAAACTAGG GGTTGGTGTA AAATAGGGGT GGGGCTCCCC\n GGGGTAATTC TGGAAATTCG GGCCCTCAGG CTAGACCGGT CAAAATTAGG CCTCCTGACC\n CGTATATTTT TGGATTTCTA AATTTTGTGG CTTTAGATGT GGGAGATTTG GATC'
OUT_OF_PHASE_AAAAAA = 'CGCGCGCAAAAAACG'
PHASED_AAAAAA = 'CGAAAAAACG'
PHASED_GGGCCC = 'GAGGGCCCTA'
format(block=10, line=6)[source]

Return string of sequence formatted in blocks and lines.

save(path)[source]

Save sequence to file.

string[source]

Return sequence as string.

concurrent.framework.samples.dnacurve.dnacurve_test module

concurrent.framework.samples.dnacurve.setup module

Sample application using Concurrent to perform a DNA curve analysis

Module contents