forked from sneumann/RMassBank
-
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.
Fixing mz calculation for multiply-charged ions and negative atoms
- Loading branch information
Michele Stravs
committed
Mar 17, 2022
1 parent
27128b5
commit 7b780e2
Showing
4 changed files
with
47 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Package: RMassBank | ||
Type: Package | ||
Title: Workflow to process tandem MS files and build MassBank records | ||
Version: 3.5.2 | ||
Version: 3.5.2.1 | ||
Authors@R: c( | ||
person(given = "RMassBank at Eawag", email = "[email protected]", | ||
role=c("cre")), | ||
|
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,35 @@ | ||
# Test correct results of findMz.formula wiht positive and negative charge, | ||
# single and multiple charge, no charge, and fictitious negative atoms | ||
expect_equal(findMz.formula("C6", "")$mzCenter, 72) | ||
expect_equal( | ||
findMz.formula("C6", "mH")$mzCenter, | ||
72 - 1.0078 + RMassBank:::.emass, | ||
tolerance = 0.00001 ) | ||
expect_equal( | ||
findMz.formula("C6", "pH")$mzCenter, | ||
72 + 1.0078 - RMassBank:::.emass, | ||
tolerance = 0.00001 ) | ||
expect_equal( | ||
findMz.formula("C6H-1", "")$mzCenter, | ||
72 - 1.0078, | ||
tolerance = 0.00001 ) | ||
expect_equal( | ||
findMz.formula("C6H-1", "mM")$mzCenter, | ||
72 - 1.0078 + RMassBank:::.emass, | ||
tolerance = 0.00001 ) | ||
expect_equal( | ||
findMz.formula("C6H-1", "pM")$mzCenter, | ||
72 - 1.0078 - RMassBank:::.emass, | ||
tolerance = 0.00001 ) | ||
expect_equal( | ||
findMz.formula("C6", "m2H_c2")$mzCenter, | ||
(72 - (2*1.0078) + 2*RMassBank:::.emass) / 2, | ||
tolerance = 0.00001 ) | ||
expect_equal( | ||
findMz.formula("C6H-1", "m2H_c2")$mzCenter, | ||
(72 - (3*1.0078) + 2*RMassBank:::.emass) / 2, | ||
tolerance = 0.00001 ) | ||
|
||
|
||
|
||
|