diff --git a/advntr/vntr_finder.py b/advntr/vntr_finder.py index 5fe57a8..97cca06 100644 --- a/advntr/vntr_finder.py +++ b/advntr/vntr_finder.py @@ -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)