_C2A_ and _A2C_ are command line programs written in [Java](https://docs.oracle.com/javase/8/docs/technotes/guides/language/index.html) that allow translating and back-translating FASTA-formatted codon and amino-acid sequence files, respectively. These tools were implemented to easily infer multiple sequence alignments at the codon level.
_C2A_ and _A2C_ are command line programs written in [Java](https://docs.oracle.com/javase/8/docs/technotes/guides/language/index.html) to translate and back-translate FASTA-formatted codon and amino-acid sequence files, respectively. These tools were implemented to easily infer multiple sequence alignments at the codon level.
## Compilation and execution
...
...
@@ -8,6 +8,10 @@ The source codes are inside the _src_ directory and could be compiled and execut
#### Building an executable jar file
Clone this repository with the following command line:
On computers with [Oracle JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html)(6 or higher) installed, Java executable jar files could be created. In a command-line window, go to the _src_ directory and type:
This will create the two executable jar files `C2A.jar` and `A2C.jar` that could be launched with the following command line models:
This will create the two executable jar files `C2A.jar` and `A2C.jar` that could be run with the following command line models:
```bash
java -jar C2A.jar [file]
java -jar A2C.jar [files]
...
...
@@ -25,38 +29,48 @@ java -jar A2C.jar [files]
#### Building a native code binary
On computers with the [GNU compiler GCJ](https://gcc.gnu.org/onlinedocs/gcc-4.2.4/gcj/) installed, binaries could also be built. In a command-line window, go to the _src_ directory, and type:
Clone this repository with the following command line:
This will create the two executable binary files `c2a` and `a2c` that could be launched with the following command line models:
On computers with [GraalVM](hhttps://www.graalvm.org/downloads/) installed, native executables can be built. In a command-line window, go to the _src_ directory, and type:
```bash
./c2a [file]
./a2c [files]
javac C2A.java A2C.java
native-image C2A C2A
native-image A2C A2C
rm C2A.class A2C.class
```
This will create the two native executables `C2A` an `A2C` that can be run with the following command line models:
```bash
./C2A [file]
./A2C [files]
```
## Usage
Launch _C2A_ without option to read the following documentation:
Run _C2A_ without option to read the following documentation:
```
C2A
USAGE: C2A <seq.fna>
where <seq.fna> is a FASTA-formatted codon sequence file.
This will output in stdout the translation (standard
genetic code) of each sequence in the same format.
where <seq.fna> is a FASTA-formatted codon sequence file. This will
output in stdout the translation (standard genetic code) of each
sequence in the same format.
```
Launch _A2C_ without option to read the following documentation:
Run _A2C_ without option to read the following documentation:
```
A2C
USAGE: A2C <ali.faa> <seq.fna>
where <ali.faa> is a FASTA-formatted multiple amino-acid
sequence alignment file and <seq.ali> a FASTA-formatted
file containing the associated codon sequences. This
will output in stdout the multiple back-translated
sequence alignment.
where <ali.faa> is a FASTA-formatted multiple amino acid sequence
alignment file and <seq.ali> a FASTA-formatted file containing the
associated codon sequences. This will output in stdout the multiple
back-translated sequence alignment.
```
## Example
...
...
@@ -67,7 +81,7 @@ First, using _C2A_ allows creating the file _seq.faa_ that contains the translat
```bash
C2A seq.fna > seq.faa
```
Second, the created _seq.faa_ could be used to infer a multiple amino-acid sequence alignment, which is expected to be more accurate than the one inferred from the initial codon sequences. The directory _src_ contains such an alignment inside the file _ali.faa_.
Second, the created _seq.faa_ could be used to infer a multiple amino-acid sequence alignment, which is expected to be more accurate than the one inferred from the initial codon sequences. The directory _example_ contains such an alignment inside the file _ali.faa_.
Finally, using _A2C_ allows creating the file _ali.fna_ by back-translating the amino-acid sequences inside _ali.faa_ with the associated codon sequences inside _seq.fna_: