From 7e30fe230aab4204ff9508105c633fb102705682 Mon Sep 17 00:00:00 2001 From: depristo Date: Tue, 10 Nov 2009 13:25:18 +0000 Subject: [PATCH] oops, missing file git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2009 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/utils/genotype/vcf/VCFRecord.java | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFRecord.java b/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFRecord.java index aa9387ad7..df9675f89 100644 --- a/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFRecord.java +++ b/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFRecord.java @@ -220,17 +220,21 @@ public class VCFRecord { } public boolean isFiltered() { - String[] codes = getFilteringCodes(); - if ( codes.length > 1 ) return true; - else if ( codes[0].equals(".") || codes[0].equals("0") ) return false; - else return true; + String[] codes = getFilteringCodes(); + if ( codes.length > 1 ) return true; + else if ( codes[0].equals(".") || codes[0].equals("0") ) return false; + else return true; } public boolean hasFilteringCodes() { - // todo --- currently always returns true + // todo --- currently always returns true return getFilteringCodes() != null; } + public String getFilterString() { + return mFilterString; + } + /** * get the information key-value pairs as a Map<> * @@ -333,6 +337,17 @@ public class VCFRecord { this.mInfoFields.put(key, value); } + + /** + * add an info field to the record + * + * @param m A map from info keys to info values + */ + public void addInfoFields(Map m) { + for ( Map.Entry e : m.entrySet() ) + addInfoField(e.getKey(), e.getValue()); + } + /** * the generation of a string representation, which is used by the VCF writer *