Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug in get_frame_indices #389

Merged
merged 3 commits into from
Nov 28, 2024
Merged
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
2 changes: 1 addition & 1 deletion alphadia/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ def get_frame_indices(
optimal_cycle_limits[0] = precursor_cycle_max_index - optimal_len

if optimal_cycle_limits[0] < 0:
optimal_cycle_limits[0] = 0
optimal_cycle_limits[0] = 0 if precursor_cycle_max_index % 2 == 0 else 1

# Convert back to frame indices
frame_limits = optimal_cycle_limits * cycle_len + zeroth_frame
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ numba==0.59.1
argparse==1.4.0
alpharaw==0.4.5
alphatims==1.0.8
alphabase==1.4.0 # test: tolerate_version
alphabase==1.4.2 # test: tolerate_version
peptdeep==1.3.0 # test: tolerate_version
progressbar==2.5
neptune==1.10.4
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def test_get_frame_indices_optimization_left_min_size_overflow(mock_alpha_raw_ji
optimize_size = 4
min_size = 1000
rt_values = np.array([90.0, 95.0], dtype=np.float32)
expected_indices = np.array([[0, 95, 1]], dtype=np.int64)
expected_indices = np.array([[5, 95, 1]], dtype=np.int64)

# when
frame_indices = mock_alpha_raw_jit.get_frame_indices(
Expand Down
Loading