This interface describes the utility functions returned by the
vox.compilers.utils factory function. To access these utility
functions within a translation scheme, it's
recommended that you call vox.compiler#utils with
the ndarray of voxels
,
the lattice, and any options. You'll
then get an instance of this class which you can use:
utils = vox.compiler.utils voxels, lattice, { dlen: 8 }
{ has, tiles } = utils
iterator = (i,j,k, strands) ->
if has i, j, k then tiles.oneway i, j, k, 'X', +1
# etc.
Access properties with .name
and .name = value
.
Object
Convenience reference to vox.dna.utils.strands
Object
Convenience namespace for the following methods:
Object
Convenience namespace for the following properties:
Call methods with.name()
,.name(arguments)
or just .name arguments
.
strands
, [grid]
)
-> undefined
#Merges boundary strands together
vox.dna.Strand[]
ndarray
(Optional; defaults to null
)v1
, v2
, v3
, v4
, dir
)
-> Array
#This function examines the pattern of four adjacent voxels and
generates a U-shaped strand with some combination of domains and
poly-T protectors, according to the logic of Fig. S32.
This function can be used for one-way or symmetric (alternating)
crossover tiles; the dir
parameter controls where the crossover
goes: (^ = 3' end)
^ __
v2 / / v4 v1 / / v3
v1 /__/ v3 v2 / / v4
+1 -1 v
The domains will always be ordered, 5' -> 3': v2, v1, v3, v4
Array
Position of voxel v1
Array
Position of voxel v2
Array
Position of voxel v3
Array
Position of voxel v4
1/-1
Whether the crossover should be on the +z or -z side
Array
Strand object
v1
, v2
, dir
)
-> Array
#This function examines the pattern of two adjacent voxels and
generates a U-shaped strand with some combination of domains and
poly-T protectors, according to the logic of Fig. S32.
This function can be used for one-way or symmetric (alternating)
crossover tiles; the dir
parameter controls where the crossover
goes: (^ = 3' end)
^ __
v1 /__/ v2 v1 / / v2
+1 -1 v
The domains will always be ordered, 5' -> 3': v1, v2
Array
Position of voxel v1
Array
Position of voxel v2
1/-1
Whether the crossover should be on the +z or -z side
Array
Strand object
v1
, v2
, v3
, v4
, dir
)
-> Array
#This function examines the pattern of four adjacent voxels and
generates a Z-shaped strand with some combination of domains and
poly-T protectors, following similar logic to Fig. S32.
The dir
parameter controls overall orientation of the strand with
respect to the Z-axis:
-------------------------> +z
v3 v4 v4 v3
/====> <====\
====/ \====
v2 v1 v1 v2
You must still pass v1, v2, v3, and v4 in the correct order. The domains will always be ordered, 5' -> 3': v2, v1, v3, v4
Array
Position of voxel v1
Array
Position of voxel v2
Array
Position of voxel v3
Array
Position of voxel v4
1/-1
Whether the crossover should be on the +z or -z side
Array
Strand object
pos
, dir
, dlen
)
-> Object[]
#Returns a list of domain bases within the same voxel
Number[]
Position [a, b, c]
Number
Direction: +1 is 5' -> 3', -1 is 3' to 5'
Number
Number of bases to create
Object[]
bases
strands
)
-> ndarray
#Generates a 4D ndarray
that caches the strand(s) at each
position within the lattice. Used for speeding up various post-
processing functions.
vox.dna.Strand[]
ndarray
pos
)
-> Boolean
#Returns true if pos
is on the lattice and a voxel exists there
Number[]
Postion [a, b, c]
Boolean
strand1
, strand2
, strands
, [grid]
)
-> vox.dna.Strand
#Ligates strand1
to strand2
, updating the strands
array
and grid
cache
vox.dna.Strand
vox.dna.Strand
Array
ndarray
(Optional; defaults to null
)vox.dna.Strand
Merged strand
domains
, options
)
-> vox.dna.Strand
#makes a strand from a list of domains
Array[]
List of lists of bases
Object
Hash of options to apply to the strand
vox.dna.Strand
strand
strand
, [grid]
)
-> vox.dna.Strand/null
#Determines if there is a strand whose 5' end is adjacent to
strand
's 3' end, and if so, returns it.
vox.dna.Strand
Strand to search for neighbor
ndarray
Grid of strands generated by post#grid
(Optional; defaults tonull
)vox.dna.Strand/null
5' neighbor strand
strand
, [grid]
)
-> vox.dna.Strand/null
#Determines if there is a strand whose 3' end is adjacent to
strand
's 5' end, and if so, returns it.
vox.dna.Strand
Strand to search for neighbor
ndarray
Grid of strands generated by post#grid
(Optional; defaults tonull
)vox.dna.Strand/null
5' neighbor strand
pos
, dir
, dlen
)
-> Object[]
#Returns a list of poly-T bases within the same voxel
Number[]
Position [a, b, c]
Number
Direction: +1 is 5' -> 3', -1 is 3' to 5'
Number
Number of bases to create
Object[]
bases
i
, j
, k
)
-> Array[]
#Resolves a position according to the crystal map
Number
Number
Number
Array[]
[i', j', k']
ndarray
vox.dna.Strand
Number
Index of the base within the strand routing
i
, j
, k
, plane
, align
, zAlign
)
-> vox.dna.Strand
#Generates a U-shaped tile at the position i,j,k
in the lattice. Note that
i,j,k
refers to the the v1
position, as in:
v1 v2
/======== 5'
\========> 3'
v3 v4
Here are examples that demonstrate the meaning of the plane
,
align
, and zAlign
arguments:
^
^ /
y / / / /
|_x * /_/ |/ *
z/ 'X', +1, +1 'Y', +1, +1
^ / ^
y / / * / /
|_x /_/ * |/
z/ 'X', -1, +1 'Y', -1, +1
__ * /|
y * / / / /
|_x / / /
z/ v v
'X', +1, -1 'Y', +1, -1
__ /|
y / / * / / *
|_x / / v /
z/ v
'X', - 1, -1 'Y', -1, -1
* = [i, j, k] ^ / v = 3' end
Number
Number
Number
"X"/"Y"
Plane of the strand ("X"
for XZ or "Y"
for YZ)
1/-1
Direction of the crossover with respect to the plane axis
1/-1
Position of the crossover with respect to the Z axis
vox.dna.Strand
i
, j
, k
, plane
, align
, zAlign
)
-> vox.dna.Strand
#Generates a Z-shaped tile tile at the position i,j,k
in the lattice. Note that
i,j,k
refers to the the v1
position, as in:
v3 v4
/=======>
========/
v2 v1
Number
Number
Number
"X"/"Y"
Plane of the strand ("X"
for XZ or "Y"
for YZ)
1/-1
Direction of the crossover with respect to the plane axis
1/-1
Position of the crossover with respect to the Z axis
vox.dna.Strand