32#include <odsstream/tsvreader.h> 
   33#include <odsstream/odsexception.h> 
   43                                          const QString &sage_json_file)
 
 
   76                                                     const QString &sequence_in)
 
   78  QString accession = description_in.split(
" ", Qt::SkipEmptyParts).at(0);
 
   81      const PsmProtein &psm_protein = 
mp_self->m_psmProteinMap.getByAccession(accession);
 
   82      psm_protein.
protein_sp.get()->setSequence(sequence_in);
 
   83      psm_protein.
protein_sp.get()->setDescription(description_in);
 
   91      const PsmProtein &psm_protein = 
mp_self->m_psmProteinMap.getByAccession(accession);
 
   92      psm_protein.
protein_sp.get()->setSequence(sequence_in);
 
   93      psm_protein.
protein_sp.get()->setDescription(description_in);
 
 
  114  bool fasta_pass = 
true;
 
  118      TsvReader tsv_reader(handler);
 
  120      QFile tsv_file(tsv_file_info.absoluteFilePath());
 
  121      tsv_reader.parse(tsv_file);
 
  125  catch(OdsException &error_ods)
 
  128                                      .arg(tsv_file_info.absoluteFilePath())
 
  129                                      .arg(error_ods.qwhat()));
 
  137  reader.
parse(fastaFile);
 
  150      TsvReader tsv_reader(handler);
 
  152      QFile tsv_file(tsv_file_info.absoluteFilePath());
 
  153      tsv_reader.parse(tsv_file);
 
  156  catch(OdsException &error_ods)
 
  159                                      .arg(tsv_file_info.absoluteFilePath())
 
  160                                      .arg(error_ods.qwhat()));
 
 
  170  QJsonObject sage_object = json_doc.object();
 
  171  QJsonValue output_path  = sage_object.value(
"output_paths");
 
  172  if(output_path.isUndefined())
 
  177  if(!output_path.isArray())
 
  181  for(
auto element : output_path.toArray())
 
  183      if(element.isString())
 
  185          if(element.toString().endsWith(
".tsv"))
 
  187              path = element.toString();
 
 
  198  QJsonObject sage_object = json_doc.object();
 
  199  QJsonValue database     = sage_object.value(
"database");
 
  200  if(database.isUndefined())
 
  204  path = database.toObject().value(
"fasta").toString();
 
 
  213std::vector<pappso::cbor::psm::SageReader::SageModification>
 
  216  std::vector<SageReader::SageModification> list;
 
  218  QJsonValue database     = sage_object.value(
"database");
 
  219  if(database.isUndefined())
 
  224  QJsonValue static_mods = database.toObject().value(
"static_mods");
 
  225  if(static_mods.isUndefined())
 
  229  for(QString residue_str : static_mods.toObject().keys())
 
  232      modif.
residue      = residue_str.at(0);
 
  235        static_mods.toObject().value(residue_str).toDouble());
 
  237        QString::number(static_mods.toObject().value(residue_str).toDouble(), 
'f', 6);
 
  250      list.push_back(modif);
 
 
  255std::vector<pappso::cbor::psm::SageReader::SageModification>
 
  258  std::vector<SageReader::SageModification> list;
 
  260  QJsonValue database     = sage_object.value(
"database");
 
  261  if(database.isUndefined())
 
  266  QJsonValue var_mods = database.toObject().value(
"variable_mods");
 
  267  if(var_mods.isUndefined())
 
  271  for(QString residue_str : var_mods.toObject().keys())
 
  274      modif.
residue = residue_str.at(0);
 
  275      for(QJsonValue one_mass : var_mods.toObject().value(residue_str).toArray())
 
  292          list.push_back(modif);
 
 
  303  QJsonValue database     = sage_object.value(
"database");
 
  304  if(database.isUndefined())
 
  308  path = database.toObject().value(
"decoy_tag").toString();
 
 
pappso_double getMass() const
 
void parse(QFile &fastaFile)
 
static AaModificationP guessAaModificationPbyMonoisotopicMassDelta(Enums::AminoAcidChar aa, pappso_double mass)
 
void setSequence(const QString &description_in, const QString &sequence_in) override
 
FastaSeq(SageReader *self)
 
PsmProteinMap m_psmProteinMap
 
SageReader(pappso::UiMonitorInterface *p_monitor, pappso::cbor::CborStreamWriter *p_output, const SageFileReader &sage_file_reader, const QString &sage_json_file)
 
std::vector< SageModification > getStaticModificationList() const
 
pappso::cbor::CborStreamWriter * mp_cborWriter
 
const QString & getmJsonAbsoluteFilePath() const
 
pappso::cbor::CborStreamWriter & getCborStreamWriter() const
 
QString m_jsonAbsoluteFilePath
 
const SageFileReader & m_sageFileReader
 
std::vector< SageModification > getVariableModificationList() const
 
QString getFastaFilePath(const QJsonDocument &json_doc)
 
QString getDecoyTag() const
 
const SageFileReader & getSageFileReader() const
 
QString getTsvFilePath(const QJsonDocument &json_doc)
 
pappso::UiMonitorInterface * mp_monitor
 
std::shared_ptr< Protein > protein_sp
 
pappso::AaModificationP modification