Skip to content

Commit

Permalink
Add warning about too few molecules
Browse files Browse the repository at this point in the history
  • Loading branch information
pontushojer committed Aug 22, 2023
1 parent 62c2c90 commit 1482f54
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/naibr/distributions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import collections
import itertools
import logging
import os

import matplotlib as mpl
Expand All @@ -15,6 +16,8 @@

mpl.use("Agg")

logger = logging.getLogger(__name__)


class NegBin:
def __init__(self, p=0.1, r=10):
Expand Down Expand Up @@ -152,6 +155,7 @@ def get_linkedread_distributions(linkedreads_by_barcode, configs):
get_pairwise_overlap(barcode_linkedreads, barcode_overlap, configs)

if len(linkedreads) < 100:
logger.warning("Too few linked reads to estimate distributions")
return None, None, None

p_rate = get_rate_distr(linkedreads)
Expand Down

0 comments on commit 1482f54

Please sign in to comment.