SkillAgentSearch skills...

TRF

Tandem Repeats Finder: a program to analyze DNA sequences

Install / Use

/learn @Benson-Genomics-Lab/TRF
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

TRF

Tandem Repeats Finder: https://tandem.bu.edu/trf/trf.html
Tandem Repeats Database: http://tandem.bu.edu/cgi-bin/trdb/trdb.exe

Table of Contents

Purpose

A tandem repeat in DNA is two or more adjacent, approximate copies of a pattern of nucleotides. Tandem Repeats Finder is a program to locate and display tandem repeats in DNA sequences. In order to use the program, the user submits a sequence in FASTA format. There is no need to specify the pattern, the size of the pattern or any other parameter. The output consists of two files: a repeat table file and an alignment file. The repeat table, viewable in a web browser, contains information about each repeat, including its location, size, number of copies and nucleotide content. Clicking on the location indices for one of the table entries opens a second browser page that shows an alignment of the copies against a consensus pattern. The program is very fast, analyzing sequences on the order of .5Mb in just a few seconds. Submitted sequences may be of arbitrary length. Repeats with pattern size in the range from 1 to 2000 bases are detected.

This material is based upon work supported by the National Science Foundation under Grant No. CCR-9623532

Reference

Benson G. Tandem repeats finder: a program to analyze DNA sequences. Nucleic Acids Res. 1999; 27(2):573–580. doi:10.1093/nar/27.2.573

Authors

Gary Benson
Yozen Hernandez
Yevgeniy Gelfand
Alfredo Rodriguez

License

Tandem Repeats Finder Copyright (C) 1999-2020 Gary Benson

TRF is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

TRF is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with TRF. If not, see https://www.gnu.org/licenses/.

Pre-compiled Versions

To obtain current and/or earlier, pre-compiled versions of TRF:

  • locate and click on the releases link just above the green clone button near the top of this page
  • check in each of the listed releases for executable files

Instructions for Compiling

To compile TRF, you will need a C compiler (e.g., gcc, clang) with the standard library installed. We have tested compiling and installing TRF under UNIX-based systems (Linux, macOS) and for Windows under Cygwin/MinGW.

Brief instructions (advanced):

# Check actual version
tar xzvf trf-4.10.0.tar.gz
cd trf-4.10.0
mkdir build
cd build
../configure
make
# To install to system
sudo make install
# To copy binary elsewhere
cp src/trf DESTINATION

If you are cloning the repository, replace the first two lines above with:

git clone https://github.com/Benson-Genomics-Lab/TRF.git
cd TRF

Step by step:

  • Open a terminal window and change directory to the TRF directory created by a clone of this repository.
  • Create a directory named 'build': mkdir build and change directory to that
  • Type ../configure in the terminal.
  • Type make in the terminal.
  • If you wish to install the binary, type sudo make install in the terminal. Otherwise, simply copy the binary from the src directory under build.

This will:

  • compile the code
  • place the executable version in the build/src directory.

The file will be called trf (trf.exe on Windows). For backwards compatibility with automated scripts exepcting TRF to follow a certain naming scheme, the installation will also create a symbolic link named trf<version>.<operating system>.exe. For example the file on a linux 64 bit operating system for version 4.10.0 will be called trf4.10.0.linux64.exe.

Testing the Installation

Run the executable on the included test file test_seqs.fasta. (This assumes the executable has been named TRF.):

trf test_seqs.fasta 2 5 7 80 10 50 2000 -l 10

This should produce 9 files:

test_seqs.fasta.2.5.7.80.10.50.2000.summary.html
test_seqs.fasta.s1.2.5.7.80.10.50.2000.1.html
test_seqs.fasta.s1.2.5.7.80.10.50.2000.1.txt.html
test_seqs.fasta.s2.2.5.7.80.10.50.2000.1.html
test_seqs.fasta.s2.2.5.7.80.10.50.2000.1.txt.html
test_seqs.fasta.s3.2.5.7.80.10.50.2000.1.html
test_seqs.fasta.s3.2.5.7.80.10.50.2000.1.txt.html
test_seqs.fasta.s4.2.5.7.80.10.50.2000.1.html
test_seqs.fasta.s4.2.5.7.80.10.50.2000.1.txt.html

Open the summary file in a browser. It will point to the four .html files (without the .txt). Each of those files contains a table describing one TR. Below are the tables as they should appear. It is only necessary to confirm that the files have been created and the tables are present.

test_seqs.fasta.s1.2.5.7.80.10.50.2000.1.html

<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0> <TR><TD WIDTH=140><CENTER>Indices</CENTER></TD><TD WIDTH=80><CENTER>Period<BR>Size </CENTER></TD><TD WIDTH=70><CENTER>Copy<BR>Number</CENTER></TD><TD WIDTH=70><CENTER>Consensus<BR>Size</CENTER></TD><TD WIDTH=70><CENTER>Percent<BR>Matches</CENTER></TD><TD WIDTH=70><CENTER>Percent<BR>Indels</CENTER></TD><TD WIDTH=60><CENTER>Score</CENTER></TD><TD WIDTH=40><CENTER>A</CENTER></TD><TD WIDTH=40><CENTER>C</CENTER></TD><TD WIDTH=40><CENTER>G</CENTER></TD><TD WIDTH=40><CENTER>T</CENTER></TD><TD WIDTH=70><CENTER>Entropy<BR>(0-2)</CENTER></TD></TR> <TR><TD><CENTER>1--35</CENTER></TD><TD><CENTER>7</CENTER></TD><TD><CENTER>5.0</CENTER></TD><TD><CENTER>7</CENTER></TD><TD><CENTER>100</CENTER></TD><TD><CENTER>0</CENTER></TD><TD><CENTER>70</CENTER></TD><TD><CENTER>14</CENTER></TD><TD><CENTER>28</CENTER></TD><TD><CENTER>28</CENTER></TD><TD><CENTER>28</CENTER></TD><TD><CENTER>1.95</CENTER></TD></TR> </TABLE>

test_seqs.fasta.s2.2.5.7.80.10.50.2000.1.html

<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0> <TR><TD WIDTH=140><CENTER>Indices</CENTER></TD><TD WIDTH=80><CENTER>Period<BR>Size </CENTER></TD><TD WIDTH=70><CENTER>Copy<BR>Number</CENTER></TD><TD WIDTH=70><CENTER>Consensus<BR>Size</CENTER></TD><TD WIDTH=70><CENTER>Percent<BR>Matches</CENTER></TD><TD WIDTH=70><CENTER>Percent<BR>Indels</CENTER></TD><TD WIDTH=60><CENTER>Score</CENTER></TD><TD WIDTH=40><CENTER>A</CENTER></TD><TD WIDTH=40><CENTER>C</CENTER></TD><TD WIDTH=40><CENTER>G</CENTER></TD><TD WIDTH=40><CENTER>T</CENTER></TD><TD WIDTH=70><CENTER>Entropy<BR>(0-2)</CENTER></TD></TR> <TR><TD><CENTER>1--84</CENTER></TD><TD><CENTER>12</CENTER></TD><TD><CENTER>7.0</CENTER></TD><TD><CENTER>12</CENTER></TD><TD><CENTER>100</CENTER></TD><TD><CENTER>0</CENTER></TD><TD><CENTER>168</CENTER></TD><TD><CENTER>16</CENTER></TD><TD><CENTER>41</CENTER></TD><TD><CENTER>25</CENTER></TD><TD><CENTER>16</CENTER></TD><TD><CENTER>1.89</CENTER></TD></TR> </TABLE>

test_seqs.fasta.s3.2.5.7.80.10.50.2000.1.html

<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0> <TR><TD WIDTH=140><CENTER>Indices</CENTER></TD><TD WIDTH=80><CENTER>Period<BR>Size </CENTER></TD><TD WIDTH=70><CENTER>Copy<BR>Number</CENTER></TD><TD WIDTH=70><CENTER>Consensus<BR>Size</CENTER></TD><TD WIDTH=70><CENTER>Percent<BR>Matches</CENTER></TD><TD WIDTH=70><CENTER>Percent<BR>Indels</CENTER></TD><TD WIDTH=60><CENTER>Score</CENTER></TD><TD WIDTH=40><CENTER>A</CENTER></TD><TD WIDTH=40><CENTER>C</CENTER></TD><TD WIDTH=40><CENTER>G</CENTER></TD><TD WIDTH=40><CENTER>T</CENTER></TD><TD WIDTH=70><CENTER>Entropy<BR>(0-2)</CENTER></TD></TR> <TR><TD><CENTER>1--1225</CENTER></TD><TD><CENTER>35</CENTER></TD><TD><CENTER>35.0</CENTER></TD><TD><CENTER>35</CENTER></TD><TD><CENTER>100</CENTER></TD><TD><CENTER>0</CENTER></TD><TD><CENTER>2450</CENTER></TD><TD><CENTER>28</CENTER></TD><TD><CENTER>22</CENTER></TD><TD><CENTER>20</CENTER></TD><TD><CENTER>28</CENTER></TD><TD><CENTER>1.98</CENTER></TD></TR> </TABLE>

test_seqs.fasta.s4.2.5.7.80.10.50.2000.1.html

<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0> <TR><TD WIDTH=140><CENTER>Indices</CENTER></TD><TD WIDTH=80><CENTER>Period<BR>Size </CENTER></TD><TD WIDTH=70><CENTER>Copy<BR>Number</CENTER></TD><TD WIDTH=70><CENTER>Consensus<BR>Size</CENTER></TD><TD WIDTH=70><CENTER>Percent<BR>Matches</CENTER></TD><TD WIDTH=70><CENTER>Percent<BR>Indels</CENTER></TD><TD WIDTH=60><CENTER>Score</CENTER></TD><TD WIDTH=40><CENTER>A</CENTER></TD><TD WIDTH=40><CENTER>C</CENTER></TD><TD WIDTH=40><CENTER>G</CENTER></TD><TD WIDTH=40><CENTER>T</CENTER></TD><TD WIDTH=70><CENTER>Entropy<BR>(0-2)</CENTER></TD></TR> <TR><TD><CENTER>1--10000000</CENTER></TD><TD><CENTER>125</CENTER></TD><TD><CENTER>80000.0</CENTER></TD><TD><CENTER>125</CENTER></TD><TD><CENTER>100</CENTER></TD><TD><CENTER>0</CENTER></TD><TD><CENTER>20000000</CENTER></TD><TD><CENTER>32</CENTER></TD><TD><CENTER>26</CENTER></TD><TD><CENTER>13</CENTER></TD><TD><CENTER>27</CENTER></TD><TD><CENTER>1.94</CENTER></TD></TR> </TABLE>

Quick Start

The following is a recommended command line to run TRF. Parameters are explained further below. This assumes the executable has been renamed trf.

trf yourfile.fa 2 5 7 80 10 50 2000

Using Command Line Version of Tandem Repeats Finder

Once th

Related Skills

View on GitHub
GitHub Stars203
CategoryDevelopment
Updated1d ago
Forks33

Languages

C

Security Score

95/100

Audited on Mar 30, 2026

No findings