Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Commit afdb837

Browse files
committed
Cosmetics
1 parent dc00a25 commit afdb837

12 files changed

Lines changed: 84 additions & 206 deletions

File tree

biojava-structure/src/main/java/org/biojava/nbio/structure/align/ce/CECalculator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@
4848

4949

5050

51-
/** This is based on the original Combinatorial Extension (CE) source code from 2003 or 2004 (CE version 2.3),
51+
/**
52+
* This is based on the original Combinatorial Extension (CE) source code from 2003 or 2004 (CE version 2.3),
5253
* as has been originally developed by I. Shindyalov and P.Bourne (1998).
5354
* The original CE paper is available from here: <a href="http://peds.oxfordjournals.org/cgi/content/short/11/9/739">http://peds.oxfordjournals.org/cgi/content/short/11/9/739</a>.
5455
*
5556
* This class is a pretty much exact 1:1 port from C, where I cared about exact reproduce of the CE results
5657
* and not about Java style.
5758
*
5859
* @author Andreas Prlic
59-
6060
*
6161
*/
6262
public class CECalculator {

biojava-structure/src/main/java/org/biojava/nbio/structure/align/ce/CeCalculatorEnhanced.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343

4444

4545

46-
/** This is based on the original Combinatorial Extension (CE) source code from 2003 or 2004 (CE version 2.3),
46+
/**
47+
* This is based on the original Combinatorial Extension (CE) source code from 2003 or 2004 (CE version 2.3),
4748
* as has been originally developed by I. Shindyalov and P.Bourne (1998).
4849
* The original CE paper is available from here: <a href="http://peds.oxfordjournals.org/cgi/content/short/11/9/739">http://peds.oxfordjournals.org/cgi/content/short/11/9/739</a>.
4950
*
@@ -52,8 +53,6 @@
5253
*
5354
* @author Spencer Bliven
5455
* @author Andreas Prlic
55-
*
56-
5756
*
5857
*/
5958
public class CeCalculatorEnhanced {

biojava-structure/src/main/java/org/biojava/nbio/structure/align/ce/OptimalCECPParameters.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626

2727
import java.util.List;
2828

29-
/** Contains the parameters that can be sent to CE
29+
/**
30+
* Contains the parameters that can be sent to CE
3031
*
3132
* @author Andreas Prlic
3233
*

biojava-structure/src/main/java/org/biojava/nbio/structure/align/ce/StartupParameters.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,14 @@
2121
package org.biojava.nbio.structure.align.ce;
2222

2323

24-
/** a simple bean that contains the parameters that can get set at startup
24+
/**
25+
* A simple bean that contains the parameters that can get set at startup
2526
*
2627
* @author Andreas Prlic
2728
*
2829
*/
2930
public class StartupParameters {
3031

31-
32-
3332
String pdbFilePath;
3433
String cacheFilePath;
3534
String outFile;

biojava-structure/src/main/java/org/biojava/nbio/structure/align/client/PdbPair.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@
2424

2525
/**
2626
* A pair for structure alignment
27-
*
28-
* @author Andreas Prlic
29-
*
27+
* <p>
3028
* name1 is always < name2
29+
* @author Andreas Prlic
3130
*
3231
*/
3332
public class PdbPair implements Comparable<PdbPair> {

biojava-structure/src/main/java/org/biojava/nbio/structure/align/fatcat/calc/AFPCalculator.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
import java.util.ArrayList;
3636
import java.util.List;
3737

38-
/** a class that performs calculations on AFPCHains
38+
/**
39+
* A class that performs calculations on AFPChains
3940
*
4041
* @author Andreas Prlic
4142
*
@@ -45,9 +46,7 @@ public class AFPCalculator
4546
public static final boolean debug = FatCatAligner.debug;
4647

4748

48-
public static final void extractAFPChains(FatCatParameters params, AFPChain afpChain,Atom[] ca1,Atom[] ca2) throws StructureException {
49-
50-
49+
public static void extractAFPChains(FatCatParameters params, AFPChain afpChain,Atom[] ca1,Atom[] ca2) throws StructureException {
5150

5251
List<AFP> afpSet = new ArrayList<AFP>();
5352
afpChain.setAfpSet(afpSet);

biojava-structure/src/main/java/org/biojava/nbio/structure/align/fatcat/calc/FCAlignHelper.java

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -29,34 +29,35 @@
2929
public class FCAlignHelper
3030
{
3131

32-
int M; //length of protein 1
33-
int N; //length of protein 2
34-
double g; //gap-create
35-
double h; //gap-extend
36-
double m; //g + h
37-
double[][] sij;
38-
char[][] trace; //trace-record
39-
char[][] etrace; //trace-record
40-
char[][] dtrace; //trace-record
41-
int B1; //beginning position of protein 1 in alignment
42-
int B2; //beginning position of protein 2 in alignment
43-
int E1; //end position of protein 1 in alignment
44-
int E2; //end position of protein 2 in alignment
45-
double alignScore;
46-
double identity;
47-
double similarity;
48-
int[] sapp;
49-
int[] sapp0;
50-
int sappPos;
51-
int last;
52-
53-
char[] seq1;
54-
char[] seq2;
55-
char[] aln1;
56-
char[] aln2;
57-
char[] mark;
58-
59-
/** do an alignment given the provided matrix sij0
32+
private int M; //length of protein 1
33+
private int N; //length of protein 2
34+
private double g; //gap-create
35+
private double h; //gap-extend
36+
private double m; //g + h
37+
private double[][] sij;
38+
private char[][] trace; //trace-record
39+
private char[][] etrace; //trace-record
40+
private char[][] dtrace; //trace-record
41+
private int B1; //beginning position of protein 1 in alignment
42+
private int B2; //beginning position of protein 2 in alignment
43+
private int E1; //end position of protein 1 in alignment
44+
private int E2; //end position of protein 2 in alignment
45+
private double alignScore;
46+
private double identity;
47+
private double similarity;
48+
private int[] sapp;
49+
private int[] sapp0;
50+
private int sappPos;
51+
private int last;
52+
53+
private char[] seq1;
54+
private char[] seq2;
55+
private char[] aln1;
56+
private char[] aln2;
57+
private char[] mark;
58+
59+
/**
60+
* do an alignment given the provided matrix sij0
6061
*
6162
* @param sij0 - the matrix to perform the calculations on.
6263
* @param M0

biojava-structure/src/main/java/org/biojava/nbio/structure/align/fatcat/calc/FatCatAligner.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
import java.util.List;
4141

4242

43-
/** A class that does calculations on an AFPChain
43+
/**
44+
* A class that does calculations on an AFPChain
4445
*
4546
* @author Andreas Prlic
4647
*

biojava-structure/src/main/java/org/biojava/nbio/structure/align/fatcat/calc/StructureAlignmentOptimizer.java

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,31 @@ public class StructureAlignmentOptimizer
3939

4040
//private static final boolean showAlig = false;
4141

42-
int pro1Len;
43-
int pro2Len;
44-
int maxLen;
45-
Atom[] cod1;
46-
Atom[] cod2;
47-
48-
int[][] equSet;
49-
int equLen;
50-
int equLen0;
51-
double[][]sij;
52-
53-
int maxKeepStep;
54-
int keepStep;
55-
56-
double Dc; //the criteria for structural equivalent residues, eg. 3.0 (CE), 6.0(ProSup)
57-
double rmsdCut;//the criteria for stoping optimization
58-
double increase;
59-
double stopLenPer;
60-
double stopRmsdPer;
61-
double stopRmsd;
62-
63-
double gapIni;
64-
double gapExt;
65-
66-
double rmsd;
42+
private int pro1Len;
43+
private int pro2Len;
44+
private int maxLen;
45+
private Atom[] cod1;
46+
private Atom[] cod2;
47+
48+
private int[][] equSet;
49+
private int equLen;
50+
private int equLen0;
51+
private double[][]sij;
52+
53+
private int maxKeepStep;
54+
private int keepStep;
55+
56+
private double Dc; //the criteria for structural equivalent residues, eg. 3.0 (CE), 6.0(ProSup)
57+
private double rmsdCut;//the criteria for stoping optimization
58+
private double increase;
59+
private double stopLenPer;
60+
private double stopRmsdPer;
61+
private double stopRmsd;
62+
63+
private double gapIni;
64+
private double gapExt;
65+
66+
private double rmsd;
6767

6868
private static final boolean debug = FatCatAligner.debug;
6969

biojava-structure/src/main/java/org/biojava/nbio/structure/align/model/AFP.java

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,38 +24,34 @@
2424

2525
import java.io.Serializable;
2626

27-
/** A class to represent a FATCAT AFP
27+
/**
28+
* A class to represent a FATCAT aligned fragment pair (AFP)
2829
*
2930
* @author Andreas Prlic
3031
*
3132
*/
32-
3333
public class AFP implements Serializable {
3434

35-
/**
36-
*
37-
*/
3835
private static final long serialVersionUID = 3901209995477111829L;
39-
int p1;
40-
int p2;
41-
int fragLen;
42-
double rmsd;
43-
Matrix m;
44-
double[] t;
45-
double score;
4636

47-
long id;
37+
private int p1;
38+
private int p2;
39+
private int fragLen;
40+
private double rmsd;
41+
private Matrix m;
42+
private double[] t;
43+
private double score;
44+
45+
private long id;
4846

4947
@Override
50-
public String toString(){
48+
public String toString(){
5149

5250
// we use the metric of
53-
5451
// Manfred J. Sippl
5552
// On Distance and Similarity in Fold Space
5653
// Bioinformatics, 24, pp. 872-873 (2008)
5754

58-
5955
StringBuffer buf = new StringBuffer();
6056
buf.append("AFP: p1:");
6157
buf.append(p1);
@@ -124,7 +120,4 @@ public void setScore(double score) {
124120
this.score = score;
125121
}
126122

127-
128-
129-
130123
}

0 commit comments

Comments
 (0)