/**
* Answers true if the field id is matched by any of the filter patterns, else
- * false. Matching is against regular expression patterns, and is not
- * case-sensitive.
+ * false. Matching is against non-case-sensitive regular expression patterns.
*
* @param id
* @param filters
{
for (Pattern p : filters)
{
- if (p.matcher(id.toUpperCase()).matches())
+ if (p.matcher(id).matches())
{
return true;
}
* Reads the Preference value for the given key, with default specified if no
* preference set. The value is interpreted as a comma-separated list of
* regular expressions, and converted into a list of compiled patterns ready
- * for matching. Patterns are forced to upper-case for non-case-sensitive
- * matching.
+ * for matching. Patterns are set to non-case-sensitive matching.
* <p>
* This supports user-defined filters for fields of interest to capture while
* processing data. For example, VCF_FIELDS = AF,AC* would mean that VCF INFO
{
try
{
- patterns.add(Pattern.compile(token.toUpperCase()));
+ patterns.add(Pattern.compile(token, Pattern.CASE_INSENSITIVE));
} catch (PatternSyntaxException e)
{
System.err.println("Invalid pattern ignored: " + token);
}
/*
- * filter out fields we don't want to capture
- */
- if (!vcfFieldsOfInterest.contains(key))
- {
- continue;
- }
-
- /*
* we extract values for other data which are allele-specific;
* these may be per alternate allele (INFO[key].Number = 'A')
* or per allele including reference (INFO[key].Number = 'R')