| 1 |
package driver; |
| 2 |
|
| 3 |
import java.util.Arrays; |
| 4 |
|
| 5 |
import fileIO.TextFile; |
| 6 |
import shared.Tools; |
| 7 |
import stream.SiteScoreR; |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
public class LookAtID { |
| 15 |
|
| 16 |
public static void main(String[] args){ |
| 17 |
|
| 18 |
TextFile tf=new TextFile(args[0], true); |
| 19 |
|
| 20 |
long max=0; |
| 21 |
|
| 22 |
long line=0; |
| 23 |
|
| 24 |
for(String s=tf.nextLine(); s!=null; s=tf.nextLine()){ |
| 25 |
SiteScoreR[] array=SiteScoreR.fromTextArray(s); |
| 26 |
String[] split=s.split("\t"); |
| 27 |
for(int i=0; i<array.length; i++){ |
| 28 |
SiteScoreR ssr=array[i]; |
| 29 |
String s2=split[i]; |
| 30 |
max=Tools.max(ssr.numericID, max); |
| 31 |
if(ssr.numericID>=Integer.MAX_VALUE){ |
| 32 |
System.out.println("Found overflow ID "+ssr.numericID+" at line "+line); |
| 33 |
System.out.println("ssr="+ssr.toText()); |
| 34 |
System.out.println("raw="+s2); |
| 35 |
System.out.println("All:\n"+Arrays.toString(split)); |
| 36 |
System.out.println(); |
| 37 |
break; |
| 38 |
} |
| 39 |
} |
| 40 |
line++; |
| 41 |
} |
| 42 |
tf.close(); |
| 43 |
System.out.println("Max ID was "+max); |
| 44 |
|
| 45 |
} |
| 46 |
|
| 47 |
} |