_REQ_ is a command line program written in [Java](https://docs.oracle.com/javase/8/docs/technotes/guides/language/index.html) that allows estimating the rate of elementary quartets (REQ) for each internal branch of a phylogenetic tree from a distance matrix, as described by [Guénoche and Garreta (2001)](https://doi.org/10.1007/3-540-45727-5_5).
[_REQ_](https://research.pasteur.fr/fr/tool/r%CE%B5q-assessing-branch-supports-o%C6%92-a-distance-based-phylogenetic-tree-with-the-rate-o%C6%92-elementary-quartets/) is a command line program written in [Java](https://docs.oracle.com/javase/8/docs/technotes/guides/language/index.html) that estimates the rate of elementary quartets (REQ) for each internal branch of an unrooted binary phylogenetic tree from a distance matrix, as described by [Guénoche and Garreta (2001)](https://doi.org/10.1007/3-540-45727-5_5).
## Compilation and execution
## Compilation and execution
The source code of _REQ_ is inside the _src_ directory and could be compiled and executed in two different ways.
The source code of _REQ_ is inside the _src_ directory and can be compiled and executed in two different ways.
#### Building an executable jar file
#### Building an executable jar file
On computers with [Oracle JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html)(6 or higher) installed, a Java executable jar file could be created. In a command-line window, go to the _src_ directory and type:
On computers with [Oracle JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html)(6 or higher) installed, a Java executable jar file can be created.
In a command-line window, go to the _src_ directory and type:
```bash
```bash
javac REQ.java
javac REQ.java
echo Main-Class: REQ > MANIFEST.MF
echo Main-Class: REQ > MANIFEST.MF
jar -cmvf MANIFEST.MF REQ.jar REQ.class
jar -cmvf MANIFEST.MF REQ.jar REQ.class
rm MANIFEST.MF REQ.class
rm MANIFEST.MF REQ.class
```
```
This will create the executable jar file `REQ.jar` that could be launched with the following command line model:
This will create the executable jar file `REQ.jar` that can be run with the following command line model:
```bash
```bash
java -jar REQ.jar [files]
java -jar REQ.jar [files]
```
```
#### Building a native executable
#### Building a native executable
On computers with [GraalVM](hhttps://www.graalvm.org/downloads/) installed, a native executable could also be built. In a command-line window, go to the _src_ directory, and type:
On computers with [GraalVM](hhttps://www.graalvm.org/downloads/) installed, a native executable can also be built.
In a command-line window, go to the _src_ directory, and type:
```bash
```bash
javac REQ.java
javac REQ.java
native-image REQ REQ
native-image REQ REQ
rm REQ.class
rm REQ.class
```
```
This will create the native executable `REQ` that could be launched with the following command line model:
This will create the native executable `REQ` that can be launched with the following command line model:
```bash
```bash
./REQ [files]
./REQ [files]
```
```
## Usage
## Usage
Launch _REQ_ without option to read the following documentation:
Run _REQ_ without option to read the following documentation:
```
```
USAGE: REQ <dfile> <tfile> <outfile> [-v]
USAGE: REQ <dfile> <tfile> <outfile> [-v]
...
@@ -44,7 +46,7 @@ Launch _REQ_ without option to read the following documentation:
...
@@ -44,7 +46,7 @@ Launch _REQ_ without option to read the following documentation:
square format
square format
<tfile> unrooted binary phylogenetic tree file with no confidence
<tfile> unrooted binary phylogenetic tree file with no confidence
value at branches in NEWICK format
value at branches in NEWICK format
<outfile> outfile name
<outfile> output file name
-v verbose mode
-v verbose mode
```
```
...
@@ -58,7 +60,7 @@ The following command line writes into the file _tree.req.t_ the phylogenetic tr
...
@@ -58,7 +60,7 @@ The following command line writes into the file _tree.req.t_ the phylogenetic tr
```bash
```bash
REQ example/matrix.d example/tree.t tree.req.t -v
REQ example/matrix.d example/tree.t tree.req.t -v
```
```
Because the option `-v` is set, the verbose mode will output the tree topology in NEWICK format, the list of leaf names, and, for each internal branch, the leaf quadripartition following by the rate of elementary quartets _Re_:
Because the option `-v` is set, the verbose mode will output the tree topology in NEWICK format, the list of leaf names, and, for each internal branch, the leaf quadripartition followed by the rate of elementary quartets _Re_: