Skip to content

Commit

Permalink
more even assignment to the cores
Browse files Browse the repository at this point in the history
  • Loading branch information
iprada committed Oct 16, 2019
1 parent 6d6ae3b commit e7f1bf2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions circlemap/realigner.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,7 @@ def realign(self,peaks):
if read.is_read2 == False:
if read.next_reference_start < read.reference_start:
disorcordants_per_it +=1
iteration_discordants.append([interval['chrom'], read.next_reference_start,read.reference_start+read.infer_query_length(),
read.qname])
iteration_discordants.append([interval['chrom'], read.next_reference_start,read.reference_start+read.infer_query_length(), read.qname])


#second pass to add discordant read info
Expand Down Expand Up @@ -400,6 +399,7 @@ def realign(self,peaks):
ecc_dna.close()
genome_fa.close()


# Write process output to disk
output = iteration_merge(only_discordants,results,
self.overlap_fraction,self.split,self.score,
Expand Down
9 changes: 7 additions & 2 deletions circlemap/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,15 @@ def bam_circ_sv_peaks(bam,input_bam_name,cores,verbose,pid,clusters):
while w_start < int(interval[2]):
splitted = [interval.chrom, str(w_start), str(w_start + 300)]
w_start += 300
split_peaks[counter].append(splitted)
if counter == chunks:
counter = 0
split_peaks[counter].append(splitted)
else:
split_peaks[counter].append(splitted)
counter +=1
else:
split_peaks[counter].append([interval.chrom, str(interval.start), str(interval.end)])
counter += 1
counter += 1


return(sorted_bam,split_peaks)
Expand Down

0 comments on commit e7f1bf2

Please sign in to comment.