Shame on us. FlagStat used ints instead of longs, so we ended up getting negative read counts
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4022 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
71c4d3f33d
commit
f874e548aa
|
|
@ -43,18 +43,18 @@ import java.text.NumberFormat;
|
||||||
public class FlagStatWalker extends ReadWalker<Integer, Integer> {
|
public class FlagStatWalker extends ReadWalker<Integer, Integer> {
|
||||||
// what comes out of the flagstat
|
// what comes out of the flagstat
|
||||||
static class FlagStat {
|
static class FlagStat {
|
||||||
int readCount = 0;
|
long readCount = 0L;
|
||||||
int QC_failure = 0;
|
long QC_failure = 0L;
|
||||||
int duplicates = 0;
|
long duplicates = 0L;
|
||||||
int mapped = 0;
|
long mapped = 0L;
|
||||||
int paired_in_sequencing = 0;
|
long paired_in_sequencing = 0L;
|
||||||
int read1 = 0;
|
long read1 = 0L;
|
||||||
int read2 = 0;
|
long read2 = 0L;
|
||||||
int properly_paired = 0;
|
long properly_paired = 0L;
|
||||||
int with_itself_and_mate_mapped = 0;
|
long with_itself_and_mate_mapped = 0L;
|
||||||
int singletons = 0;
|
long singletons = 0L;
|
||||||
int with_mate_mapped_to_a_different_chr = 0;
|
long with_mate_mapped_to_a_different_chr = 0L;
|
||||||
int with_mate_mapped_to_a_different_chr_maq_greaterequal_than_5 = 0;
|
long with_mate_mapped_to_a_different_chr_maq_greaterequal_than_5 = 0L;
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
String ret = "";
|
String ret = "";
|
||||||
|
|
@ -155,21 +155,15 @@ public class FlagStatWalker extends ReadWalker<Integer, Integer> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer reduceInit
|
public Integer reduceInit() {
|
||||||
() {
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer reduce
|
public Integer reduce(Integer value, Integer sum) {
|
||||||
( Integer
|
|
||||||
value, Integer
|
|
||||||
sum ) {
|
|
||||||
return value + sum;
|
return value + sum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onTraversalDone
|
public void onTraversalDone(Integer result) {
|
||||||
( Integer
|
|
||||||
result ) {
|
|
||||||
//out.println("[REDUCE RESULT] Traversal result is: " + result);
|
//out.println("[REDUCE RESULT] Traversal result is: " + result);
|
||||||
out.println(myStat.toString());
|
out.println(myStat.toString());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue