From 58105636c8117ef2591dbd450b335eebd8582ccd Mon Sep 17 00:00:00 2001 From: depristo Date: Sat, 12 Sep 2009 19:07:57 +0000 Subject: [PATCH] getBoundRods() convenience method git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1595 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/gatk/refdata/RefMetaDataTracker.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/RefMetaDataTracker.java b/java/src/org/broadinstitute/sting/gatk/refdata/RefMetaDataTracker.java index 949c1c7c5..79661b899 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/RefMetaDataTracker.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/RefMetaDataTracker.java @@ -4,6 +4,7 @@ import org.apache.log4j.Logger; import java.util.Collection; import java.util.HashMap; +import java.util.LinkedList; /** * This class represents the Reference Metadata available at a particular site in the genome. It can be @@ -85,6 +86,22 @@ public class RefMetaDataTracker { return map.values(); } + /** + * Get all of the RODs at the current site + * + * @return + */ + public Collection getBoundRods() { + LinkedList bound = new LinkedList(); + + for ( ReferenceOrderedDatum value : map.values() ) { + if ( value != null ) + bound.add(value); + } + + return bound; + } + /** * Binds the reference ordered datum ROD to name at this site. Should be used only but the traversal * system to provide access to RODs in a structured way to the walkers.