OpenMS
Loading...
Searching...
No Matches
PEFFFile.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: OpenMS Team $
6// $Authors: OpenMS Team $
7// --------------------------------------------------------------------------
8
9#pragma once
10
17
18#include <fstream>
19#include <limits>
20#include <map>
21#include <vector>
22
23namespace OpenMS
24{
31 struct OPENMS_DLLAPI PEFFModification
32 {
33 Size position{0};
34 std::string accession;
35 std::string name;
36 std::string optional_tag;
37 UInt annotation_id{std::numeric_limits<UInt>::max()};
38
39 enum class Type { PSI_MOD, UNIMOD, GENERIC };
40 Type type{Type::GENERIC};
41
42 PEFFModification() = default;
43 PEFFModification(Size pos, const std::string& acc, const std::string& n, const std::string& tag = "", UInt aid = std::numeric_limits<UInt>::max())
44 : position(pos), accession(acc), name(n), optional_tag(tag), annotation_id(aid)
45 {
46 if (StringUtils::hasPrefix(accession, "MOD:"))
47 {
48 type = Type::PSI_MOD;
49 }
50 else if (StringUtils::hasPrefix(accession, "UNIMOD:"))
51 {
52 type = Type::UNIMOD;
53 }
54 }
55
56 bool operator==(const PEFFModification& rhs) const
57 {
58 return position == rhs.position && accession == rhs.accession &&
59 name == rhs.name && type == rhs.type &&
60 optional_tag == rhs.optional_tag && annotation_id == rhs.annotation_id;
61 }
62 };
63
69 struct OPENMS_DLLAPI PEFFVariantSimple
70 {
71 Size position{0};
72 char variant_aa{'\0'};
73 std::string optional_tag;
74 UInt annotation_id{std::numeric_limits<UInt>::max()};
75
76 PEFFVariantSimple() = default;
77 PEFFVariantSimple(Size pos, char aa, const std::string& tag = "", UInt aid = std::numeric_limits<UInt>::max())
78 : position(pos), variant_aa(aa), optional_tag(tag), annotation_id(aid) {}
79
80 bool operator==(const PEFFVariantSimple& rhs) const
81 {
82 return position == rhs.position && variant_aa == rhs.variant_aa &&
83 optional_tag == rhs.optional_tag && annotation_id == rhs.annotation_id;
84 }
85 };
86
92 struct OPENMS_DLLAPI PEFFVariantComplex
93 {
94 Size start_position{0};
95 Size end_position{0};
96 std::string replacement;
97 std::string optional_tag;
98 UInt annotation_id{std::numeric_limits<UInt>::max()};
99
101 PEFFVariantComplex(Size start, Size end, const std::string& repl, const std::string& tag = "", UInt aid = std::numeric_limits<UInt>::max())
102 : start_position(start), end_position(end), replacement(repl), optional_tag(tag), annotation_id(aid) {}
103
104 bool operator==(const PEFFVariantComplex& rhs) const
105 {
106 return start_position == rhs.start_position && end_position == rhs.end_position &&
107 replacement == rhs.replacement && optional_tag == rhs.optional_tag &&
108 annotation_id == rhs.annotation_id;
109 }
110 };
111
117 struct OPENMS_DLLAPI PEFFProcessedRegion
118 {
119 Size start_position{0};
120 Size end_position{0};
121 std::string accession;
122 std::string name;
123 std::string optional_tag;
124 UInt annotation_id{std::numeric_limits<UInt>::max()};
125
127 PEFFProcessedRegion(Size start, Size end, const std::string& acc, const std::string& n = "", const std::string& tag = "", UInt aid = std::numeric_limits<UInt>::max())
128 : start_position(start), end_position(end), accession(acc), name(n), optional_tag(tag), annotation_id(aid) {}
129
130 bool operator==(const PEFFProcessedRegion& rhs) const
131 {
132 return start_position == rhs.start_position && end_position == rhs.end_position &&
133 accession == rhs.accession && name == rhs.name && optional_tag == rhs.optional_tag &&
134 annotation_id == rhs.annotation_id;
135 }
136 };
137
143 struct OPENMS_DLLAPI PEFFDisulfideBond
144 {
145 std::string id1;
146 std::string id2;
147 std::string optional_tag;
148 UInt annotation_id{std::numeric_limits<UInt>::max()};
149
150 PEFFDisulfideBond() = default;
151 PEFFDisulfideBond(const std::string& i1, const std::string& i2, const std::string& tag = "", UInt aid = std::numeric_limits<UInt>::max())
152 : id1(i1), id2(i2), optional_tag(tag), annotation_id(aid) {}
153
154 bool operator==(const PEFFDisulfideBond& rhs) const
155 {
156 return id1 == rhs.id1 && id2 == rhs.id2 && optional_tag == rhs.optional_tag &&
157 annotation_id == rhs.annotation_id;
158 }
159 };
160
173 struct OPENMS_DLLAPI PEFFEntry
174 {
175 // Basic fields
176 std::string prefix;
177 std::string identifier;
178 std::string sequence;
179
180 // Metadata
181 std::vector<std::string> protein_names;
182 std::string gene_name;
183 Int ncbi_tax_id{0};
184 std::string taxonomy_name;
185 Size sequence_length{0};
186 std::string sequence_version;
187 std::string entry_version;
188 Int protein_existence{0};
189 std::string db_unique_id;
190 std::string entry_id;
191 std::vector<std::string> alt_accessions;
192
193 // Annotations
194 std::vector<PEFFModification> modifications;
195 std::vector<PEFFVariantSimple> simple_variants;
196 std::vector<PEFFVariantComplex> complex_variants;
197 std::vector<PEFFProcessedRegion> processed_regions;
198 std::vector<PEFFDisulfideBond> disulfide_bonds;
199 std::vector<std::string> proteoforms;
200
201 // Custom annotations
202 std::map<std::string, std::string> custom_annotations;
203
204 PEFFEntry() = default;
205
206 PEFFEntry(const PEFFEntry& rhs) = default;
207 PEFFEntry(PEFFEntry&& rhs) noexcept = default;
208 PEFFEntry& operator=(const PEFFEntry& rhs) = default;
209 PEFFEntry& operator=(PEFFEntry&& rhs) noexcept = default;
210
211 bool operator==(const PEFFEntry& rhs) const
212 {
213 return prefix == rhs.prefix &&
214 identifier == rhs.identifier &&
215 sequence == rhs.sequence &&
216 protein_names == rhs.protein_names &&
217 gene_name == rhs.gene_name &&
218 ncbi_tax_id == rhs.ncbi_tax_id &&
219 taxonomy_name == rhs.taxonomy_name &&
220 sequence_length == rhs.sequence_length &&
221 sequence_version == rhs.sequence_version &&
222 entry_version == rhs.entry_version &&
223 protein_existence == rhs.protein_existence &&
224 db_unique_id == rhs.db_unique_id &&
225 entry_id == rhs.entry_id &&
226 alt_accessions == rhs.alt_accessions &&
227 modifications == rhs.modifications &&
228 simple_variants == rhs.simple_variants &&
229 complex_variants == rhs.complex_variants &&
230 processed_regions == rhs.processed_regions &&
231 disulfide_bonds == rhs.disulfide_bonds &&
232 proteoforms == rhs.proteoforms &&
233 custom_annotations == rhs.custom_annotations;
234 }
235
238
241
248
259
268 std::vector<std::string>& descriptions,
269 std::vector<AASequence>& sequences,
270 bool include_complex = false) const;
271
281 AASequence getProcessedSequence(const std::string& region_accession = "PEFF:0001021") const;
282
299 const ProteaseDigestion& digestor,
300 std::vector<std::string>& descriptions,
301 std::vector<AASequence>& sequences,
302 Size min_length = 6,
303 Size max_length = 40,
304 bool include_reference = true,
305 bool include_variants = true,
306 bool include_modifications = false) const;
307
326 const ProteaseDigestion& digestor,
327 std::vector<std::string>& descriptions,
328 std::vector<AASequence>& sequences,
329 const std::vector<std::string>& fixed_mods = {},
330 const std::vector<std::string>& variable_mods = {},
331 Size max_variable_mods_per_peptide = 2,
332 Size min_length = 6,
333 Size max_length = 40,
334 bool include_reference = true,
335 bool include_peff_variants = true,
336 bool include_peff_modifications = true) const;
337
338 private:
351 static std::vector<std::pair<std::string, AASequence>> enumeratePEFFModifications_(
352 const AASequence& peptide,
353 const std::vector<std::pair<Size, const PEFFModification*>>& peff_mods,
354 const std::string& base_description);
355 };
356
360 struct OPENMS_DLLAPI PEFFCustomKeyDef
361 {
362 std::string key_name;
363 std::string description;
364 std::string concept_curie;
365 std::string regexp;
366 std::vector<std::string> field_names;
367 std::vector<std::string> field_types;
368
369 bool operator==(const PEFFCustomKeyDef& rhs) const
370 {
371 return key_name == rhs.key_name && description == rhs.description &&
372 concept_curie == rhs.concept_curie && regexp == rhs.regexp &&
373 field_names == rhs.field_names && field_types == rhs.field_types;
374 }
375 };
376
382 struct OPENMS_DLLAPI PEFFDatabaseMetadata
383 {
384 std::string version{"1.0"};
385 std::string db_name;
386 std::string prefix;
387 std::string db_description;
388 bool is_decoy{false};
389 std::vector<std::string> db_sources;
390 std::string db_version;
391 Size number_of_entries{0};
392
393 enum class SequenceType { AA, NA };
394 SequenceType sequence_type{SequenceType::AA};
395
396 std::vector<std::string> general_comments;
397 std::string conversion;
398 std::map<std::string, std::string> specific_keys;
399 std::map<std::string, std::string> specific_values;
400 std::vector<std::string> optional_tag_defs;
401 std::vector<PEFFCustomKeyDef> custom_key_defs;
402 bool has_annotation_identifiers{false};
403 bool is_proteoform_db{false};
404
405 std::map<std::string, std::string> unrecognized_keys;
406
408
409 bool operator==(const PEFFDatabaseMetadata& rhs) const
410 {
411 return version == rhs.version &&
412 db_name == rhs.db_name &&
413 prefix == rhs.prefix &&
414 db_description == rhs.db_description &&
415 is_decoy == rhs.is_decoy &&
416 db_sources == rhs.db_sources &&
417 db_version == rhs.db_version &&
418 number_of_entries == rhs.number_of_entries &&
419 sequence_type == rhs.sequence_type &&
420 general_comments == rhs.general_comments &&
421 conversion == rhs.conversion &&
422 specific_keys == rhs.specific_keys &&
423 specific_values == rhs.specific_values &&
424 optional_tag_defs == rhs.optional_tag_defs &&
425 custom_key_defs == rhs.custom_key_defs &&
426 has_annotation_identifiers == rhs.has_annotation_identifiers &&
427 is_proteoform_db == rhs.is_proteoform_db &&
428 unrecognized_keys == rhs.unrecognized_keys;
429 }
430 };
431
446 class OPENMS_DLLAPI PEFFFile : public ProgressLogger
447 {
448 public:
450 PEFFFile() = default;
451
453 ~PEFFFile() override = default;
454
465 void load(const std::string& filename,
466 std::vector<PEFFEntry>& entries,
467 std::vector<PEFFDatabaseMetadata>& headers) const;
468
478 void store(const std::string& filename,
479 const std::vector<PEFFEntry>& entries,
480 const PEFFDatabaseMetadata& header) const;
481
495 void store(const std::string& filename,
496 const std::vector<PEFFEntry>& entries,
497 const std::vector<PEFFDatabaseMetadata>& headers) const;
498
507 void readStart(const std::string& filename);
508
517 bool readNext(PEFFEntry& entry);
518
524 const std::vector<PEFFDatabaseMetadata>& getHeaders() const;
525
527 bool atEnd() const;
528
537 void writeStart(const std::string& filename, const PEFFDatabaseMetadata& header);
538
551 void writeStart(const std::string& filename, const std::vector<PEFFDatabaseMetadata>& headers);
552
558 void writeNext(const PEFFEntry& entry);
559
561 void writeEnd();
562
569 static bool isPEFFFile(const std::string& filename);
570
577 static std::string toProForma(const PEFFEntry& entry);
578
579 protected:
581 void parseHeaderLine_(const std::string& line, PEFFDatabaseMetadata& header, bool& new_db);
582
584 void parseAnnotations_(const std::string& description, PEFFEntry& entry);
585
587 PEFFModification parseModification_(const std::string& tuple);
588
590 PEFFVariantSimple parseVariantSimple_(const std::string& tuple);
591
593 PEFFVariantComplex parseVariantComplex_(const std::string& tuple);
594
597
599 PEFFDisulfideBond parseDisulfideBond_(const std::string& tuple);
600
602 std::vector<std::string> parseParenList_(const std::string& value);
603
605 std::string formatHeader_(const PEFFDatabaseMetadata& header) const;
606
608 std::string formatHeader_(const std::vector<PEFFDatabaseMetadata>& headers) const;
609
611 std::string formatEntry_(const PEFFEntry& entry) const;
612
613
615 bool readEntry_(std::string& id, std::string& description, std::string& seq);
616
617 std::fstream infile_;
618 std::ofstream outfile_;
619 std::vector<PEFFDatabaseMetadata> headers_;
620 Size entries_read_{0};
621 std::streampos fileSize_{0};
622 std::string seq_;
623 std::string id_;
624 std::string description_;
625 };
626
627} // namespace OpenMS
Representation of a peptide/protein sequence.
Definition AASequence.h:88
This class serves for reading and writing PEFF (PSI Extended FASTA Format) files.
Definition PEFFFile.h:447
void load(const std::string &filename, std::vector< PEFFEntry > &entries, std::vector< PEFFDatabaseMetadata > &headers) const
Loads a PEFF file and stores entries and headers.
void writeStart(const std::string &filename, const std::vector< PEFFDatabaseMetadata > &headers)
Prepares a PEFF file for streamed writing using writeNext(), with multiple headers.
void writeEnd()
Closes the output file (called automatically in destructor)
std::string formatHeader_(const std::vector< PEFFDatabaseMetadata > &headers) const
Format the header section for output (multiple database blocks)
PEFFFile()=default
Default constructor.
bool atEnd() const
Returns true if the end of the file has been reached.
std::string seq_
Current sequence buffer.
Definition PEFFFile.h:622
void store(const std::string &filename, const std::vector< PEFFEntry > &entries, const PEFFDatabaseMetadata &header) const
Stores entries to a PEFF file with the given header.
~PEFFFile() override=default
Destructor.
std::string formatHeader_(const PEFFDatabaseMetadata &header) const
Format the header section for output.
std::string formatEntry_(const PEFFEntry &entry) const
Format a single entry for output.
static bool isPEFFFile(const std::string &filename)
Checks if a file appears to be a PEFF file (by checking for # PEFF header).
void writeStart(const std::string &filename, const PEFFDatabaseMetadata &header)
Prepares a PEFF file for streamed writing using writeNext().
void parseHeaderLine_(const std::string &line, PEFFDatabaseMetadata &header, bool &new_db)
Parse a header line (# Key=Value or # //)
PEFFModification parseModification_(const std::string &tuple)
Parse a single modification tuple.
PEFFProcessedRegion parseProcessedRegion_(const std::string &tuple)
Parse a processed region tuple.
PEFFVariantComplex parseVariantComplex_(const std::string &tuple)
Parse a complex variant tuple.
bool readNext(PEFFEntry &entry)
Reads the next PEFF entry from the file.
std::ofstream outfile_
Output file stream.
Definition PEFFFile.h:618
void readStart(const std::string &filename)
Prepares a PEFF file for streamed reading using readNext().
void store(const std::string &filename, const std::vector< PEFFEntry > &entries, const std::vector< PEFFDatabaseMetadata > &headers) const
Stores entries to a PEFF file with multiple database headers.
void writeNext(const PEFFEntry &entry)
Writes the next PEFF entry to the file.
std::vector< std::string > parseParenList_(const std::string &value)
Parse a parenthesized list of values.
const std::vector< PEFFDatabaseMetadata > & getHeaders() const
Returns the headers parsed during readStart().
PEFFDisulfideBond parseDisulfideBond_(const std::string &tuple)
Parse a disulfide bond tuple.
bool readEntry_(std::string &id, std::string &description, std::string &seq)
Read entry data (identifier, description, sequence)
std::string id_
Current identifier buffer.
Definition PEFFFile.h:623
std::vector< PEFFDatabaseMetadata > headers_
Parsed headers.
Definition PEFFFile.h:619
std::fstream infile_
Input file stream.
Definition PEFFFile.h:617
std::string description_
Current description buffer.
Definition PEFFFile.h:624
PEFFVariantSimple parseVariantSimple_(const std::string &tuple)
Parse a simple variant tuple.
static std::string toProForma(const PEFFEntry &entry)
Converts a PEFF entry to ProForma notation.
void parseAnnotations_(const std::string &description, PEFFEntry &entry)
Parse annotations from the description line.
Base class for all classes that want to report their progress.
Definition ProgressLogger.h:27
Class for the enzymatic digestion of proteins represented as AASequence or String.
Definition ProteaseDigestion.h:32
int Int
Signed integer type.
Definition Types.h:72
unsigned int UInt
Unsigned integer type.
Definition Types.h:64
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Definition AhoCorasickAmbiguous.h:112
FASTA entry type (identifier, description and sequence) The first std::string corresponds to the iden...
Definition FASTAFile.h:46
Represents a custom key definition from the PEFF header.
Definition PEFFFile.h:361
std::vector< std::string > field_names
Definition PEFFFile.h:366
std::string concept_curie
Definition PEFFFile.h:364
std::string key_name
Definition PEFFFile.h:362
std::vector< std::string > field_types
Definition PEFFFile.h:367
std::string description
Definition PEFFFile.h:363
bool operator==(const PEFFCustomKeyDef &rhs) const
Definition PEFFFile.h:369
std::string regexp
Definition PEFFFile.h:365
Metadata from a PEFF database header section.
Definition PEFFFile.h:383
std::map< std::string, std::string > specific_keys
SpecificKey definitions (key -> description)
Definition PEFFFile.h:398
std::string db_description
Definition PEFFFile.h:387
SequenceType
Definition PEFFFile.h:393
bool has_annotation_identifiers
Whether entries use annotation identifiers.
Definition PEFFFile.h:402
bool is_decoy
Definition PEFFFile.h:388
std::vector< std::string > optional_tag_defs
Definition PEFFFile.h:400
std::vector< PEFFCustomKeyDef > custom_key_defs
CustomKeyDef definitions.
Definition PEFFFile.h:401
std::string db_name
Definition PEFFFile.h:385
SequenceType sequence_type
Definition PEFFFile.h:394
std::vector< std::string > general_comments
Multiple GeneralComment lines allowed.
Definition PEFFFile.h:396
std::string version
Definition PEFFFile.h:384
std::string prefix
Definition PEFFFile.h:386
std::map< std::string, std::string > unrecognized_keys
Unrecognized header keys (preserved for round-trip)
Definition PEFFFile.h:405
std::vector< std::string > db_sources
Definition PEFFFile.h:389
std::string conversion
Conversion notes.
Definition PEFFFile.h:397
bool is_proteoform_db
Whether this is a proteoform database (ProteoformDb)
Definition PEFFFile.h:403
Size number_of_entries
Definition PEFFFile.h:391
bool operator==(const PEFFDatabaseMetadata &rhs) const
Definition PEFFFile.h:409
std::string db_version
Definition PEFFFile.h:390
std::map< std::string, std::string > specific_values
SpecificValue definitions (key -> type)
Definition PEFFFile.h:399
Represents a disulfide bond annotation in PEFF.
Definition PEFFFile.h:144
UInt annotation_id
Optional annotation identifier, max() = not set.
Definition PEFFFile.h:148
PEFFDisulfideBond(const std::string &i1, const std::string &i2, const std::string &tag="", UInt aid=std::numeric_limits< UInt >::max())
Definition PEFFFile.h:151
std::string id1
First cysteine reference (AnnotationIdentifier of the cysteine residue)
Definition PEFFFile.h:145
bool operator==(const PEFFDisulfideBond &rhs) const
Definition PEFFFile.h:154
std::string optional_tag
Optional tag (e.g., "between chains")
Definition PEFFFile.h:147
std::string id2
Second cysteine reference (AnnotationIdentifier of the cysteine residue)
Definition PEFFFile.h:146
Represents a single entry in a PEFF file with all annotations.
Definition PEFFFile.h:174
void generatePeptides(const ProteaseDigestion &digestor, std::vector< std::string > &descriptions, std::vector< AASequence > &sequences, const std::vector< std::string > &fixed_mods={}, const std::vector< std::string > &variable_mods={}, Size max_variable_mods_per_peptide=2, Size min_length=6, Size max_length=40, bool include_reference=true, bool include_peff_variants=true, bool include_peff_modifications=true) const
Generate peptides with PEFF annotations and optional sample handling modifications.
bool operator==(const PEFFEntry &rhs) const
Definition PEFFFile.h:211
std::string entry_id
\ID (e.g., NPM_HUMAN)
Definition PEFFFile.h:190
Size sequence_length
\Length
Definition PEFFFile.h:185
PEFFEntry(const PEFFEntry &rhs)=default
std::map< std::string, std::string > custom_annotations
Definition PEFFFile.h:202
std::string entry_version
\EV
Definition PEFFFile.h:187
Int protein_existence
\PE (1-5)
Definition PEFFFile.h:188
AASequence getModifiedSequence() const
Get an AASequence with all annotated modifications applied.
std::vector< PEFFModification > modifications
Definition PEFFFile.h:194
std::string taxonomy_name
\TaxName
Definition PEFFFile.h:184
std::string identifier
Definition PEFFFile.h:177
static std::vector< std::pair< std::string, AASequence > > enumeratePEFFModifications_(const AASequence &peptide, const std::vector< std::pair< Size, const PEFFModification * > > &peff_mods, const std::string &base_description)
Apply PEFF modifications at specific positions to a peptide.
std::vector< PEFFProcessedRegion > processed_regions
Definition PEFFFile.h:197
void getVariantSequences(std::vector< std::string > &descriptions, std::vector< AASequence > &sequences, bool include_complex=false) const
Get all variant sequences (each variant applied individually).
std::string gene_name
\GName
Definition PEFFFile.h:182
PEFFEntry(PEFFEntry &&rhs) noexcept=default
AASequence getSequence() const
Get the base AASequence for this entry (unmodified sequence).
std::vector< std::string > alt_accessions
\AltAC - alternative accessions
Definition PEFFFile.h:191
AASequence getProcessedSequence(const std::string &region_accession="PEFF:0001021") const
Get processed sequence (e.g., mature protein without signal peptide).
std::vector< PEFFVariantSimple > simple_variants
Definition PEFFFile.h:195
std::string prefix
Database prefix from description line (e.g., "sp" from ">sp:P12345")
Definition PEFFFile.h:176
Int ncbi_tax_id
\NcbiTaxId or \OX
Definition PEFFFile.h:183
std::vector< PEFFDisulfideBond > disulfide_bonds
\DisulfideBond
Definition PEFFFile.h:198
std::string sequence
Definition PEFFFile.h:178
void digestWithVariants(const ProteaseDigestion &digestor, std::vector< std::string > &descriptions, std::vector< AASequence > &sequences, Size min_length=6, Size max_length=40, bool include_reference=true, bool include_variants=true, bool include_modifications=false) const
Generate all variant and/or modification peptides by digesting with a given protease.
PEFFEntry & operator=(PEFFEntry &&rhs) noexcept=default
std::vector< std::string > protein_names
\PName - may have multiple names
Definition PEFFFile.h:181
static PEFFEntry fromFASTAEntry(const FASTAFile::FASTAEntry &fasta)
Create a PEFFEntry from a FASTAEntry (basic fields only)
std::vector< PEFFVariantComplex > complex_variants
Definition PEFFFile.h:196
PEFFEntry()=default
std::vector< std::string > proteoforms
ProForma notation.
Definition PEFFFile.h:199
FASTAFile::FASTAEntry toFASTAEntry() const
Convert to a FASTAFile::FASTAEntry (loses PEFF-specific annotations)
PEFFEntry & operator=(const PEFFEntry &rhs)=default
std::string sequence_version
\SV
Definition PEFFFile.h:186
std::string db_unique_id
\DbUniqueId
Definition PEFFFile.h:189
Represents a PEFF modification annotation.
Definition PEFFFile.h:32
bool operator==(const PEFFModification &rhs) const
Definition PEFFFile.h:56
UInt annotation_id
Optional annotation identifier (when HasAnnotationIdentifiers=true), max() = not set.
Definition PEFFFile.h:37
Type
Definition PEFFFile.h:39
std::string optional_tag
Optional tag (last component of annotation tuple)
Definition PEFFFile.h:36
std::string name
Human-readable name.
Definition PEFFFile.h:35
Type type
Definition PEFFFile.h:40
PEFFModification(Size pos, const std::string &acc, const std::string &n, const std::string &tag="", UInt aid=std::numeric_limits< UInt >::max())
Definition PEFFFile.h:43
Size position
1-based position, 0 = unknown position (?)
Definition PEFFFile.h:33
std::string accession
"MOD:00046", "UNIMOD:35", or custom
Definition PEFFFile.h:34
Represents a PEFF processed region (signal peptide, transit peptide, etc.).
Definition PEFFFile.h:118
UInt annotation_id
Optional annotation identifier, max() = not set.
Definition PEFFFile.h:124
std::string optional_tag
Optional tag (last component of annotation tuple)
Definition PEFFFile.h:123
PEFFProcessedRegion(Size start, Size end, const std::string &acc, const std::string &n="", const std::string &tag="", UInt aid=std::numeric_limits< UInt >::max())
Definition PEFFFile.h:127
std::string name
Optional name (e.g., "signal peptide")
Definition PEFFFile.h:122
Size end_position
1-based end position
Definition PEFFFile.h:120
bool operator==(const PEFFProcessedRegion &rhs) const
Definition PEFFFile.h:130
Size start_position
1-based start position
Definition PEFFFile.h:119
std::string accession
PEFF CV accession (e.g., "PEFF:0001021")
Definition PEFFFile.h:121
Represents a complex PEFF variant (insertion, deletion, or substitution of multiple amino acids).
Definition PEFFFile.h:93
bool operator==(const PEFFVariantComplex &rhs) const
Definition PEFFFile.h:104
UInt annotation_id
Optional annotation identifier, max() = not set.
Definition PEFFFile.h:98
std::string optional_tag
Optional tag (last component of annotation tuple)
Definition PEFFFile.h:97
PEFFVariantComplex(Size start, Size end, const std::string &repl, const std::string &tag="", UInt aid=std::numeric_limits< UInt >::max())
Definition PEFFFile.h:101
Size end_position
1-based end position
Definition PEFFFile.h:95
std::string replacement
Replacement sequence (empty = deletion)
Definition PEFFFile.h:96
Size start_position
1-based start position
Definition PEFFFile.h:94
Represents a simple PEFF variant (single amino acid substitution).
Definition PEFFFile.h:70
UInt annotation_id
Optional annotation identifier, max() = not set.
Definition PEFFFile.h:74
std::string optional_tag
Optional tag (last component of annotation tuple)
Definition PEFFFile.h:73
PEFFVariantSimple(Size pos, char aa, const std::string &tag="", UInt aid=std::numeric_limits< UInt >::max())
Definition PEFFFile.h:77
bool operator==(const PEFFVariantSimple &rhs) const
Definition PEFFFile.h:80
char variant_aa
Variant amino acid.
Definition PEFFFile.h:72
Size position
1-based position
Definition PEFFFile.h:71