diff --git a/build.xml b/build.xml
index 232b074f6..66d99ac67 100644
--- a/build.xml
+++ b/build.xml
@@ -927,8 +927,8 @@
-
-
+
+
diff --git a/public/java/src/org/broadinstitute/sting/utils/variantcontext/Genotype.java b/public/java/src/org/broadinstitute/sting/utils/variantcontext/Genotype.java
index b100d6da5..1691129c9 100755
--- a/public/java/src/org/broadinstitute/sting/utils/variantcontext/Genotype.java
+++ b/public/java/src/org/broadinstitute/sting/utils/variantcontext/Genotype.java
@@ -12,7 +12,7 @@ import java.util.*;
*
* @author Mark DePristo
*/
-public class Genotype {
+public class Genotype implements Comparable {
public final static String PHASED_ALLELE_SEPARATOR = "|";
public final static String UNPHASED_ALLELE_SEPARATOR = "/";
@@ -351,4 +351,14 @@ public class Genotype {
public int getAttributeAsInt(String key, int defaultValue) { return commonInfo.getAttributeAsInt(key, defaultValue); }
public double getAttributeAsDouble(String key, double defaultValue) { return commonInfo.getAttributeAsDouble(key, defaultValue); }
public boolean getAttributeAsBoolean(String key, boolean defaultValue) { return commonInfo.getAttributeAsBoolean(key, defaultValue); }
+
+ /**
+ * comparable genotypes -> compareTo on the sample names
+ * @param genotype
+ * @return
+ */
+ @Override
+ public int compareTo(final Genotype genotype) {
+ return getSampleName().compareTo(genotype.getSampleName());
+ }
}
\ No newline at end of file