File: README.md

package info (click to toggle)
alter-sequence-alignment 1.3.4-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,164 kB
  • sloc: java: 20,039; xml: 506; javascript: 173; sh: 70; makefile: 9
file content (134 lines) | stat: -rw-r--r-- 4,688 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
ALTER Project
=============

# What is ALTER
ALTER stands for (ALignment Transformation EnviRonment) and it is a set of software components to transform between [Multiple Sequence Alignment](http://en.wikipedia.org/wiki/Multiple_sequence_alignment) file formats.

ALTER difers from other similar tools in the way that is "program-oriented" instead of simply "format-oriented", that is, when you convert between one format into another, you have to specify which program did generate your input file and which program will consume your generated file. This is because many programs does not follow the exact format standard, making custom asumptions about it, so tranforming directly between standard formats does not always ensure that your produced file will be processed by the next program correctly.

# ALTER software components
ALTER contains a set of components:

1. A core library.
2. A command line interface.
3. A desktop graphical user interface (GUI).
4. A web interface (a running instance is here: [http://sing.ei.uvigo.es/alter](http://sing.ei.uvigo.es/alter)).


## Running the desktop graphical user interface
```
alter-sequence-alignment
```

## Running the command line user interface
```
alter-sequence-alignment help
```

# Use the core library in your projects

## Include the library in your project

### Maven project (recommended)
Import our repository into your pom.xml file
```
<project>
    [...]
    <repositories>
        [...]
         <repository>
            <id>sing-repository</id>
            <name>SING repository</name>
            <url>http://sing.ei.uvigo.es/maven2</url>
        </repository>
        [...]
    </repositories>
    [...]
    <dependencies>
        [...]
    	<dependency>
            <groupId>es.uvigo.ei.sing</groupId>
            <artifactId>alter-lib</artifactId>
            <version>1.3.4</version>
        </dependency>
    	[...]
    </dependencies>
</project>
```



### Include the .jar inside your classpath
You have to include the /usr/share/java/alter.jar file in your classpath

## Make a sequence conversion inside your Java code
Here it is an example to convert a NEXUS file to ALN.

```java
package testalter;

import es.uvigo.ei.sing.alter.converter.Converter;
import es.uvigo.ei.sing.alter.converter.DefaultFactory;
import es.uvigo.ei.sing.alter.parser.ParseException;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;

public class TestAlter {

	public static void main(String[] args) throws IOException {
		Converter converter = new DefaultFactory().getConverter(
            "Linux", 	// Input operating system (Linux, MacOS or Windows)
			"clustal", 	// Input program (Clustal, MAFFT, MUSCLE, PROBCONS or TCoffee)
			"NEXUS",	// Input format (ALN, FASTA, GDE, MEGA, MSF, NEXUS, PHYLIP or PIR)
			false,		// Autodetect format (other input options are omitted)
			false,		// Collapse sequences to haplotypes
			true,		// Treat gaps as missing data when collapsing
			false,		// Count missing data as differences when collapsing
			0,			// Connection limit (sequences differing at <= l sites will be collapsed) (default is l=0)
			"windows",	// Output operating system (Linux, MacOS or Windows)
			"general",	// Output program (jModelTest, MrBayes, PAML, PAUP, PhyML,
						// ProtTest, RAxML, TCS, CodABC,
						// BioEdit, MEGA, dnaSP, Se-Al, Mesquite, SplitsTree, Clustal, MAFFT,
						// MUSCLE, PROBCONS, TCoffee, Gblocks, SeaView, trimAl or GENERAL)
			"aln",  	// Output format (ALN, FASTA, GDE, MEGA, MSF, NEXUS, PHYLIP or PIR)
			false,		// Low case output
			false,		// Output residue numbers (only ALN format)
			false,		// Sequential output (only NEXUS and PHYLIP formats)
			false,		// Output match characters
			"MyConverterApp" // identifier for log messages
		);


		try {
			String inputSequence = new String(Files.readAllBytes(Paths.get("input.nexus")));

			String converted = converter.convert(inputSequence);

			System.out.println("converted file:");
			System.out.println(converted);

		} catch (ParseException e) {
			System.err.println("the input file seems to contain errors");
			e.printStackTrace();
		}

	}
}
```

# Development Team
The ALTER development team is:

* Daniel Glez-Peña.
* Daniel Gómez-Blanco.
* Miguel Reboiro-Jato.
* Florentino Fdez-Riverola.
* David Posada.

# Citing ALTER
If you are using ALTER in your research work, please cite us:

D. Glez-Peña; D. Gómez-Blanco; M. Reboiro-Jato; F. Fdez-Riverola; D. Posada (2010) ALTER: program-oriented format conversion of DNA and protein alignments. Nucleic Acids Research. Web Server issue. ISSN: 0305-1048
[http://dx.doi.org/10.1093/nar/gkq321](http://dx.doi.org/10.1093/nar/gkq321)