diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/tags/Param.java b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/tags/Param.java deleted file mode 100755 index 544dfae0a..000000000 --- a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/tags/Param.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.broadinstitute.sting.gatk.walkers.varianteval.tags; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -/** - * @author aaron - *

- * Annotation Param - *

- * a description annotation for a parameter; a variable used as input to the - * analysis, but not (nessasarally) an output. Some formats will store this - * information in comments, others will not include it. - */ -@Retention(RetentionPolicy.RUNTIME) -public @interface Param { - String name() default ""; // the name, defaulted to the variable name - String description(); // the description of the parameter -} diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/AnalysisModuleScanner.java b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/AnalysisModuleScanner.java index e7179427b..c8d917040 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/AnalysisModuleScanner.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/AnalysisModuleScanner.java @@ -25,7 +25,6 @@ package org.broadinstitute.sting.gatk.walkers.varianteval.util; import org.broadinstitute.sting.gatk.walkers.varianteval.tags.Analysis; import org.broadinstitute.sting.gatk.walkers.varianteval.tags.DataPoint; -import org.broadinstitute.sting.gatk.walkers.varianteval.tags.Param; import org.broadinstitute.sting.utils.exceptions.ReviewedStingException; import java.lang.annotation.Annotation; @@ -45,7 +44,6 @@ import java.util.Map; public class AnalysisModuleScanner { // what we extracted from the class - private Map parameters = new LinkedHashMap(); // the parameter annotations private Map datums = new LinkedHashMap(); // the data we've discovered private Analysis analysis; // the analysis annotation @@ -89,22 +87,12 @@ public class AnalysisModuleScanner { for ( Class superCls = cls; superCls != null; superCls=superCls.getSuperclass() ) { for (Field f : superCls.getDeclaredFields()) for (Annotation annotation : f.getAnnotations()) { - if (annotation.annotationType().equals(Param.class)) - parameters.put(f, (Param) annotation); if (annotation.annotationType().equals(DataPoint.class)) datums.put(f,(DataPoint) annotation); } } } - /** - * - * @return get the list of parameters we found - */ - public Map getParameters() { - return parameters; - } - /** * * @return a map of the datum annotations found diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/ComplexDataUtils.java b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/ComplexDataUtils.java deleted file mode 100755 index aa8dfcc10..000000000 --- a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/ComplexDataUtils.java +++ /dev/null @@ -1,137 +0,0 @@ -package org.broadinstitute.sting.gatk.walkers.varianteval.util; - -import java.lang.reflect.Field; - - -/** - * @author aaron - *

- * Class ComplexDataUtils - *

- * This class contains methods and techniques for breaking down complex data in the output system - */ -public class ComplexDataUtils { - public static Object resolveObject(Field f, Object e) { - //try { - //return f.toGenericString(); - //return f.getName(); //f.get(e); - - - - //} catch (IllegalAccessException e1) { - // throw new ReviewedStingException("Unable to access field " + f); - //} - return null; - } - - /* - private static String extractPlainObjectOrPrimitive(Object obj) { - String value = ""; - if (obj instanceof Float || obj instanceof Double) - value = String.format("%.4f",(Double)obj); - else - value = obj.toString(); - - return value; - } - */ - - - /** - * convert any string -> object pairing into a string keyed tree - * - * @param obj the object - * @return a mapping of the name to the associated value tree. All non-leaf nodes will be Strings - */ - /* - public static Collection resolveObjects(Object obj) { // TODO: fix this, we need a way to get the name of the list from the data point - Collection nodes = new ArrayList(); - - // the simplest case, the object is null - if (obj == null) nodes.add(new Node("", "", "")); - // capture objects of type TableTable - else if (obj instanceof TableType) - nodes.add(tableToNode((TableType) obj, ((TableType) obj).getName())); - - // try to handle maps - else if (obj instanceof Map) { - throw new UnsupportedOperationException("The report generation system is currently unable to output Maps, due to their ambiguity"); - - // handle collections - } else if (obj instanceof Collection) - nodes.addAll(listToNode((Collection) obj, "collection")); - - // arrays - else if (obj.getClass().isArray()) - nodes.addAll(listToNode(Arrays.asList(obj), "array")); - - // else we have a simple object (at least try to handle it that way - else - nodes.add(extractPlainObjectOrPrimitive(obj.getClass().getSimpleName(),obj)); - - // return the collection of nodes we've parsed out - return nodes; - } - */ - - /** - * extract a (hopefully) primitive value - * @param obj the object - */ - /* - private static Node extractPlainObjectOrPrimitive(String name, Object obj) { - String value = ""; - if (obj instanceof Float || obj instanceof Double) - value = String.format("%.4f",(Double)obj); - else - value = obj.toString(); - return new Node(name, value, "value"); - } - */ - - /** - * given a TableType object, make it into a tree using maps. - * - * @param table the table type to convert into a map - * @return a node representing this table - */ - /* - private static Node tableToNode(TableType table, String name) { - Node root = new Node("table", name, "Table"); - root.setTable(); - Object[] rows = table.getRowKeys(); - Object[] cols = table.getColumnKeys(); - - // add the columns names - for (int x = 0; x < table.getRowKeys().length; x++) { - Node row = new Node("row", rows[x].toString(), "a row in a table"); - root.addChild(row); - for (int y = 0; y < table.getColumnKeys().length; y++) { - Node col = new Node("column", cols[y].toString(), "columns in a table"); - row.addChild(col); - col.addChild(extractPlainObjectOrPrimitive("cell(" + x + "," + y + ")", table.getCell(x, y))); - } - } - return root; - } - */ - - /** - * given a Collection object, make it into a tree using maps. - * - * @param coll the collection to iterate, and turn into a list - * @return a mapping of String to Object - */ - /* - private static Collection listToNode(Collection coll, String name) { - Collection nodes = new ArrayList(); - Iterator iter = coll.iterator(); - for (int x = 0; x < coll.size(); x++) { - Node value = new Node("column " + x, String.valueOf(x), "column"); - value.addChild(new Node("value " + x, iter.next().toString(), "value")); - nodes.add(value); - } - return nodes; - } - */ -}