diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/variantcontext/AttributedObject.java b/java/src/org/broadinstitute/sting/oneoffprojects/variantcontext/AttributedObject.java
index 3a761d65e..f28d0a278 100755
--- a/java/src/org/broadinstitute/sting/oneoffprojects/variantcontext/AttributedObject.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/variantcontext/AttributedObject.java
@@ -7,13 +7,11 @@ import java.util.*;
/**
+ * Common superclass of VariantContext and Genotype
+ *
* @author depristo
- *
- * Class AttributedObject
- *
- * Common functions in VariantContext
*/
-public class AttributedObject {
+public abstract class AttributedObject {
public static final double NO_NEG_LOG_10PERROR = 0.0;
private double negLog10PError = NO_NEG_LOG_10PERROR;
private Set filters = new HashSet();
@@ -61,7 +59,7 @@ public class AttributedObject {
filters.add(filter);
}
- public void addFilters(Collection extends Object> filters) {
+ public void addFilters(Collection> filters) {
if ( filters == null ) throw new IllegalArgumentException("BUG: Attempting to add null filters at" + this);
for ( Object f : filters )
addFilter(f);
@@ -71,7 +69,7 @@ public class AttributedObject {
filters.clear();
}
- public void setFilters(Collection extends Object> filters) {
+ public void setFilters(Collection> filters) {
clearFilters();
addFilters(filters);
}
@@ -169,14 +167,14 @@ public class AttributedObject {
return defaultValue;
}
- public AttributedObject getAttributes(Collection keys) {
- AttributedObject selected = new AttributedObject();
-
- for ( Object key : keys )
- selected.putAttribute(key, this.getAttribute(key));
-
- return selected;
- }
+// public AttributedObject getAttributes(Collection keys) {
+// AttributedObject selected = new AttributedObject();
+//
+// for ( Object key : keys )
+// selected.putAttribute(key, this.getAttribute(key));
+//
+// return selected;
+// }
public String getAttributeAsString(Object key) { return (String)getAttribute(key); }
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/variantcontext/Genotype.java b/java/src/org/broadinstitute/sting/oneoffprojects/variantcontext/Genotype.java
index 783b446ac..7435c157d 100755
--- a/java/src/org/broadinstitute/sting/oneoffprojects/variantcontext/Genotype.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/variantcontext/Genotype.java
@@ -20,6 +20,13 @@ public class Genotype extends AttributedObject {
// todo -- pass around both a Variant Context and genotypes. Although users can always just package up
// the associated genotypes into the VC itself.
+ // todo -- this should really be something like subcontext -- fixme, maybe move into converter code
+
+ // todo -- add flat variant manager class that is available via refmetadatatracker and provides simple
+ // access to VariantContexts that can be obtained from rod tracks. Add simple functions to get
+ // first record, all records, only those starting at current locus, etc. to deal with dbSNP monstrosity
+
+ // todo -- add name to variant context
public Genotype(VariantContext vc, List alleles, String sampleName, double negLog10PError) {
this(resolveAlleles(vc, alleles), sampleName, negLog10PError);
}
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/variantcontext/VariantContext.java b/java/src/org/broadinstitute/sting/oneoffprojects/variantcontext/VariantContext.java
index a58903f9f..8bbadb53a 100755
--- a/java/src/org/broadinstitute/sting/oneoffprojects/variantcontext/VariantContext.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/variantcontext/VariantContext.java
@@ -182,8 +182,25 @@ public class VariantContext extends AttributedObject {
if ( loc == null ) { throw new StingException("GenomeLoc cannot be null"); }
this.loc = loc;
- }
+ } A
+ // todo Add Allele... alleles syntax
+
+ // todo Make root of VariantContext and Genotype immutatable, but extend the system to have MutableVariantContext
+ // and MutableGenotype, providing mutation operations. Then provide .freeze() method on mutable objects to
+ // make them immutable
+
+ // todo -- - I'm personally not a huge fan of blanket types like Type.UNDETERMINED, especially when the types are
+ // todo public and you have to add 'DON'T USE THIS' to the Javadoc. Couldn't you use null to represent this type instead?
+
+ // todo wrap collections that are returned directly so that users can't modify them. return Collections.unmodifiableSet()
+
+ // todo -- rename I'm uncomfortable with the entire AttributedObject system. The name Object is too general for the application. The name AttributedObject suggests that it can be used to add attributes to any object, much like Lisp property lists. However, it contains a negLog10PError member, making the class only applicable to variants.
+
+ // todo move all of attribute object attributes into Map<> and make special filter value for printing out values when
+ // emitting VC -> VCF or whatever
+
+ // todo -- Map in attributed object instead of Map
public VariantContext(GenomeLoc loc, Collection alleles) {
this(loc, alleles, (Map)null);
}