Skip to content

Commit c6fa93b

Browse files
committed
Fixed minor issues
1 parent e1ef8a3 commit c6fa93b

File tree

1 file changed

+12
-15
lines changed
  • biojava-core/src/main/java/org/biojava/nbio/core/sequence/io

1 file changed

+12
-15
lines changed

biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/ABITrace.java

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,14 @@ public class ABITrace {
6161
//This is the actual file data.
6262
private byte[] traceData;
6363

64-
private int maximum = 0;
65-
6664
//the next four declaration lines comprise the file index information
6765
private int macJunk = 0; //sometimes when macintosh files are
6866
//FTPed in binary form, they have 128 bytes
6967
//of crap pre-pended to them. This constant
7068
//allows ABITrace to handle that in a way that
7169
//is invisible to the user.
7270
private static final int absIndexBase = 26; //The file location of the Index pointer
73-
private int IndexBase, PLOC, PCON;
71+
private int PLOC, PCON;
7472

7573
//the next declaration is for the actual file pointers
7674
private int DATA9, DATA10, DATA11, DATA12, PBAS2, FWO;
@@ -336,7 +334,6 @@ private double calculateScale(int height) {
336334
* @return - maximum height of any of the traces
337335
*/
338336
private int getMaximum() {
339-
if (maximum > 0) return maximum;
340337
int max = 0;
341338
for (int x = 0; x <= T.length - 1; x++) {
342339
if (T[x] > max) max = T[x];
@@ -480,7 +477,7 @@ private void setBasecalls() {
480477
* Sets up all of the initial pointers to the important records in TraceData.
481478
*/
482479
private void setIndex() {
483-
int DataCounter, PBASCounter, PLOCCounter, PCONCounter, NumRecords;
480+
int DataCounter, PBASCounter, PLOCCounter, PCONCounter, NumRecords, indexBase;
484481
byte[] RecNameArray = new byte[4];
485482
String RecName;
486483

@@ -489,39 +486,39 @@ private void setIndex() {
489486
PLOCCounter = 0;
490487
PCONCounter = 0;
491488

492-
IndexBase = getIntAt(absIndexBase + macJunk);
489+
indexBase = getIntAt(absIndexBase + macJunk);
493490
NumRecords = getIntAt(absIndexBase - 8 + macJunk);
494491

495492
for (int record = 0; record <= NumRecords - 1; record++) {
496-
getSubArray(RecNameArray, (IndexBase + (record * 28)));
493+
getSubArray(RecNameArray, (indexBase + (record * 28)));
497494
RecName = new String(RecNameArray);
498495
if (RecName.equals("FWO_"))
499-
FWO = IndexBase + (record * 28) + 20;
496+
FWO = indexBase + (record * 28) + 20;
500497
if (RecName.equals("DATA")) {
501498
++DataCounter;
502499
if (DataCounter == 9)
503-
DATA9 = IndexBase + (record * 28) + 20;
500+
DATA9 = indexBase + (record * 28) + 20;
504501
if (DataCounter == 10)
505-
DATA10 = IndexBase + (record * 28) + 20;
502+
DATA10 = indexBase + (record * 28) + 20;
506503
if (DataCounter == 11)
507-
DATA11 = IndexBase + (record * 28) + 20;
504+
DATA11 = indexBase + (record * 28) + 20;
508505
if (DataCounter == 12)
509-
DATA12 = IndexBase + (record * 28) + 20;
506+
DATA12 = indexBase + (record * 28) + 20;
510507
}
511508
if (RecName.equals("PBAS")) {
512509
++PBASCounter;
513510
if (PBASCounter == 2)
514-
PBAS2 = IndexBase + (record * 28) + 20;
511+
PBAS2 = indexBase + (record * 28) + 20;
515512
}
516513
if (RecName.equals("PLOC")) {
517514
++PLOCCounter;
518515
if (PLOCCounter == 2)
519-
PLOC = IndexBase + (record * 28) + 20;
516+
PLOC = indexBase + (record * 28) + 20;
520517
}
521518
if (RecName.equals("PCON")) {
522519
++PCONCounter;
523520
if (PCONCounter == 2)
524-
PCON = IndexBase + (record * 28) + 20;
521+
PCON = indexBase + (record * 28) + 20;
525522
}
526523

527524
} //next record

0 commit comments

Comments
 (0)