Running from Command Line

REVNANO can also be run from the command line. First, the origami contact map is reconstructed from sequences by the REVNANO solver. Second, the contact map is copied to the contactmap module which creates a geometric guide schematic of the contact map, as an interactive HTML page.

Reconstruct Origami Contact Map

  1. Change to the origami/ directory where you installed REVNANO, and activate the Python 3 virtual environment (if not already active):

    cd origami
    source venv/bin/activate
    
  2. Put the origami sequence input file in the REVNANO/_assets directory. We will use the origami test and the sequence input for this origami is already supplied at REVNANO/_assets/test.rev.

  3. Call REVNANO to reverse engineer the origami contact map. This uses the default algorithm parameters in parameters.py:

    cd REVNANO
    python3 revnano.py test
    

Note

Be patient. This step can take a few minutes to complete for larger origamis.

The REVNANO solver will produce output like this:



-----------------------------------------------------------
REVNANO Constraint Programming Solver v1.1
Origami Staple/Scaffold Sequences ----> Origami Contact Map
-----------------------------------------------------------

Origami to reverse engineer:
test

Algorithm main parameters:
MU_MIN:		6 bp
SIGMA:		4 bp
BETA:		0.30

Deterministic staple placement?:
YES - staples polled in order of ascending staple id

-----------------------------------------------------------

REVNANO STAGE 0 (Build staple routing trees)               

-----------------------------------------------------------

Finding definite 1-route staples... [SIGMA_1ROUTE = 10, MU_MIN = 6]
--> 1-route: staple 0
--> 1-route: staple 2
--> 1-route: staple 3
--> 1-route: staple 4
--> 1-route: staple 5
--> 1-route: staple 8
--> 1-route: staple 14
--> 1-route: staple 15
--> 1-route: staple 16
--> 1-route: staple 19
--> 1-route: staple 21
--> 1-route: staple 22
--> 1-route: staple 28
--> 1-route: staple 29
--> 1-route: staple 30
--> 1-route: staple 36
--> 1-route: staple 37
--> 1-route: staple 38
--> 1-route: staple 40
--> 1-route: staple 41
--> 1-route: staple 47
--> 1-route: staple 55
--> 1-route: staple 59
--> 1-route: staple 64
--> 1-route: staple 65
--> 1-route: staple 66
--> 1-route: staple 70
--> 1-route: staple 71
--> 1-route: staple 75
--> 1-route: staple 77
--> 1-route: staple 78
--> 1-route: staple 80
--> 1-route: staple 81
--> 1-route: staple 85
--> 1-route: staple 87
[Done]

Generating routing trees for other staples... [SIGMA = 4, MU_MIN = 6]
--> Making routing tree for staple 1
--> Making routing tree for staple 6
--> Making routing tree for staple 7
--> Making routing tree for staple 9
--> Making routing tree for staple 10
--> Making routing tree for staple 11
--> Making routing tree for staple 12
--> Making routing tree for staple 13
--> Making routing tree for staple 17
--> Making routing tree for staple 18
--> Making routing tree for staple 20
--> Making routing tree for staple 23
--> Making routing tree for staple 24
--> Making routing tree for staple 25
--> Making routing tree for staple 26
--> Making routing tree for staple 27
--> Making routing tree for staple 31
--> Making routing tree for staple 32
--> Making routing tree for staple 33
--> Making routing tree for staple 34
--> Making routing tree for staple 35
--> Making routing tree for staple 39
--> Making routing tree for staple 42
--> Making routing tree for staple 43
--> Making routing tree for staple 44
--> Making routing tree for staple 45
--> Making routing tree for staple 46
--> Making routing tree for staple 48
--> Making routing tree for staple 49
--> Making routing tree for staple 50
--> Making routing tree for staple 51
--> Making routing tree for staple 52
--> Making routing tree for staple 53
--> Making routing tree for staple 54
--> Making routing tree for staple 56
--> Making routing tree for staple 57
--> Making routing tree for staple 58
--> Making routing tree for staple 60
--> Making routing tree for staple 61
--> Making routing tree for staple 62
--> Making routing tree for staple 63
--> Making routing tree for staple 67
--> Making routing tree for staple 68
--> Making routing tree for staple 69
--> Making routing tree for staple 72
--> Making routing tree for staple 73
--> Making routing tree for staple 74
--> Making routing tree for staple 76
--> Making routing tree for staple 79
--> Making routing tree for staple 82
--> Making routing tree for staple 83
--> Making routing tree for staple 84
--> Making routing tree for staple 86
--> Making routing tree for staple 88
--> Making routing tree for staple 89
[Done]

The 90 staples have status:
- No tree: 	0	
- 1 route: 	90
- >1 routes: 	0
	Average number of routes on >1 route staples: 	0.00
	Maximum number of routes on >1 route staples: 	0

-----------------------------------------------------------

REVNANO STAGE 1 (Place staples by propagating constraints) 

-----------------------------------------------------------

951 bases already claimed by definite 1-route staples

Crystallising staple footprints...
--> Iteration 1
	2623 scaffold bases now claimed (+1672 since prev)
--> Iteration 2
	2623 scaffold bases now claimed (+0 since prev)
[Done]

The 90 staples have status:
- No tree: 	0	
- 0 routes: 	0	
- 1 route: 	90
- >1 routes: 	0
	Average number of routes on >1 route staples: 	0.00
	Maximum number of routes on >1 route staples: 	0


 ** All staples placed on origami ** 

-----------------------------------------------------------

REVNANO STAGE 2 (Place remaining staples by shortest path) 

-----------------------------------------------------------

No staples of >1 route exist to be placed.
(Stage 2 skipped)

-----------------------------------------------------------

REVNANO STAGE 3 (Resolve staple-staple overlaps)           

-----------------------------------------------------------

Resolving staple-staple overlaps...
Iteration 1
	Overlapped bases fixed: 23
Iteration 2
	Overlapped bases fixed: 0
[Done]


 ** All staple-staple overlaps resolved ** 

-----------------------------------------------------------

REVNANO STAGE 4 (Re-compose staples and make contact map)  

-----------------------------------------------------------

Creating origami contact map...
[Done]

Re-composing staples with loopouts and dangles...
[Done]

*********** FINAL SUMMARY ***********
Origami: test
90 of 90 staples placed (100.0%)
2646 of 2646 scaffold bases hybridised

Reverse engineered origami contact map saved to --> _assets/test.csv
*************************************


[REVNANO running time 1.30 seconds]

If REVNANO does not return an error (see the Errors page), an origami contact map will be created at REVNANO/_assets/test.csv.

More than one contact map may be created if single base domains exist on the scaffold strand (check the output messages).

Performance of the REVNANO algorithm is dependent on three important parameters MU_MIN, SIGMA and BETA. When you run the algorithm as above, the default values of these parameters are taken from the parameters.py file. However, you can specify these parameters on the command line using syntax:

python3 revnano.py <origami_name> <MU_MIN> <SIGMA> <BETA>

For example:

python3 revnano.py test 6 0 0.3

Finally, if REVNANO fails with Error 2 (see Errors page), you can sometimes make the algorithm complete by lowering the GAMMA parameter in parameters.py (to e.g. 0.4).

Create Origami Guide Schematic

  1. Change to the REVNANO/_assets directory and move the newly created contact map to the contactmap module:

    cd _assets
    mv test.csv ../../contactmap/_assets/test.csv
    
  2. Then, change to the contactmap module directory :

    cd ../../contactmap
    
  3. Make the guide schematic of the origami from the contact map. The syntax is:

    python3 contact2schematic.py <origami name> <layout dimension of origami> <dimension of space>
    

Note

Be patient. This step can take a few minutes to complete for larger origamis.

For example, this command draws our 2D origami in 2D space:

python3 contact2schematic.py test 2 2

It can also be interesting to draw our 2D origami as a rotatable 2D plane in 3D space:

python3 contact2schematic.py test 2 3

If our origami was 3D, we could display it in 3D space using:

python3 contact2schematic.py test 3 3
  1. When the renderer has finished, open file contactmap/_assets/test.html in a web browser to to see the interactive guide schematic.

  2. See the Guide Schematic Views page, for an explanation of what the different views of the guide schematic mean.