/** * * @param conf * @throws SLIB_Ex_Critic */ public FilterGraph_GAF2(Conf conf) throws SLIB_Ex_Critic { super(conf); String taxids = (String) conf.getParam(FilterGraph_GAF2_cst.TAXONS_IDS); String ecids = (String) conf.getParam(FilterGraph_GAF2_cst.REMOVE_EC); if (taxids != null) { addTaxons(Arrays.asList(taxids.split(","))); } if (ecids != null) { addECtoExclude(Arrays.asList(ecids.split(","))); } }
/** * * @param gconf * @return a filter * @throws SLIB_Ex_Critic */ public static Filter buildFilter(Conf gconf) throws SLIB_Ex_Critic { Filter f = null; String id = (String) gconf.getParam(XmlTags.ID_ATTR); String type = (String) gconf.getParam(XmlTags.TYPE_ATTR); if (id == null) { Util.error("Missing " + XmlTags.ID_ATTR + " in a filter specification"); } if (type == null) { Util.error("Missing " + XmlTags.TYPE_ATTR + " in a filter specification"); } if (!supportType(type)) { Util.error("Unsupported Filter type " + type + " found in filter '" + id + "' specification"); } if (type.equals(FilterGraph_GAF2_cst.TYPE)) { f = new FilterGraph_GAF2(gconf); } else if (type.equals(FilterGraph_Metrics_cst.TYPE)) { f = new FilterGraph_Metrics(gconf); } else // do not pass { throw new UnsupportedOperationException("Sorry, filter is not taking into account, please repor the issue"); } return f; }
logger.info("Filtering according to filter " + filter.getId() + "\ttype" + filter.getType()); taxons = filter.getTaxons(); excludedEC = filter.getExcludedEC();
logger.info("Filtering according to filter " + filter.getId() + "\ttype" + filter.getType()); taxons = filter.getTaxons(); excludedEC = filter.getExcludedEC();
/** * * @param conf * @throws SLIB_Ex_Critic */ public FilterGraph_GAF2(Conf conf) throws SLIB_Ex_Critic { super(conf); String taxids = (String) conf.getParam(FilterGraph_GAF2_cst.TAXONS_IDS); String ecids = (String) conf.getParam(FilterGraph_GAF2_cst.REMOVE_EC); if (taxids != null) { addTaxons(Arrays.asList(taxids.split(","))); } if (ecids != null) { addECtoExclude(Arrays.asList(ecids.split(","))); } }
/** * * @param gconf * @return a filter * @throws SLIB_Ex_Critic */ public static Filter buildFilter(Conf gconf) throws SLIB_Ex_Critic { Filter f = null; String id = (String) gconf.getParam(XmlTags.ID_ATTR); String type = (String) gconf.getParam(XmlTags.TYPE_ATTR); if (id == null) { Util.error("Missing " + XmlTags.ID_ATTR + " in a filter specification"); } if (type == null) { Util.error("Missing " + XmlTags.TYPE_ATTR + " in a filter specification"); } if (!supportType(type)) { Util.error("Unsupported Filter type " + type + " found in filter '" + id + "' specification"); } if (type.equals(FilterGraph_GAF2_cst.TYPE)) { f = new FilterGraph_GAF2(gconf); } else if (type.equals(FilterGraph_Metrics_cst.TYPE)) { f = new FilterGraph_Metrics(gconf); } else // do not pass { throw new UnsupportedOperationException("Sorry, filter is not taking into account, please repor the issue"); } return f; }