Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/get_reads.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def make_barcodeDict(chrom):
disc_mate_pairs = dict()
split_reads = collections.defaultdict(list)
LRs_by_pos = collections.defaultdict(list)
lengths = sum(reads.lengths)
iterator = reads.fetch(chrom)
starttime = time.time()
prevtime = starttime
Expand Down
9 changes: 5 additions & 4 deletions src/global_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,18 @@ def estimate_lmin_lmax():
num = 0
for i,chrm in enumerate(reads.references):
for read in reads.fetch(chrm):
if read.is_unmapped or read.mate_is_unmapped:
continue

num += 1
if num > 1000000:
break
if read.query_name in mate_pairs:
if read.reference_start > mate_pairs[read.query_name][0]:
dist = read.reference_start-mate_pairs[read.query_name][1]
else:
try:
dist = mate_pairs[read.query_name][0]-read.reference_end
except:
pass
dist = mate_pairs[read.query_name][0]-read.reference_end

if abs(dist) < 2000:
length.append(read.query_length)
ls.append(dist)
Expand Down