changeset 6:9aaa46d45472 draft

"planemo upload for repository http://unipept.ugent.be/apidocs commit 228074586987e33782b8c2faf61257ac7506e51e"
author galaxyp
date Tue, 02 Jun 2020 10:30:01 -0400
parents 917fd3ebc223
children 75b3b3d0adbf
files unipept.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/unipept.py	Thu Apr 30 07:39:28 2020 -0400
+++ b/unipept.py	Tue Jun 02 10:30:01 2020 -0400
@@ -337,7 +337,7 @@
                     ec_numbers.append(ec['ec_number'])
                     protein_counts.append(str(ec['protein_count']))
                     if extra:
-                        ec_names.append(ec['name'] if 'name' in ec else '')
+                        ec_names.append(ec['name'] if 'name' in ec and ec['name'] else '')
             vals = [','.join(ec_numbers), ','.join(protein_counts)]
             if extra:
                 vals.append(','.join(ec_names))
@@ -360,7 +360,7 @@
                         go_terms.append(go['go_term'])
                         protein_counts.append(str(go['protein_count']))
                         if extra:
-                            go_names.append(go['name'] if 'name' in go else '')
+                            go_names.append(go['name'] if 'name' in go and go['name'] else '')
                     else:
                         for go_type in go_types:
                             if go_type in go:
@@ -368,7 +368,7 @@
                                     go_terms.append(_go['go_term'])
                                     protein_counts.append(str(_go['protein_count']))
                                     if extra:
-                                        go_names.append(_go['name'] if 'name' in _go else '')
+                                        go_names.append(_go['name'] if 'name' in _go and _go['name'] else '')
             vals = [','.join(go_terms), ','.join(protein_counts)]
             if extra:
                 vals.append(','.join(go_names))