Tracks and manages DNA strands (single-stranded tiles).
Access properties with .nameand .name = value.
C3D.Canvas3DReference to the canvas to which this controller belongs
ndarray5D array mapping positions to strands and base indices; the dimensions are:
[ @canvas.lattice.width,
@canvas.lattice.height,
@canvas.lattice.depth,
@canvas.lattice.maxLength(),
2 ]
where the 4th axis refers to the base-wise position (z2) along the lattice and the 5th axis refers to the direction of the strand (0 = 3' -> 5', and 1 = 5' -> 3').
Each element of this array is itself a 2D array:
[ {C3D.models.SST}, {Number} ]
where the second element is the index of the base at this position.
Backbone.CollectionCache of strand objects
C3D.models.TranslationScheme[]Array of active translation scheme instances in the canvas
Call methods with.name(),.name(arguments)or just .name arguments .
[options])
-> undefined# Backbone.Model Removes all attributes from the model, including the id attribute. Fires a
"change" event unless silent is passed as an option.
Object
(Optional)Backbone.Model# Backbone.Model Returns a copy of the model.
Backbone.Modelcopy of the model
options)
-> undefined#Compiles the voxels in the C3D.ctrls.Voxels controller on this controller's canvas to strands, using the configured translation scheme.
Objectstrand, index)
-> C3D.models.SST[]#Cuts the passed strand into two different strands between the
passed index and index + 1.
C3D.models.SSTStrand to cut
NumberIndex at which to cut; strand will be cut between index and index + 1.
C3D.models.SST[]The two new strands
data)
-> undefined#Loads data from a caDNAno file-like data structure
vox.dna.CaDNAnoContents of a deserialized caDNAno JSON file
undefined#Generates sequences using the configured C3D.models.SequenceSet, or a C3D.models.RandomSequenceSet if none is configured.
attribute)
-> Mixed# Backbone.Model Get the current value of an attribute from the model. For example: note.get("title")
StringAttribute to get
Mixedvalue of the attribute
x, y, z1, z2, [dir])
-> Array/undefined#Gets the strand and base at a given 4-component lattice position
Number
Number
NumberVoxel position
NumberBase position (within voxel)
-1/1Strand direction to search for (+1 for 5' -> 3', -1 for 3' -> 5')
(Optional; defaults to1)Array/undefined2-element array containing the
- C3D.models.SST : strand object
- Number : index of the base within the strand
or undefined if there is no base at this position.
x, y, z1, [dir])
-> Array#Gets the strands and bases at a given 3-component lattice position; this tells you all strands that participate in a given voxel/domain.
Number
Number
NumberVoxel position
-1/1Strand direction to search for (+1 for 5' -> 3', -1 for 3' -> 5')
(Optional; defaults to1)ArrayArray with one element for each base in the domain; that is, the length of this array will be equal to <code>@canvas.lattice.length(x,y,z1)</code>.
Each element of this array is a 2-element array containing the
- C3D.models.SST : strand object
- Number : index of the base within the strand
or undefined if there is no base at this position.
attribute)
-> Boolean# Backbone.Model Returns true if the attribute is set to a non-null or non-undefined value.
if (note.has("title")) {
...
}
String
Booleantrue if the attribute is non-null or non-undefined, else false
x, y, z1, z2, [dir])
-> Boolean#Determines whether there is a base at the given 4-component lattice position
Number
Number
NumberVoxel position
NumberBase position (within voxel)
-1/1Strand direction to search for (+1 for 5' -> 3', -1 for 3' -> 5'); by default searches both directions
(Optional; defaults tonull)Booleantrue if any strand has a base here, else false
x, y, z1, [dir])
-> Boolean#Determines whether there is a base at the given 3-component lattice position; that is, whether any base in a given voxel has a strand
Number
Number
NumberVoxel position
-1/1Strand direction to search for (+1 for 5' -> 3', -1 for 3' -> 5'); by default searches both directions
(Optional; defaults tonull)Booleantrue if any strand has a base here, else false
strand1, strand2)
-> C3D.models.SST#Ligates two strands into one new strand; specifically,
ligates the 3' end of strand1 to the 5' end of strand2.
C3D.models.SST
C3D.models.SST
C3D.models.SSTNew strand
model)
-> C3D.models.SST#Removes the passed strand and returns it
C3D.models.SST
C3D.models.SST
select, transform)
-> undefined#Select strands according to an arbitrary predicate, then transform them using an arbitrary transformation function.
FunctionSelection predicate function
FunctionTransformation function
attribute, [options])
-> undefined# Backbone.Model Set a hash of attributes (one or many) on the model. If any of the attributes
change the model's state, a change event will be triggered on the model.
Change events for specific attributes are also triggered, and you can bind to
those as well, for example: change:title, and change:content. You may also
pass individual keys and values.
note.set({title: "March 20", content: "In his eyes she eclipses..."});
book.set("title", "A Scandal in Bohemia");
String/Object(s)
Object
(Optional)String#Exports strand sequences to comma-separated values (CSV) format
StringCSV text
vox.dna.CaDNAno#Exports strands to the caDNAno JSON format
vox.dna.CaDNAnoObject suitable to be serialized to a caDNAno JSON file
String#Exports the structure to a CanDo table format
StringCanDo table
attribute, [options])
-> undefined# Backbone.Model Remove an attribute by deleting it from the internal attributes hash. Fires a
"change" event unless silent is passed as an option.
String
Object
(Optional)