def get_distributions(reads_by_LR):
LRs = []
global barcode_overlap,LRs_by_barcode
LRs_by_barcode = collections.defaultdict(list)
barcode_overlap = collections.defaultdict(int)
for key,reads in iteritems(reads_by_LR):
chrom,barcode = key
barcode_LRS = linked_reads(reads,chrom)
LRs += barcode_LRS
LRs_by_barcode[barcode] += barcode_LRS
for barcode,barcode_LRS in iteritems(LRs_by_barcode):
if len(barcode_LRS) > 1:
get_overlap(barcode_LRS)
if len(LRs) < 100:
return None,None,None
p_rate = get_rate_distr(LRs)
p_len = get_length_distr(LRs)
return p_len,p_rate,barcode_overlap
评论列表
文章目录