| ## EMBOSS: btwisted

# Program btwisted

## Function

Calculates the twisting in a B-DNA sequence

## Description

btwisted takes a region of a pure DNA sequence and calculates by simple arithmetic the probable overall twist of the sequence and the stacking energy.

## Usage

Here is a sample session with btwisted:

    % btwisted embl:ab000095 -sbegin 100 -send 120
    Calculates the twisting in a B-DNA sequence
    Output file [ab000095.btwisted]:

## Command line arguments

       Mandatory qualifiers:
      [-sequence]          sequence   Sequence USA
      [-outfile]           outfile    Output file name

       Optional qualifiers: (none)
       Advanced qualifiers:
       -angledata          string     File containing base pair twist angles
       -energydata         string     File containing base pair stacking energies

       General qualifiers:
      -help                bool       report command line options. More
                                      information on associated and general
                                      qualifiers can be found with -help -verbose

Mandatory qualifiers | Allowed values | Default
--- | --- | ---
[-sequence] (Parameter 1) | Sequence USA | Readable sequence | Required
[-outfile] (Parameter 2) | Output file name | Output file | <sequence>.btwisted
Optional qualifiers | Allowed values | Default
(none)
Advanced qualifiers | Allowed values | Default
-angledata | File containing base pair twist angles | Any string is accepted | Eangles.dat
-energydata | File containing base pair stacking energies | Any string is accepted | Eenergy.dat

## Input file format

Nucleic acid sequence USA.

## Output file format

This is the output from the example usage above:

    # Output from BTWISTED
    # Twisting calculated from 100 to 120 of AB000095
    Total twist (degrees): 646.6
    Total turns : 1.80
    Average bases per turn: 11.69
    Total stacking energy : -172.77
    Average stacking energy per dinucleotide: -8.64

## Data files

The program reads in two data files.

The first is prompted for by:

"File containing base pair twist angles"

This is the data file 'Eangles.dat' by default.

This consists of the data:

    aa      35.6    0.1
    ac      34.4    1.3
    ag      27.7    1.5
    at      31.5    1.1
    ca      34.5    0.9
    cc      33.7    0.1
    cg      29.8    1.1
    ct      27.7    1.5
    ga      36.9    0.9
    gc      40.0    1.2
    gg      33.7    0.1
    gt      34.4    1.3
    ta      36.0    1.0
    tc      36.9    0.9
    tg      34.5    0.9
    tt      35.6    0.1

The second is prompted for by:

"File containing base pair stacking energies"
This is the data file 'Eenergy.dat' by default.

This consists of the data:

    #base pair stacking energy for B-DNA
    aa      -5.37
    ac      -10.51
    ag      -6.78
    at      -6.57
    ca      -6.57
    cc      -8.26
    cg      -9.69
    ct      -6.78
    ga      -9.81
    gc      -14.59
    gg      -8.26
    gt      -10.51
    ta      -3.82
    tc      -9.81
    tg      -6.57
    tt      -5.37

No check is made that all dinucleotides have been read for the energy and twist. Attempting to run btwisted with an incomplete data file will result a fatal error if the sequence contains a dinucleotide not in the data files.

EMBOSS data files are distributed with the application and stored in the standard EMBOSS data directory, which is defined by the EMBOSS environment variable EMBOSS_DATA.

To see the available EMBOSS data files, run:

    % embossdata -showall

To fetch one of the data files (for example 'Exxx.dat') into your current directory for you to inspect or modify, run:

    % embossdata -fetch -file Exxx.dat

Users can provide their own data files in their own directories. Project specific files can be put in the current directory, or for tidier directory listings in a subdirectory called ".embossdata". Files for all EMBOSS runs can be put in the user's home directory, or again in a subdirectory called ".embossdata".

The directories are searched in the following order:

- . (your current directory)
- .embossdata (under your current directory)
- ~/ (your home directory)
- ~/.embossdata

## Notes

None.

## References

None.

## Warnings

No check is made that all dinucleotides have been read for the energy and twist. Attempting to run btwisted with an incomplete data file will result a fatal error if the sequence contains a dinucleotide not in the data files.

## Diagnostic Error Messages

"Incomplete table"
You have supplied data files for either the angles or energies that do not contain the fulll required set of possible dinucleotides.

## Exit status

It always exits with status 0.

## Known bugs

No check is made that all dinucleotides have been read for the energy and twist. Attempting to run btwisted with an incomplete data file will result a fatal error if the sequence contains a dinucleotide not in the data files.

## See also

Program name | Description
--- | ---
banana | Bending and curvature plot in B-DNA
chaos | Create a chaos game representation plot for a sequence
compseq | Counts the composition of dimer/trimer/etc words in a sequence
dan | Calculates DNA RNA/DNA melting temperature
freak | Residue/base frequency table or plot
isochore | Plots isochores in large DNA sequences
wordcount | Counts words of a specified size in a DNA sequence

## Author(s)

This application was written by David Martin (dmartin@hgmp.mrc.ac.uk) and Alan Bleasby (ableasby@hgmp.mrc.ac.uk) during the first Scandinavian EMBOSS Workshop.

## History

Written (Sept 2000) - David Martin & Alan Bleasby.

## Target users

This program is intended to be used by everyone and everything, from naive users to embedded scripts.

## Comments