Skip to content

Commit

Permalink
fixing line count to reflect gaf or gpad as appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
sierra-moxon committed Feb 7, 2024
1 parent cb75c2d commit 49a7efe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ See [command line docs](http://ontobio.readthedocs.io/en/latest/commandline.html
To test validate.py on a particular source:
```bash
poetry install
poetry run validate produce -m ../go-site/metadata --gpad -t [path/to/local/ontobio/checkout] -o go-basic.json --only-dataset mgi MGI
poetry run validate produce -m ../go-site/metadata --gpad -t [path/to/local/ontobio/checkout] -o go-basic.json --only-dataset goa_chicken goa
poetry run validate produce -m ../go-site/metadata --gpad -t [path/to/local/ontobio/clone] -o go-basic.json --only-dataset mgi MGI
poetry run validate produce -m ../go-site/metadata --gpad -t [path/to/local/ontobio/clone] -o go-basic.json --only-dataset goa_chicken goa
```
9 changes: 7 additions & 2 deletions bin/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,6 @@ def make_gpads(dataset, gaf_path, products, ontology_graph, noctua_gpad_file):
# Bail if we have no products
return []

with open(gaf_path) as sg:
lines = sum(1 for line in sg)

# logger.info("AssocParserConfig used: {}".format(config))
split_source = os.path.split(gaf_path)[0]
Expand All @@ -354,6 +352,10 @@ def make_gpads(dataset, gaf_path, products, ontology_graph, noctua_gpad_file):

print("noctua-gpad-file: {}".format(noctua_gpad_file))
if noctua_gpad_file is not None:

with open(noctua_gpad_file) as sg:
lines = sum(1 for line in sg)

with open(noctua_gpad_file) as nf:
gpadparser = GpadParser(config=assocparser.AssocParserConfig(
ontology=ontology_graph,
Expand All @@ -365,6 +367,9 @@ def make_gpads(dataset, gaf_path, products, ontology_graph, noctua_gpad_file):
for association in associations:
gpadwriter.write_assoc(association)

with open(gaf_path) as sg:
lines = sum(1 for line in sg)

with open(gaf_path) as gf:
gafparser = GafParser(config=assocparser.AssocParserConfig(
ontology=ontology_graph,
Expand Down

0 comments on commit 49a7efe

Please sign in to comment.