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
330 const ProteaseDigestion& digestor,
331 std::vector<std::string>& descriptions,
332 std::vector<AASequence>& sequences,
333 const std::vector<std::string>& fixed_mods = {},
334 const std::vector<std::string>& variable_mods = {},
335 Size max_variable_mods_per_peptide = 2,
336 Size min_length = 6,
337 Size max_length = 40,
338 bool include_reference = true,
339 bool include_peff_variants = true,
340 bool include_peff_modifications = true,
341 Size max_peff_mods_per_proteoform = 0) const;
342
343 private:
360 static std::vector<std::pair<std::string, AASequence>> enumeratePEFFModifications_(
361 const AASequence& peptide,
362 const std::vector<std::pair<Size, const PEFFModification*>>& peff_mods,
363 const std::string& base_description,
364 Size max_selected = 0);
365 };
366
370 struct OPENMS_DLLAPI PEFFCustomKeyDef
371 {
372 std::string key_name;
373 std::string description;
374 std::string concept_curie;
375 std::string regexp;
376 std::vector<std::string> field_names;
377 std::vector<std::string> field_types;
378
379 bool operator==(const PEFFCustomKeyDef& rhs) const
380 {
381 return key_name == rhs.key_name && description == rhs.description &&
382 concept_curie == rhs.concept_curie && regexp == rhs.regexp &&
383 field_names == rhs.field_names && field_types == rhs.field_types;
384 }
385 };
386
392 struct OPENMS_DLLAPI PEFFDatabaseMetadata
393 {
394 std::string version{"1.0"};
395 std::string db_name;
396 std::string prefix;
397 std::string db_description;
398 bool is_decoy{false};
399 std::vector<std::string> db_sources;
400 std::string db_version;
401 Size number_of_entries{0};
402
403 enum class SequenceType { AA, NA };
404 SequenceType sequence_type{SequenceType::AA};
405
406 std::vector<std::string> general_comments;
407 std::string conversion;
408 std::map<std::string, std::string> specific_keys;
409 std::map<std::string, std::string> specific_values;
410 std::vector<std::string> optional_tag_defs;
411 std::vector<PEFFCustomKeyDef> custom_key_defs;
412 bool has_annotation_identifiers{false};
413 bool is_proteoform_db{false};
414
415 std::map<std::string, std::string> unrecognized_keys;
416
418
419 bool operator==(const PEFFDatabaseMetadata& rhs) const
420 {
421 return version == rhs.version &&
422 db_name == rhs.db_name &&
423 prefix == rhs.prefix &&
424 db_description == rhs.db_description &&
425 is_decoy == rhs.is_decoy &&
426 db_sources == rhs.db_sources &&
427 db_version == rhs.db_version &&
428 number_of_entries == rhs.number_of_entries &&
429 sequence_type == rhs.sequence_type &&
430 general_comments == rhs.general_comments &&
431 conversion == rhs.conversion &&
432 specific_keys == rhs.specific_keys &&
433 specific_values == rhs.specific_values &&
434 optional_tag_defs == rhs.optional_tag_defs &&
435 custom_key_defs == rhs.custom_key_defs &&
436 has_annotation_identifiers == rhs.has_annotation_identifiers &&
437 is_proteoform_db == rhs.is_proteoform_db &&
438 unrecognized_keys == rhs.unrecognized_keys;
439 }
440 };
441
456 class OPENMS_DLLAPI PEFFFile : public ProgressLogger
457 {
458 public:
460 PEFFFile() = default;
461
463 ~PEFFFile() override = default;
464
475 void load(const std::string& filename,
476 std::vector<PEFFEntry>& entries,
477 std::vector<PEFFDatabaseMetadata>& headers) const;
478
488 void store(const std::string& filename,
489 const std::vector<PEFFEntry>& entries,
490 const PEFFDatabaseMetadata& header) const;
491
505 void store(const std::string& filename,
506 const std::vector<PEFFEntry>& entries,
507 const std::vector<PEFFDatabaseMetadata>& headers) const;
508
517 void readStart(const std::string& filename);
518
527 bool readNext(PEFFEntry& entry);
528
534 const std::vector<PEFFDatabaseMetadata>& getHeaders() const;
535
537 bool atEnd() const;
538
547 void writeStart(const std::string& filename, const PEFFDatabaseMetadata& header);
548
561 void writeStart(const std::string& filename, const std::vector<PEFFDatabaseMetadata>& headers);
562
568 void writeNext(const PEFFEntry& entry);
569
571 void writeEnd();
572
579 static bool isPEFFFile(const std::string& filename);
580
587 static std::string toProForma(const PEFFEntry& entry);
588
589 protected:
591 void parseHeaderLine_(const std::string& line, PEFFDatabaseMetadata& header, bool& new_db);
592
594 void parseAnnotations_(const std::string& description, PEFFEntry& entry);
595
597 PEFFModification parseModification_(const std::string& tuple);
598
600 PEFFVariantSimple parseVariantSimple_(const std::string& tuple);
601
603 PEFFVariantComplex parseVariantComplex_(const std::string& tuple);
604
607
609 PEFFDisulfideBond parseDisulfideBond_(const std::string& tuple);
610
612 std::vector<std::string> parseParenList_(const std::string& value);
613
615 std::string formatHeader_(const PEFFDatabaseMetadata& header) const;
616
618 std::string formatHeader_(const std::vector<PEFFDatabaseMetadata>& headers) const;
619
621 std::string formatEntry_(const PEFFEntry& entry) const;
622
623
625 bool readEntry_(std::string& id, std::string& description, std::string& seq);
626
627 std::fstream infile_;
628 std::ofstream outfile_;
629 std::vector<PEFFDatabaseMetadata> headers_;
630 Size entries_read_{0};
631 std::streampos fileSize_{0};
632 std::string seq_;
633 std::string id_;
634 std::string description_;
635 };
636
637} // 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:457
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:632
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:628
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:633
std::vector< PEFFDatabaseMetadata > headers_
Parsed headers.
Definition PEFFFile.h:629
std::fstream infile_
Input file stream.
Definition PEFFFile.h:627
std::string description_
Current description buffer.
Definition PEFFFile.h:634
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:371
std::vector< std::string > field_names
Definition PEFFFile.h:376
std::string concept_curie
Definition PEFFFile.h:374
std::string key_name
Definition PEFFFile.h:372
std::vector< std::string > field_types
Definition PEFFFile.h:377
std::string description
Definition PEFFFile.h:373
bool operator==(const PEFFCustomKeyDef &rhs) const
Definition PEFFFile.h:379
std::string regexp
Definition PEFFFile.h:375
Metadata from a PEFF database header section.
Definition PEFFFile.h:393
std::map< std::string, std::string > specific_keys
SpecificKey definitions (key -> description)
Definition PEFFFile.h:408
std::string db_description
Definition PEFFFile.h:397
SequenceType
Definition PEFFFile.h:403
bool has_annotation_identifiers
Whether entries use annotation identifiers.
Definition PEFFFile.h:412
bool is_decoy
Definition PEFFFile.h:398
std::vector< std::string > optional_tag_defs
Definition PEFFFile.h:410
std::vector< PEFFCustomKeyDef > custom_key_defs
CustomKeyDef definitions.
Definition PEFFFile.h:411
std::string db_name
Definition PEFFFile.h:395
SequenceType sequence_type
Definition PEFFFile.h:404
std::vector< std::string > general_comments
Multiple GeneralComment lines allowed.
Definition PEFFFile.h:406
std::string version
Definition PEFFFile.h:394
std::string prefix
Definition PEFFFile.h:396
std::map< std::string, std::string > unrecognized_keys
Unrecognized header keys (preserved for round-trip)
Definition PEFFFile.h:415
std::vector< std::string > db_sources
Definition PEFFFile.h:399
std::string conversion
Conversion notes.
Definition PEFFFile.h:407
bool is_proteoform_db
Whether this is a proteoform database (ProteoformDb)
Definition PEFFFile.h:413
Size number_of_entries
Definition PEFFFile.h:401
bool operator==(const PEFFDatabaseMetadata &rhs) const
Definition PEFFFile.h:419
std::string db_version
Definition PEFFFile.h:400
std::map< std::string, std::string > specific_values
SpecificValue definitions (key -> type)
Definition PEFFFile.h:409
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
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, Size max_selected=0)
Apply PEFF modifications at specific positions to a peptide.
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
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
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, Size max_peff_mods_per_proteoform=0) const
Generate peptides with PEFF annotations and optional sample handling modifications.
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