Repository 'unipept'
hg clone https://toolshed.g2.bx.psu.edu/repos/galaxyp/unipept

Changeset 6:9aaa46d45472 (2020-06-02)
Previous changeset 5:917fd3ebc223 (2020-04-30) Next changeset 7:75b3b3d0adbf (2021-04-06)
Commit message:
"planemo upload for repository http://unipept.ugent.be/apidocs commit 228074586987e33782b8c2faf61257ac7506e51e"
modified:
unipept.py
b
diff -r 917fd3ebc223 -r 9aaa46d45472 unipept.py
--- 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))