Debian Codegraph @

current/align2/ReformatBatchOutput2.java

raw symbols SCIP
1 package align2;
2
3 import java.util.ArrayList;
4
5 import fileIO.TextFile;
6
7 public class ReformatBatchOutput2 {
8
9 // Elapsed: 31.7
10 //
11 // Mapping Statistics for 0s_default.sam:
12 // mapped: 100.00%
13 // retained: 96.06%
14 // discarded: 0.00%
15 // ambiguous: 3.94%
16 //
17 // Strict correctness (both ends exactly correct):
18 // true positive: 96.06%
19 // false positive: 0.00%
20 //
21 // Loose correctness (one end approximately correct):
22 // true positive: 96.06%
23 // false positive: 0.00%
24 //
25 // false negative: 0.00%
26 // Elapsed: 2.34
27 // Elapsed: 20.51
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 // list.add(s);
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 }