Another round of FindBugs fixes. Comparator doesn't implement Serializable.
This commit is contained in:
parent
77fbaec044
commit
55b7949d68
|
|
@ -2,6 +2,7 @@ package org.broadinstitute.sting.gatk.walkers.haplotypecaller;
|
|||
|
||||
import org.jgrapht.graph.DefaultDirectedGraph;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Comparator;
|
||||
|
||||
/**
|
||||
|
|
@ -55,7 +56,7 @@ public class DeBruijnEdge {
|
|||
return (graph.getEdgeSource(this).equals(graph2.getEdgeSource(edge))) && (graph.getEdgeTarget(this).equals(graph2.getEdgeTarget(edge)));
|
||||
}
|
||||
|
||||
public static class EdgeWeightComparator implements Comparator<DeBruijnEdge> {
|
||||
public static class EdgeWeightComparator implements Comparator<DeBruijnEdge>, Serializable {
|
||||
@Override
|
||||
public int compare(final DeBruijnEdge edge1, final DeBruijnEdge edge2) {
|
||||
return edge1.multiplicity - edge2.multiplicity;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import org.apache.commons.lang.ArrayUtils;
|
|||
import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
|
||||
import org.jgrapht.graph.DefaultDirectedGraph;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
|
@ -76,14 +77,14 @@ public class KBestPaths {
|
|||
}
|
||||
}
|
||||
|
||||
protected static class PathComparatorTotalScore implements Comparator<Path> {
|
||||
protected static class PathComparatorTotalScore implements Comparator<Path>, Serializable {
|
||||
@Override
|
||||
public int compare(final Path path1, final Path path2) {
|
||||
return path1.totalScore - path2.totalScore;
|
||||
}
|
||||
}
|
||||
|
||||
//protected static class PathComparatorLowestEdge implements Comparator<Path> {
|
||||
//protected static class PathComparatorLowestEdge implements Comparator<Path>, Serializable {
|
||||
// @Override
|
||||
// public int compare(final Path path1, final Path path2) {
|
||||
// return path2.lowestEdge - path1.lowestEdge;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ import org.broadinstitute.sting.utils.variantcontext.Allele;
|
|||
import org.broadinstitute.sting.utils.variantcontext.Genotype;
|
||||
import org.broadinstitute.sting.utils.variantcontext.VariantContext;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
|
@ -103,7 +104,7 @@ public class HaplotypeScore extends InfoFieldAnnotation implements StandardAnnot
|
|||
return map;
|
||||
}
|
||||
|
||||
private static class HaplotypeComparator implements Comparator<Haplotype> {
|
||||
private static class HaplotypeComparator implements Comparator<Haplotype>, Serializable {
|
||||
|
||||
public int compare(Haplotype a, Haplotype b) {
|
||||
if (a.getQualitySum() < b.getQualitySum())
|
||||
|
|
|
|||
|
|
@ -29,10 +29,7 @@ import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
|
|||
import org.broadinstitute.sting.utils.exceptions.UserException;
|
||||
import org.broadinstitute.sting.utils.text.XReadLines;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.PrintStream;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
|
@ -83,7 +80,7 @@ public class Tranche {
|
|||
return accessibleTruthSites > 0 ? callsAtTruthSites / (1.0*accessibleTruthSites) : 0.0;
|
||||
}
|
||||
|
||||
public static class TrancheTruthSensitivityComparator implements Comparator<Tranche> {
|
||||
public static class TrancheTruthSensitivityComparator implements Comparator<Tranche>, Serializable {
|
||||
@Override
|
||||
public int compare(final Tranche tranche1, final Tranche tranche2) {
|
||||
return Double.compare(tranche1.ts, tranche2.ts);
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ package org.broadinstitute.sting.gatk.walkers.variantrecalibration;
|
|||
|
||||
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Comparator;
|
||||
|
||||
/**
|
||||
|
|
@ -54,7 +55,7 @@ public class VariantDatum {
|
|||
public int worstAnnotation;
|
||||
public MultivariateGaussian assignment; // used in K-means implementation
|
||||
|
||||
public static class VariantDatumLODComparator implements Comparator<VariantDatum> {
|
||||
public static class VariantDatumLODComparator implements Comparator<VariantDatum>, Serializable {
|
||||
@Override
|
||||
public int compare(final VariantDatum datum1, final VariantDatum datum2) {
|
||||
return Double.compare(datum1.lod, datum2.lod);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import org.broadinstitute.sting.gatk.GenomeAnalysisEngine;
|
|||
import org.broadinstitute.sting.utils.collections.Pair;
|
||||
import org.broadinstitute.sting.utils.exceptions.StingException;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Comparator;
|
||||
import java.util.TreeSet;
|
||||
|
||||
|
|
@ -434,12 +435,14 @@ public class MannWhitneyU {
|
|||
* A comparator class which uses dithering on tie-breaking to ensure that the internal treeset drops no values
|
||||
* and to ensure that rank ties are broken at random.
|
||||
*/
|
||||
private static class DitheringComparator implements Comparator<Pair<Number,USet>> {
|
||||
private static class DitheringComparator implements Comparator<Pair<Number,USet>>, Serializable {
|
||||
|
||||
public DitheringComparator() {}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) { return false; }
|
||||
|
||||
@Override
|
||||
public int compare(Pair<Number,USet> left, Pair<Number,USet> right) {
|
||||
double comp = Double.compare(left.first.doubleValue(),right.first.doubleValue());
|
||||
if ( comp > 0 ) { return 1; }
|
||||
|
|
|
|||
Loading…
Reference in New Issue