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 *