Skip to content

[Feature] Add xtandem cleavage rules - #3059

Merged
jpfeuffer merged 7 commits into
OpenMS:developfrom
jpfeuffer:feature/AddXtandemCleavageRules
Feb 16, 2018
Merged

jpfeuffer merged 7 commits into
OpenMS:developfrom
jpfeuffer:feature/AddXtandemCleavageRules

Conversation

@jpfeuffer

Copy link
Copy Markdown
Contributor

Extends allow_methionine_cleavage to allow_nterm_protein_cleavage which also considers cleavage of the second AA (which can be X), following the XTandem standards.

Adds default option to allow for non-"missed cleavages affecting" random D|P cleavages, also following the observations from the XTandem author(s).

@jpfeuffer
jpfeuffer requested a review from cbielow December 4, 2017 13:17
@jpfeuffer

Copy link
Copy Markdown
Contributor Author

Related to #2497

{ // '0' is included in cleavage_positions, so starting fragments will be found as well
spec_n = true;
}
else if (allow_random_asp_pro_cleavage && (sequence[pos-1] == 'D') && (sequence[pos] == 'P'))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can pos be 0?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but then it would be found in the first "if case" since 0 is always included in the cleavage_positions. I hope this assumption is not too loose.

{
spec_c = true;
}
else if (allow_random_asp_pro_cleavage && (sequence[end-1] == 'D') && (sequence[end] == 'P'))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can end-1 < 0?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, see line 139. length >=1 and end = pos + length

@jpfeuffer

Copy link
Copy Markdown
Contributor Author

@cbielow Can you have a look if this is already correctly used in PeptideIndexer or if it needs changes?


/// Returns true if the fragment starting at position @p pos with length @p length within the sequence @p sequence could be generated by the current model
bool isValidProduct(const String& sequence, Size pos, Size length, bool ignore_missed_cleavages = true) const;
bool isValidProduct(const String& sequence, Size pos, Size length, bool ignore_missed_cleavages = true, bool allow_random_asp_pro_cleavage = false) const;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm so we have this also in the base class

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes unfortunately that is the only place where I had access to the needed data. To avoid this, bigger restructuring would be necessary I guees.

@timosachsenberg timosachsenberg Dec 4, 2017 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hendrikweisser any idea how we can get this hin without making the current design obsolete?


/// Returns true if the fragment starting at position @p pos with length @p length within the sequence @p sequence could be generated by the current model
bool isValidProduct(const String& sequence, Size pos, Size length, bool ignore_missed_cleavages = true) const;
bool isValidProduct(const String& sequence, Size pos, Size length, bool ignore_missed_cleavages = true, bool allow_random_asp_pro_cleavage = false) const;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should not be in the base class of RNases and Proteases

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, we discussed some changes for this offline. Wait for update.

@jpfeuffer

Copy link
Copy Markdown
Contributor Author

Please check again.

@jpfeuffer

Copy link
Copy Markdown
Contributor Author

Only Percolator fails, fixed in other Pr.

@timosachsenberg

Copy link
Copy Markdown
Contributor

+1

/// Variant of EnzymaticDigestion::isValidProduct() with support for methionine cleavage
bool isValidProduct(const String& protein, Size pep_pos, Size pep_length, bool ignore_missed_cleavages = true, bool methionine_cleavage = false) const;
/// Variant of EnzymaticDigestion::isValidProduct() with support for n-term protein cleavage and random D|P cleavage
bool isValidProduct(const String& protein, Size pep_pos, Size pep_length, bool ignore_missed_cleavages = true, bool allow_nterm_protein_cleavage = false, bool allow_random_asp_pro_cleavage = true) const;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one last question.... is allow_random_asp_pro_cleavage = true a sensible default?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think so, better to make it false by default

@timosachsenberg

Copy link
Copy Markdown
Contributor

Julianus and I had a quick chat and we came to the conclusion that the allow_random_asp_pro_cleavage option might lead to unexpected results for non-xtandem searches (if enabled by default). We will see if we need another take on that issue and maybe just enable the allow_random_asp_pro_cleavage if a XTandem search is indexed in PeptideIndexer

@jpfeuffer

Copy link
Copy Markdown
Contributor Author

Changing defaults right now: What about the second AA at protein n-term. Should this be standard with allow_nterm_cleavage?
Or do we need another flag or even an integer?

@jpfeuffer

Copy link
Copy Markdown
Contributor Author

In conjunction with enzymes that cut after D it works, too.
The real cutting sites take preference and are counted as missed cleavages if skipped.

@jpfeuffer

Copy link
Copy Markdown
Contributor Author

Any complaints on the defaults?

@timosachsenberg

Copy link
Copy Markdown
Contributor

looks good and seems to be well covered by tests +1

@jpfeuffer
jpfeuffer merged commit 632f7d5 into OpenMS:develop Feb 16, 2018
@jpfeuffer
jpfeuffer deleted the feature/AddXtandemCleavageRules branch October 7, 2019 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants