Skip to content

Commit

Permalink
output isoform if avaiable as subject
Browse files Browse the repository at this point in the history
  • Loading branch information
sierra-moxon committed Mar 13, 2024
1 parent 1c4120b commit b347f61
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ poetry run validate produce -m ../go-site/metadata --gpad -t . -o go-basic.json

To test whether a GAF file is valid (passes all the GORules):
```bash
poetry install
poetry run python3 ontobio-parse-assocs.py --file [path_to_file.gaf] --format GAF -o mgi_valid.gaf --report-md mgi.report.md -r [path_to_go.json] -l all validate
```
8 changes: 8 additions & 0 deletions ontobio/model/association.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,14 @@ def to_gpad_2_0_tsv(self) -> List:
"""

props_list = ["{key}={value}".format(key=key, value=value) for key, value in self.properties]
gp_isoforms = None
print("before conversion", self.subject.id)
if self.subject_extensions:
gp_isoforms = self.subject_extensions[0].term
if gp_isoforms:
self.subject.id = gp_isoforms
print("after conversion", self.subject.id)

return [
str(self.subject.id),
"NOT" if self.negated else "",
Expand Down

0 comments on commit b347f61

Please sign in to comment.