This is Version 1.1 of Twist-DNA.
-----------------------------------
Twist-DNA allows the computations of base-pair and bubble opening probabilities for any DNA sequences at a given temperature, a given superhelical stress and a given salt concentration.

Please read the user guide and the copyright notice in the file COPYING!

Users of Twist-DNA, please cite:
- D. Jost. Twist-DNA: computing opening base-pair and bubble probabilities in genomic superhelical DNA, Bioinformatics, in submission (2013)
- D. Jost, A. Zubair and R. Everaers. Bubble statistics and positioning in superhelically stressed DNA, Phys. Rev. E 84, 031912 (2011)

We need your feedback! Send your comments, suggestions, and questions to
daniel.jost@ens-lyon.fr

Daniel Jost, Summer 2013

Installation
------------
The main program and subroutines are written in Fortran 90 and need fortran compiler to work. To compile, type 'make' in the command line.
Note that you have to add the name of your favorite fortran compiler in the Makefile (default is gfortran).
The installation has been tested to work on Unix-based operating systems (Linux and Mac OS X) using the free GNU compiler gfortran or the Intel compiler fort.

Running the program
---------------
To run the program, type in the command line
	./TwistDNA < sequence.fasta
with 'sequence.fasta' the FASTA file containing the sequence to study.

Remark on FASTA file: The first line of the file starts with the symbol '>' and contains a description of the file. The subsequent lines describe the DNA sequence and must contain only the standard nucleotide symbols ('A'/'a', 'G'/'g', 'T'/'t', 'C'/'c'), see for example EcoliK12-MG1655.fasta. Note that each line must contain less than 200 characters. If larger, augment the length of the variable 'line' to the corresponding maximal line length in TwistDNAmain.f90 and re-compile ('make') the code.

Inputs and outputs
------------------
The program has several inputs that can be changed in the input file ('input.dat'):
- the temperature T (in Celsius) with a default value: 37 C;
- the superhelical density Sigma with a default value: -0.06;
- the salt concentration CNa (in mole) with a default value: 0.1 M;
- the range of bubble sizes to investigate: from bsizemin to bsizemax every bstep;
- the threshold btw: bubble whose opening probability is higher than btw (in log10-unit) are saved.

After running, the program produces two files in the BED format (bedGraph track) for visualization in your favorite Genome Browser.
- openproba.bed: contains the individual base-pair opening probabilities (in log-10 unit).
-bubblethresh.bed:list of bubbles (start, end and opening probability in log10-unit)  whose opening probabilities are higher than the threshold btw.

Remark 1: by default, the program prints 'chr' as the chromosome name in the BED files. To change to another name, you can modify the corresponding lines in TwistDNAprop.f90 and re-compile ('make') the code.

Remark 2: if you are only interested in the base-pair opening probabilities, assign 0 to bsizemax in the input file, it will saved a significant amount of computing time.

Performance
-----------
The computing time depends on the size of the DNA sequence and on the number of bubble sizes to investigate.
Typically, on a 2.66 GHz Intel Core 2 Duo PC, for the E.coli genome (4.6 Mbp) and 1,000 bubble sizes, the program runs about 1 min to compute the base-pair opening probabilities and then runs about 15 min to estimate the bubble opening probabilities. 

