Skip to content

Commit

Permalink
fix addmodel bug with no false read
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdadbakhtiari committed Mar 24, 2019
1 parent 962232b commit ad717c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions advntr/vntr_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,8 @@ def find_recruitment_score_threshold(self, processed_true_reads, processed_false
from sklearn.linear_model import LogisticRegression
true_scores = [read.logp for read in processed_true_reads]
false_scores = [read.logp for read in processed_false_reads]
if len(false_scores) == 0:
false_scores = [min(true_scores) - 2]
clf = LogisticRegression()
x = [[score] for score in true_scores + false_scores]
y = [1] * len(true_scores) + [0] * len(false_scores)
Expand Down

0 comments on commit ad717c3

Please sign in to comment.