Skip to content

Commit

Permalink
used rsplit instead of a function in tophat-fusion-post.patch, should…
Browse files Browse the repository at this point in the history
… be faster than before
  • Loading branch information
byb121 committed Oct 11, 2019
1 parent b336feb commit f848d51
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions build/patches/tophat-fusion-post.patch
Original file line number Diff line number Diff line change
Expand Up @@ -787,13 +787,8 @@ def filter_fusion(bwt_idx_prefix, params):
max_intron_len = min(max_intron_len, abs(coord1 - coord2) * 9 / 10)

same = False

def split_chr_coord(chr_coord):
coord = chr_coord.split(':')[-1]
return chr_coord.rstrip(':' + coord), coord

for chr_coord in left_chrs:
chr, coord = split_chr_coord(chr_coord)
chr, coord = chr_coord.rsplit(':', 1)
coord = int(coord)
if chr == chr2 and abs(coord - coord2) < max_intron_len:
same = True
Expand All @@ -803,7 +798,7 @@ def filter_fusion(bwt_idx_prefix, params):
continue

for chr_coord in right_chrs:
chr, coord = split_chr_coord(chr_coord)
chr, coord = chr_coord.rsplit(':', 1)
coord = int(coord)
if chr == chr1 and abs(coord - coord1) < max_intron_len:
same = True
Expand Down

0 comments on commit f848d51

Please sign in to comment.