Skip to content

Commit a51301c

Browse files
committed
Small fixes
1 parent 6ccb033 commit a51301c

File tree

3 files changed

+3
-28
lines changed

3 files changed

+3
-28
lines changed

rustyms/src/align/bad_alignments.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#![allow(clippy::missing_panics_doc)]
22

33
use crate::{
4-
align::{align, matrix, AlignType},
5-
LinearPeptide, SimpleLinear, Tolerance,
4+
align::{align, AlignScoring, AlignType},
5+
LinearPeptide, SimpleLinear,
66
};
77

88
#[test]
@@ -22,8 +22,7 @@ fn test_alignment(peptide_one: &str, peptide_two: &str, path: &str) {
2222
let alignment = align::<4, SimpleLinear, SimpleLinear>(
2323
&first_peptide,
2424
&second_peptide,
25-
matrix::BLOSUM62,
26-
Tolerance::new_ppm(10.0),
25+
AlignScoring::default(),
2726
AlignType::GLOBAL,
2827
);
2928
assert_eq!(

rustyms/src/modification.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -169,30 +169,6 @@ impl SimpleModificationInner {
169169
}
170170
}
171171

172-
/// Internal formula code with the logic to make all labels right
173-
pub(crate) fn formula_inner(
174-
&self,
175-
sequence_index: SequencePosition,
176-
peptide_index: usize,
177-
) -> MolecularFormula {
178-
match self {
179-
Self::Mass(m) => MolecularFormula::with_additional_mass(m.value),
180-
Self::Formula(elements) => elements.clone(),
181-
Self::Glycan(monosaccharides) => monosaccharides
182-
.iter()
183-
.fold(MolecularFormula::default(), |acc, i| {
184-
acc + i.0.formula_inner(sequence_index, peptide_index) * i.1 as i32
185-
}),
186-
Self::GlycanStructure(glycan) | Self::Gno(GnoComposition::Structure(glycan), _) => {
187-
glycan.formula_inner(sequence_index, peptide_index)
188-
}
189-
Self::Database { formula, .. } | Self::Linker { formula, .. } => formula.clone(),
190-
Self::Gno(GnoComposition::Mass(m), _) => {
191-
MolecularFormula::with_additional_mass(m.value)
192-
}
193-
}
194-
}
195-
196172
/// Check to see if this modification can be placed on the specified element
197173
pub fn is_possible<T>(
198174
&self,
197 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)