Repository 'blast2html'
hg clone https://toolshed.g2.bx.psu.edu/repos/jankanis/blast2html

Changeset 101:5bfaa3ee1f27 (2014-07-01)
Previous changeset 100:be7c94e29cd8 (2014-07-01) Next changeset 102:87c5402e0ba8 (2014-07-01)
Commit message:
better warning message
modified:
blast2html.py
b
diff -r be7c94e29cd8 -r 5bfaa3ee1f27 blast2html.py
--- a/blast2html.py Tue Jul 01 16:23:29 2014 +0200
+++ b/blast2html.py Tue Jul 01 16:51:38 2014 +0200
b
@@ -382,8 +382,9 @@
 def read_genelinks(dir):
     links = {}
     # blastdb.loc, blastdb_p.loc, blastdb_d.loc, etc.
-    # sort reversed, so blastdb.loc will take precedence
-    for f in sorted(glob.glob(path.join(dir, 'blastdb*.loc')), reverse=True): 
+    files = sorted(glob.glob(path.join(dir, 'blastdb*.loc')))
+    # reversed, so blastdb.loc will take precedence
+    for f in reversed(files):
         try:
             f = open(path.join(dir, f))
             for l in f.readlines():
@@ -398,7 +399,7 @@
         except OSError:
             continue
     if not links:
-        warnings.warn("No gene bank link templates found")
+        warnings.warn("No gene bank link templates found in {0}".format(', '.join(files))
     return links