Filter application order is now deterministic, in the order defined by the walker

-- For no apparent reason we were using a HashSet to store the ReadFilters, so the order of operations was really arbitrarily applied.  The order now is

(1) the order of the walker intrinsic filters
(2) read group black list (if provided)
(3) command line filters (if provided)
This commit is contained in:
Mark DePristo 2011-10-06 18:51:40 -07:00
parent 0b88af4af9
commit c7864c7256
1 changed files with 3 additions and 4 deletions

View File

@ -257,13 +257,12 @@ public class GenomeAnalysisEngine {
* @return A collection of available filters.
*/
public Collection<ReadFilter> createFilters() {
Set<ReadFilter> filters = new HashSet<ReadFilter>();
filters.addAll(WalkerManager.getReadFilters(walker,this.getFilterManager()));
final List<ReadFilter> filters = WalkerManager.getReadFilters(walker,this.getFilterManager());
if (this.getArguments().readGroupBlackList != null && this.getArguments().readGroupBlackList.size() > 0)
filters.add(new ReadGroupBlackListFilter(this.getArguments().readGroupBlackList));
for(String filterName: this.getArguments().readFilters)
for(final String filterName: this.getArguments().readFilters)
filters.add(this.getFilterManager().createByName(filterName));
return Collections.unmodifiableSet(filters);
return Collections.unmodifiableList(filters);
}
/**