diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/ReferenceOrderedData.java b/java/src/org/broadinstitute/sting/gatk/refdata/ReferenceOrderedData.java index 8ca0b0c21..b4bf4afb4 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/ReferenceOrderedData.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/ReferenceOrderedData.java @@ -1,6 +1,9 @@ package org.broadinstitute.sting.gatk.refdata; import org.apache.log4j.Logger; +import org.broadinstitute.sting.gatk.refdata.tracks.RMDTrack; +import org.broadinstitute.sting.gatk.refdata.tracks.RMDTrackCreationException; +import org.broadinstitute.sting.gatk.refdata.tracks.RODRMDTrack; import org.broadinstitute.sting.oneoffprojects.refdata.HapmapVCFROD; import org.broadinstitute.sting.utils.StingException; import org.broadinstitute.sting.utils.Utils; @@ -17,7 +20,7 @@ import java.util.*; * Time: 10:47:14 AM * To change this template use File | Settings | File Templates. */ -public class ReferenceOrderedData implements Iterable> { +public class ReferenceOrderedData implements Iterable> { // }, RMDTrackBuilder { private String name; private File file = null; // private String fieldDelimiter; @@ -30,6 +33,31 @@ public class ReferenceOrderedData implements /** our log, which we want to capture anything from this class */ private static Logger logger = Logger.getLogger(ReferenceOrderedData.class); + /** @return a map of all available tracks we currently have access to create */ + //@Override + public Map getAvailableTrackNamesAndTypes() { + Map ret = new HashMap(); + for (RODBinding binding: Types.values()) + ret.put(binding.name, binding.type); + return ret; + } + + /** + * create a RMDTrack of the specified type + * + * @param targetClass the target class of track + * @param name what to call the track + * @param inputFile the input file + * + * @return an instance of the track + * @throws org.broadinstitute.sting.gatk.refdata.tracks.RMDTrackCreationException + * if we don't know of the target class or we couldn't create it + */ + //@Override + public RMDTrack createInstanceOfTrack(Class targetClass, String name, File inputFile) throws RMDTrackCreationException { + return new RODRMDTrack(targetClass, name, inputFile, parse1Binding(name,targetClass.getName(),inputFile.getAbsolutePath())); + } + // ---------------------------------------------------------------------- // diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/FeatureReaderTrack.java b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/FeatureReaderTrack.java index 71df8bb61..d9392f112 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/FeatureReaderTrack.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/FeatureReaderTrack.java @@ -2,7 +2,7 @@ * Copyright (c) 2010. The Broad Institute * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation - * Þles (the ÓSoftwareÓ), to deal in the Software without + * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/QueryableTrack.java b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/QueryableTrack.java index ee32e03d1..fecce12f6 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/QueryableTrack.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/QueryableTrack.java @@ -2,7 +2,7 @@ * Copyright (c) 2010. The Broad Institute * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation - * Þles (the ÓSoftwareÓ), to deal in the Software without + * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrack.java b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrack.java index 1d6d64429..89d1673b3 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrack.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrack.java @@ -2,7 +2,7 @@ * Copyright (c) 2010. The Broad Institute * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation - * Þles (the ÓSoftwareÓ), to deal in the Software without + * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackCreationException.java b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackCreationException.java index 8bab261a7..3dc0fb9bb 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackCreationException.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackCreationException.java @@ -2,7 +2,7 @@ * Copyright (c) 2010. The Broad Institute * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation - * Þles (the ÓSoftwareÓ), to deal in the Software without + * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackManager.java b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackManager.java index 5dfbf92a6..d8a82e05f 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackManager.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackManager.java @@ -2,7 +2,7 @@ * Copyright (c) 2010. The Broad Institute * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation - * Þles (the ÓSoftwareÓ), to deal in the Software without + * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RODRMDTrack.java b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RODRMDTrack.java index 0b7e67fbf..cd9f209c5 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RODRMDTrack.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RODRMDTrack.java @@ -2,7 +2,7 @@ * Copyright (c) 2010. The Broad Institute * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation - * Þles (the ÓSoftwareÓ), to deal in the Software without + * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/RMDTrackBuilder.java b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/RMDTrackBuilder.java index ce479446e..01c971acb 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/RMDTrackBuilder.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/RMDTrackBuilder.java @@ -2,7 +2,7 @@ * Copyright (c) 2010. The Broad Institute * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation - * Þles (the ÓSoftwareÓ), to deal in the Software without + * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilder.java b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilder.java index ead6b9be0..0a4882349 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilder.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilder.java @@ -2,7 +2,7 @@ * Copyright (c) 2010. The Broad Institute * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation - * Þles (the ÓSoftwareÓ), to deal in the Software without + * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/utils/FeatureToGATKFeatureIterator.java b/java/src/org/broadinstitute/sting/gatk/refdata/utils/FeatureToGATKFeatureIterator.java index 0d31fed75..ec75adbc4 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/utils/FeatureToGATKFeatureIterator.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/utils/FeatureToGATKFeatureIterator.java @@ -2,7 +2,7 @@ * Copyright (c) 2010. The Broad Institute * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation - * Þles (the ÓSoftwareÓ), to deal in the Software without + * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/utils/GATKFeature.java b/java/src/org/broadinstitute/sting/gatk/refdata/utils/GATKFeature.java index c3b3322d7..7c8b96559 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/utils/GATKFeature.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/utils/GATKFeature.java @@ -2,7 +2,7 @@ * Copyright (c) 2010. The Broad Institute * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation - * Þles (the ÓSoftwareÓ), to deal in the Software without + * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/utils/RMDTriplet.java b/java/src/org/broadinstitute/sting/gatk/refdata/utils/RMDTriplet.java index 5a6d6add6..7fe3b6731 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/utils/RMDTriplet.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/utils/RMDTriplet.java @@ -2,7 +2,7 @@ * Copyright (c) 2010. The Broad Institute * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation - * Þles (the ÓSoftwareÓ), to deal in the Software without + * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/varianteval2/VariantEval2Walker.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/varianteval2/VariantEval2Walker.java index c637cd076..4d2413f44 100755 --- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/varianteval2/VariantEval2Walker.java +++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/varianteval2/VariantEval2Walker.java @@ -1,23 +1,27 @@ package org.broadinstitute.sting.oneoffprojects.walkers.varianteval2; +import org.apache.log4j.Logger; import org.broadinstitute.sting.gatk.contexts.AlignmentContext; import org.broadinstitute.sting.gatk.contexts.ReferenceContext; -import org.broadinstitute.sting.gatk.contexts.variantcontext.VariantContextUtils; -import org.broadinstitute.sting.gatk.contexts.variantcontext.VariantContext; import org.broadinstitute.sting.gatk.contexts.variantcontext.MutableVariantContext; -import org.broadinstitute.sting.gatk.refdata.*; -import org.broadinstitute.sting.gatk.walkers.RodWalker; +import org.broadinstitute.sting.gatk.contexts.variantcontext.VariantContext; +import org.broadinstitute.sting.gatk.contexts.variantcontext.VariantContextUtils; import org.broadinstitute.sting.gatk.datasources.simpleDataSources.ReferenceOrderedDataSource; -import org.broadinstitute.sting.utils.*; -import org.broadinstitute.sting.utils.genotype.vcf.VCFWriter; +import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker; +import org.broadinstitute.sting.gatk.refdata.VariantContextAdaptors; +import org.broadinstitute.sting.gatk.walkers.RodWalker; +import org.broadinstitute.sting.utils.PackageUtils; +import org.broadinstitute.sting.utils.StingException; +import org.broadinstitute.sting.utils.Utils; import org.broadinstitute.sting.utils.cmdLine.Argument; -import org.apache.log4j.Logger; +import org.broadinstitute.sting.utils.genotype.vcf.VCFWriter; +import org.broadinstitute.sting.utils.xReadLines; -import java.util.*; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; import java.io.File; import java.io.FileNotFoundException; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.util.*; // todo -- evalations should support comment lines // todo -- add Mendelian variable explanations (nDeNovo and nMissingTransmissions) @@ -71,9 +75,9 @@ import java.io.FileNotFoundException; // todo Assume that the incoming VCF has the annotations (you don't need to do this) but VE2 should split up results by // todo these catogies automatically (using the default selects) // -// todo -- We agreed to report two standard values for variant evaluation from Êhere out. ÊOne, we will continue to report +// todo -- We agreed to report two standard values for variant evaluation from here out. One, we will continue to report // todo -- the dbSNP 129 rate. Additionally, we will start to report the % of variants found that have already been seen in -// todo -- 1000 Genomes. ÊThis should be implemented as another standard comp_1kg binding, pointing to only variants +// todo -- 1000 Genomes. This should be implemented as another standard comp_1kg binding, pointing to only variants // todo -- discovered and released by 1KG. Might need to make this data set ourselves and keep it in GATK/data like // todo -- dbsnp rod // diff --git a/java/test/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackManagerTest.java b/java/test/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackManagerTest.java index 1ee417b52..9f0f8e831 100644 --- a/java/test/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackManagerTest.java +++ b/java/test/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackManagerTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2010. The Broad Institute * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation - * Þles (the ÓSoftwareÓ), to deal in the Software without + * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the diff --git a/java/test/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilderTest.java b/java/test/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilderTest.java index dc8cd7369..5f3cfc08e 100644 --- a/java/test/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilderTest.java +++ b/java/test/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilderTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2010. The Broad Institute * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation - * Þles (the ÓSoftwareÓ), to deal in the Software without + * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the