-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from compomics/use-ms2rescore_rs
Use Rust for parsing spectrum files
- Loading branch information
Showing
8 changed files
with
85 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
BEGIN IONS | ||
TITLE=peptide: peptide1 | ||
CHARGE=2+ | ||
PEPMASS=475.137295 | ||
ION_MOBILITY=42.42 | ||
RTINSECONDS=51.2 | ||
72.04439 100 | ||
148.06043 600 | ||
232.07504 300 | ||
263.08737 400 | ||
347.10198 500 | ||
423.11802 200 | ||
END IONS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import pytest | ||
from psm_utils import PSM, PSMList | ||
|
||
from ms2rescore.parse_spectra import get_missing_values | ||
|
||
|
||
def test_get_missing_values(): | ||
psm_list = PSMList( | ||
psm_list=[ | ||
PSM(peptidoform="PEPTIDEK/2", spectrum_id="peptide1"), | ||
] | ||
) | ||
get_missing_values( | ||
psm_list, | ||
config={ | ||
"spectrum_path": "tests/test_data/test.mgf", | ||
"spectrum_id_pattern": "peptide: (.*)", | ||
}, | ||
rt_required=True, | ||
im_required=True, | ||
) | ||
assert psm_list[0].retention_time == pytest.approx(0.853, 0.001) | ||
assert psm_list[0].ion_mobility == pytest.approx(42.42, 0.01) |