Skip to content

Commit

Permalink
Fixed issues in isobaric set with base sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
douweschulte committed Nov 10, 2023
1 parent 5804f7b commit 7b43de3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/isobaric_sets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,9 @@ impl IsobaricSetIterator {
sequence.push(n.0);
}
if let Some(base) = &self.base {
sequence.extend(base.sequence.iter().cloned());
let n = usize::from(base.n_term.is_some());
let c = usize::from(base.c_term.is_some());
sequence.extend(base.sequence[n..base.len() - n - c].iter().cloned());
}
sequence.extend(
self.state
Expand Down Expand Up @@ -397,7 +399,7 @@ impl IsobaricSetIterator {
c_term: self
.base
.as_ref()
.and_then(|b| b.n_term.clone())
.and_then(|b| b.c_term.clone())
.or_else(|| self.state.1.map(|i| self.c_term[i].1.clone())),
sequence,
ambiguous_modifications: Vec::new(),
Expand Down

0 comments on commit 7b43de3

Please sign in to comment.