Skip to content

Commit 4274f6f

Browse files
committed
Change to wiki page
1 parent ea64542 commit 4274f6f

2 files changed

Lines changed: 48 additions & 198 deletions

File tree

wiki/BioJava:CookBook:PDB:align.md

Lines changed: 35 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,30 @@
22
title: BioJava:CookBook:PDB:align
33
---
44

5-
### How can I calculate a structure alignment?
6-
7-
### Cobinatorial Extension (CE) and FATCAT
5+
How can I calculate a structure alignment?
6+
==========================================
7+
8+
### What is a structure alignment?
9+
10+
**Structural alignment** attempts to establish equivalences between two
11+
or more polymer structures based on their shape and three-dimensional
12+
conformation. In contrast to simple structural superposition, where at
13+
least some equivalent residues of the two structures are known,
14+
structural alignment requires no *a priori* knowledge of equivalent
15+
positions. Structural alignment is a valuable tool for the comparison of
16+
proteins with low sequence similarity, where evolutionary relationships
17+
between proteins cannot be easily detected by standard sequence
18+
alignment techniques. Structural alignment can therefore be used to
19+
imply evolutionary relationships between proteins that share very little
20+
common sequence. However, caution should be used in using the results as
21+
evidence for shared evolutionary ancestry because of the possible
22+
confounding effects of convergent evolution by which multiple unrelated
23+
amino acid sequences converge on a common tertiary structure.
24+
25+
For more info see the [Wikipedia article on protein structure
26+
alignment](http://en.wikipedia.org/wiki/Structural_alignment).
27+
28+
### Alignment with Cobinatorial Extension (CE) and FATCAT
829

930
The structure alignment possibilities of BioJava are going to be greatly
1031
enhanced in the upcoming BioJava 3 release. It provides a BioJava port
@@ -16,107 +37,18 @@ available from
1637

1738
<BioJava:CookBook:PDB:FATCAT_Algorithm>
1839

19-
This is the example of how to use the structure alignment algorithm with
20-
the BioJava 1.7 release:
21-
22-
<BioJava:CookBook:PDB:BioJava_Algorithm>
23-
24-
### Biojava 1.7
25-
26-
The [structure alignment
27-
algorithm](BioJava:CookBook:PDB:aboutalign "wikilink") contained in
28-
BioJava is based on a variation of the PSC++ algorithm provided by Peter
29-
Lackner, Univ. Salzburg (personal communication). The
30-
[algorithm](BioJava:CookBook:PDB:aboutalign "wikilink") is calculating a
31-
distance matrix based, rigid body protein structure superimposition.
32-
33-
Example
34-
-------
35-
36-
[Run WebStart
37-
Example](http://www.biojava.org/download/performance/biojava-structure-example1.jnlp)
38-
(5MB download includes Jmol for visualization)
39-
40-
Learn more about this JavaWebStart example at <BioJava:Performance>
41-
42-
Code
43-
----
44-
45-
<java>
46-
47-
` public static void main(String[] args){`
48-
49-
`       PDBFileReader pdbr = new PDBFileReader();`
50-
`       pdbr.setPath("/Path/To/My/PDBFiles/");`
51-
52-
`       String pdb1 = "1buz";`
53-
`       String pdb2 = "1ali";`
54-
`       String outputfile = "/somewhere/alig_" + pdb1 + "_" + pdb2 + ".pdb";`
55-
56-
`       try {`
57-
`           // NO NEED TO DO CHANGE ANYTHING BELOW HERE...`
40+
### Alignment with BioJava 1.7
5841

59-
`           StructurePairAligner sc = new StructurePairAligner();`
42+
BioJava 1.7 contains an unpublished structure alignment algorithm. For
43+
more information on it, please see here:
6044

61-
`           // step1 : read molecules`
62-
63-
`           System.out.println("aligning " + pdb1 + " vs. " + pdb2);`
64-
65-
`           Structure s1 = pdbr.getStructureById(pdb1);`
66-
`           Structure s2 = pdbr.getStructureById(pdb2);`
67-
`           // of course you do not have to use the full structures`
68-
`           // you could also just use any set of atoms of your choice`
69-
70-
`           // step 2 : do the calculations`
71-
`           sc.align(s1, s2);`
72-
73-
`           // if you want more control over the alignment parameters`
74-
`           // use the StrucAligParameters`
75-
`           // StrucAligParameters params = new StrucAligParameters();`
76-
`           // params.setFragmentLength(8);`
77-
`           // sc.align(s1,s2,params);`
78-
79-
`           AlternativeAlignment[] aligs = sc.getAlignments();`
80-
81-
`           // cluster similar results together`
82-
`           ClusterAltAligs.cluster(aligs);`
83-
84-
`           // print the result:`
85-
`           // the AlternativeAlignment object gives access to rotation matrices`
86-
`           // / shift vectors.`
87-
`           for (int i = 0; i < aligs.length; i++) {`
88-
`               AlternativeAlignment aa = aligs[i];`
89-
`               System.out.println(aa);`
90-
`           }`
91-
92-
`           // convert AlternativeAlignment 1 to PDB file, so it can be opened`
93-
`           // with a viewer of your choice`
94-
`           // (e.g. Jmol, Rasmol)`
95-
96-
`           if (aligs.length > 0) {`
97-
`               AlternativeAlignment aa1 = aligs[0];`
98-
`               String pdbstr = aa1.toPDB(s1, s2);`
99-
100-
`               System.out.println("writing alignment to " + outputfile);`
101-
`               FileOutputStream out = new FileOutputStream(outputfile);`
102-
`               PrintStream p = new PrintStream(out);`
103-
104-
`               p.println(pdbstr);`
105-
106-
`               p.close();`
107-
`               out.close();`
108-
`           }`
109-
`       } catch (FileNotFoundException e) {`
110-
`           // TODO Auto-generated catch block`
111-
`           e.printStackTrace();`
112-
`       } catch (IOException e) {`
113-
`           // TODO Auto-generated catch block`
114-
`           e.printStackTrace();`
115-
`       } catch (StructureException e) {`
116-
`           e.printStackTrace();`
117-
`       }`
45+
<BioJava:CookBook:PDB:BioJava_Algorithm>
11846

119-
} </java>
47+
### Structure superposition
12048

121-
You can send the structure alignment for display to Jmol. see
122-
<BioJava:CookBook:PDB:Jmol> for more on this.
49+
Also know as "overlaying" is a process of fitting two (equivalent) sets
50+
of Atoms onto each other. This can be useful e.g. to overlay two
51+
different structural models of the same protein. BioJava also provides a
52+
tool for this. (See the
53+
[SVDSuperimposer.html](http://www.biojava.org/docs/api/org/biojava/bio/structure/SVDSuperimposer.html)
54+
javadoc.
Lines changed: 13 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,26 @@
1-
===How can I calculate a structure alignment?===
1+
=How can I calculate a structure alignment?=
22

3-
=== Cobinatorial Extension (CE) and FATCAT ===
3+
=== What is a structure alignment? ===
4+
'''Structural alignment''' attempts to establish equivalences between two or more polymer structures based on their shape and three-dimensional conformation. In contrast to simple structural superposition, where at least some equivalent residues of the two structures are known, structural alignment requires no ''a priori'' knowledge of equivalent positions. Structural alignment is a valuable tool for the comparison of proteins with low sequence similarity, where evolutionary relationships between proteins cannot be easily detected by standard sequence alignment techniques. Structural alignment can therefore be used to imply evolutionary relationships between proteins that share very little common sequence. However, caution should be used in using the results as evidence for shared evolutionary ancestry because of the possible confounding effects of convergent evolution by which multiple unrelated amino acid sequences converge on a common tertiary structure.
45

5-
The structure alignment possibilities of BioJava are going to be greatly enhanced in the upcoming BioJava 3 release. It provides a BioJava port of the '''Combinatorial Extension''' algorithm (CE) as well as of the '''FATCAT''' algorithm. The documentation how to use this algorithm is available from
6-
7-
[[BioJava:CookBook:PDB:CE_Algorithm]]
8-
9-
[[BioJava:CookBook:PDB:FATCAT_Algorithm]]
10-
11-
12-
This is the example of how to use the structure alignment algorithm with the BioJava 1.7 release:
13-
14-
[[BioJava:CookBook:PDB:BioJava_Algorithm]]
15-
16-
===Biojava 1.7===
17-
18-
The [[BioJava:CookBook:PDB:aboutalign|structure alignment algorithm]] contained in BioJava is
19-
based on a variation of the PSC++ algorithm provided by Peter Lackner, Univ. Salzburg
20-
(personal communication). The [[BioJava:CookBook:PDB:aboutalign|algorithm]] is calculating a distance matrix based, rigid body protein structure superimposition.
21-
22-
== Example ==
23-
24-
[http://www.biojava.org/download/performance/biojava-structure-example1.jnlp Run WebStart Example] (5MB download includes Jmol for visualization)
25-
26-
Learn more about this JavaWebStart example at [[BioJava:Performance]]
27-
28-
== Code ==
6+
For more info see the [http://en.wikipedia.org/wiki/Structural_alignment Wikipedia article on protein structure alignment].
297

30-
<java>
318

32-
public static void main(String[] args){
339

34-
PDBFileReader pdbr = new PDBFileReader();
35-
pdbr.setPath("/Path/To/My/PDBFiles/");
10+
=== Alignment with Cobinatorial Extension (CE) and FATCAT ===
3611

37-
String pdb1 = "1buz";
38-
String pdb2 = "1ali";
39-
String outputfile = "/somewhere/alig_" + pdb1 + "_" + pdb2 + ".pdb";
40-
41-
try {
42-
// NO NEED TO DO CHANGE ANYTHING BELOW HERE...
43-
44-
StructurePairAligner sc = new StructurePairAligner();
45-
46-
// step1 : read molecules
47-
48-
System.out.println("aligning " + pdb1 + " vs. " + pdb2);
49-
50-
Structure s1 = pdbr.getStructureById(pdb1);
51-
Structure s2 = pdbr.getStructureById(pdb2);
52-
// of course you do not have to use the full structures
53-
// you could also just use any set of atoms of your choice
54-
55-
// step 2 : do the calculations
56-
sc.align(s1, s2);
57-
58-
// if you want more control over the alignment parameters
59-
// use the StrucAligParameters
60-
// StrucAligParameters params = new StrucAligParameters();
61-
// params.setFragmentLength(8);
62-
// sc.align(s1,s2,params);
63-
64-
AlternativeAlignment[] aligs = sc.getAlignments();
65-
66-
// cluster similar results together
67-
ClusterAltAligs.cluster(aligs);
68-
69-
// print the result:
70-
// the AlternativeAlignment object gives access to rotation matrices
71-
// / shift vectors.
72-
for (int i = 0; i < aligs.length; i++) {
73-
AlternativeAlignment aa = aligs[i];
74-
System.out.println(aa);
75-
}
12+
The structure alignment possibilities of BioJava are going to be greatly enhanced in the upcoming BioJava 3 release. It provides a BioJava port of the '''Combinatorial Extension''' algorithm (CE) as well as of the '''FATCAT''' algorithm. The documentation how to use this algorithm is available from
7613

77-
// convert AlternativeAlignment 1 to PDB file, so it can be opened
78-
// with a viewer of your choice
79-
// (e.g. Jmol, Rasmol)
14+
[[BioJava:CookBook:PDB:CE_Algorithm]]
8015

81-
if (aligs.length > 0) {
82-
AlternativeAlignment aa1 = aligs[0];
83-
String pdbstr = aa1.toPDB(s1, s2);
16+
[[BioJava:CookBook:PDB:FATCAT_Algorithm]]
8417

85-
System.out.println("writing alignment to " + outputfile);
86-
FileOutputStream out = new FileOutputStream(outputfile);
87-
PrintStream p = new PrintStream(out);
18+
=== Alignment with BioJava 1.7 ===
8819

89-
p.println(pdbstr);
20+
BioJava 1.7 contains an unpublished structure alignment algorithm. For more information on it, please see here:
9021

91-
p.close();
92-
out.close();
93-
}
94-
} catch (FileNotFoundException e) {
95-
// TODO Auto-generated catch block
96-
e.printStackTrace();
97-
} catch (IOException e) {
98-
// TODO Auto-generated catch block
99-
e.printStackTrace();
100-
} catch (StructureException e) {
101-
e.printStackTrace();
102-
}
103-
}
104-
</java>
22+
[[BioJava:CookBook:PDB:BioJava_Algorithm]]
10523

24+
=== Structure superposition ===
10625

107-
You can send the structure alignment for display to Jmol. see [[BioJava:CookBook:PDB:Jmol]]
108-
for more on this.
26+
Also know as "overlaying" is a process of fitting two (equivalent) sets of Atoms onto each other. This can be useful e.g. to overlay two different structural models of the same protein. BioJava also provides a tool for this. (See the [http://www.biojava.org/docs/api/org/biojava/bio/structure/SVDSuperimposer.html SVDSuperimposer.html] javadoc.

0 commit comments

Comments
 (0)