Skip to content

Commit 0562e10

Browse files
committed
Don't raise an error when motif not found
1 parent 4042506 commit 0562e10

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/convert.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,14 +297,14 @@ def get_predicted_motifs(sequence, slims_all_classes, seq_go_terms):
297297
if (not seq_go_terms or
298298
set(seq_go_terms).intersection(set(slim_go_terms))):
299299
if entry[3] == "False":
300-
prob = 1 + 1/math.log(
300+
prob = 1 + 1 / math.log(
301301
slims_all_classes[slim_id]["prob"], 10)
302302
if prob > 0:
303303
limits.append([int(entry[1]), int(entry[2])])
304304
elms_ids.append(entry[0])
305305
probabilities.append(prob)
306306
except KeyError:
307-
print "Didn't find motif: {}".format(slim_id)
307+
logging.warning("Didn't find motif: %s", slim_id)
308308
except (urllib2.HTTPError, httplib.BadStatusLine):
309309
print "can't get predicted motifs"
310310
return [limits, elms_ids, probabilities]

0 commit comments

Comments
 (0)