Skip to content

Commit

Permalink
Don't raise an error when motif not found
Browse files Browse the repository at this point in the history
  • Loading branch information
joannalange committed Feb 6, 2017
1 parent 4042506 commit 0562e10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,14 @@ def get_predicted_motifs(sequence, slims_all_classes, seq_go_terms):
if (not seq_go_terms or
set(seq_go_terms).intersection(set(slim_go_terms))):
if entry[3] == "False":
prob = 1 + 1/math.log(
prob = 1 + 1 / math.log(
slims_all_classes[slim_id]["prob"], 10)
if prob > 0:
limits.append([int(entry[1]), int(entry[2])])
elms_ids.append(entry[0])
probabilities.append(prob)
except KeyError:
print "Didn't find motif: {}".format(slim_id)
logging.warning("Didn't find motif: %s", slim_id)
except (urllib2.HTTPError, httplib.BadStatusLine):
print "can't get predicted motifs"
return [limits, elms_ids, probabilities]
Expand Down

0 comments on commit 0562e10

Please sign in to comment.