| 1 |
package align2; |
| 2 |
|
| 3 |
import java.util.ArrayList; |
| 4 |
|
| 5 |
import fileIO.TextFile; |
| 6 |
|
| 7 |
public class ReformatBatchOutput2 { |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
public static void main(String[] args){ |
| 31 |
TextFile tf=new TextFile(args[0], false); |
| 32 |
String[] lines=tf.toStringLines(); |
| 33 |
ArrayList<String> list=new ArrayList<String>(); |
| 34 |
|
| 35 |
int mode=0; |
| 36 |
|
| 37 |
System.out.println(header()); |
| 38 |
|
| 39 |
for(String s : lines){ |
| 40 |
if(s.startsWith("Elapsed:")){mode++;} |
| 41 |
if(mode>1){ |
| 42 |
mode=0; |
| 43 |
}else{ |
| 44 |
|
| 45 |
if(s.startsWith("Mapping Statistics for ")){ |
| 46 |
System.out.println(s.replace("Mapping Statistics for ", "").replace(".sam:", "")+"\t"); |
| 47 |
}else if(s.startsWith("Mapping:")){ |
| 48 |
s=s.replace("Mapping:", "").replace("seconds.", "").trim(); |
| 49 |
System.out.print(s+"\t"); |
| 50 |
} |
| 51 |
} |
| 52 |
} |
| 53 |
} |
| 54 |
|
| 55 |
|
| 56 |
public static String header() { |
| 57 |
return("name\tcount\ttime\tmapTime\tmapped\tretained\tdiscarded\tambiguous\ttruePositive\t" + |
| 58 |
"falsePositive\ttruePositiveL\tfalsePositiveL\tfalseNegative"); |
| 59 |
} |
| 60 |
|
| 61 |
} |