Add opt-in support for chimeric ProForma parsing#210
Conversation
|
@levitsky can you please approve workflow runs for this PR? I don't have permission. |
| self.assertEqual(forms[1].composition(), Composition(sequence='camCcamC', aa_comp=aa_comp)) | ||
|
|
||
| def test_chimeric_shared_names_and_isotopes(self): | ||
| parsed = parse('(>sample)<13C>AC+CC', chimeric=True) |
There was a problem hiding this comment.
This bit is tricky. Names defined with > and >> are specific to a single peptidoform and peptidoform ion respectively. Only >>> names apply to all peptidoforms in the set. This is section 8.2 of the forthcoming specification: https://docs.google.com/document/d/1HaSOMNmdFCxy0G6lq1Yci03z-4esmQoe_hSyoqTeRnc/edit?tab=t.0
So AC would have the name sample, but CC would have no name.
The example from the specification is (>Trypsin)AANSIPYQVSLNS+(>Keratin)AKEQFERQTA
mobiusklein
left a comment
There was a problem hiding this comment.
This looks great other than the name sharing thing (which is trivial and can be fixed at a later date).
I'm happy to bundle that fix in with other changes when I do a coverage overhaul.
Adds opt-in parsing support for chimeric ProForma strings using
chimeric=Truerelated to #209.This keeps the default single-sequence behavior unchanged while allowing top-level
+to separate chimeric peptidoform components when explicitly requested.Changes
chimericoption toParser,proforma.parse, andProForma.parse.ProFormaobjects whenchimeric=True.+, with an error message suggestingchimeric=True.