dieterich-lab / rp-bp

Rp-Bp is a Bayesian approach to predict, at base-pair resolution, ribosome occupancy and translation.
MIT License
7 stars 5 forks source link

Changed position of 2 strings of code #123

Closed piterand closed 1 year ago

piterand commented 1 year ago

Fixed the position of two strings of code. In the code, you trying to use the variables before the declaration.

eboileau commented 1 year ago

I think this piece of code was correct, see comment on #122, but you're right here we're referencing start_positions and end_positions before declaration if use_entire_profile is True. But we need to redefine both of them after the if\else block, since if False, mask_starts/mask_ends are redefined.

piterand commented 1 year ago

I think this piece of code was correct, see comment on #122, but you're right here we're referencing start_positions and end_positions before declaration if use_entire_profile is True. But we need to redefine both of them after the if\else block, since if False, mask_starts/mask_ends are redefined.

start_positions and end_positions used only in if block. And then they are not used anywhere else. But start_counts and end_counts we calculate after if-else block.

eboileau commented 1 year ago

... you're right!