diff --git a/bin/validate.py b/bin/validate.py index 6d465c82..b3279170 100755 --- a/bin/validate.py +++ b/bin/validate.py @@ -364,6 +364,7 @@ def make_gpads(dataset, gaf_path, products, ontology_graph, noctua_gpad_file, pa # If there's a noctua gpad file, process it if noctua_gpad_file: + click.echo("Making noctua gpad products...{}".format(noctua_gpad_file)) # Process noctua gpad file process_noctua_gpad_file(noctua_gpad_file, gpadwriter, ontology_graph) @@ -385,7 +386,9 @@ def process_noctua_gpad_file(noctua_gpad_file, gpadwriter, ontology_graph): with open(noctua_gpad_file) as nf: lines = sum(1 for line in nf) nf.seek(0) # Reset file pointer to the beginning after counting lines - gpadparser = GpadParser(config=assocparser.AssocParserConfig(ontology=ontology_graph, paint=False)) + gpadparser = GpadParser(config=assocparser.AssocParserConfig(ontology=ontology_graph, + paint=False, + rule_set="all")) click.echo("Making noctua gpad products...") with click.progressbar(iterable=gpadparser.association_generator(file=nf), length=lines) as associations: for association in associations: @@ -405,7 +408,9 @@ def process_gaf_file(gaf_path, gpadwriter, ontology_graph, paint_gaf_src): with open(gaf_path) as gf: lines = sum(1 for line in gf) gf.seek(0) # Reset file pointer to the beginning after counting lines - gafparser = GafParser(config=assocparser.AssocParserConfig(ontology=ontology_graph, paint=True)) + gafparser = GafParser(config=assocparser.AssocParserConfig(ontology=ontology_graph, + paint=True, + rule_set="all")) click.echo("Merging in source gaf to gpad product...") with click.progressbar(iterable=gafparser.association_generator(file=gf), length=lines) as associations: for association in associations: @@ -415,7 +420,9 @@ def process_gaf_file(gaf_path, gpadwriter, ontology_graph, paint_gaf_src): with open(paint_gaf_src) as pgf: lines = sum(1 for line in pgf) pgf.seek(0) - gafparser = GafParser(config=assocparser.AssocParserConfig(ontology=ontology_graph, paint=True)) + gafparser = GafParser(config=assocparser.AssocParserConfig(ontology=ontology_graph, + paint=True, + rule_set="all")) click.echo("Merging in paint gaf to gpad product...") with click.progressbar(iterable=gafparser.association_generator(file=pgf), length=lines) as associations: for association in associations: @@ -649,6 +656,7 @@ def produce(ctx, group, metadata_dir, gpad, ttl, target, ontology, exclude, base # Set paint to True when the group is "paint". # This will prevent filtering of IBA (GO_RULE:26) when paint is being treated as a top level group, # like for paint_other. + click.echo("source_gaf: {}".format(source_gaf)) valid_gaf = produce_gaf(dataset, source_gaf, ontology_graph, paint=(group == "paint"), group=group, diff --git a/ontobio/io/assocparser.py b/ontobio/io/assocparser.py index 3aa45274..8e85f352 100644 --- a/ontobio/io/assocparser.py +++ b/ontobio/io/assocparser.py @@ -532,7 +532,10 @@ def association_generator(self, file, skipheader=False, outfile=None) -> Dict: file = self._ensure_file(file) for line in file: parsed_result = self.parse_line(line) - self.report.report_parsed_result(parsed_result, outfile, self.config.filtered_evidence_file, self.config.filter_out_evidence) + self.report.report_parsed_result(parsed_result, + outfile, + self.config.filtered_evidence_file, + self.config.filter_out_evidence) for association in parsed_result.associations: # yield association if we don't care if it's a header or if it's definitely a real gaf line if not skipheader or not isinstance(association, dict): diff --git a/ontobio/io/qc.py b/ontobio/io/qc.py index e826d654..4b0993b1 100644 --- a/ontobio/io/qc.py +++ b/ontobio/io/qc.py @@ -919,7 +919,6 @@ def test(self, annotation: association.GoAssociation, config: assocparser.AssocP evidence = str(annotation.evidence.type) withfrom = annotation.evidence.with_support_from - if evidence in [iss_eco, isa_eco, iso_eco] and (withfrom is None or len(withfrom) == 0): return self._result(False)