예제 #1
0
  //Visualizing ProteinHit object
  void MetaDataBrowser::visualize_(ProteinHit & meta, QTreeWidgetItem * parent)
  {
    ProteinHitVisualizer * visualizer = new ProteinHitVisualizer(isEditable(), this);
    visualizer->load(meta);

    String name = String("Prot ") + meta.getAccession() + " (" + meta.getScore() + ')';
    QString qs_name(name.c_str());

    QStringList labels;
    labels << qs_name << QString::number(ws_->addWidget(visualizer)) << QString::number(meta.getScore());

    QTreeWidgetItem * item;
    if (parent == nullptr)
    {
      item = new QTreeWidgetItem(treeview_, labels);
    }
    else
    {
      item = new QTreeWidgetItem(parent, labels);
    }

    visualize_(dynamic_cast<MetaInfoInterface &>(meta), item);

    connectVisualizer_(visualizer);
  }
예제 #2
0
 void ProtXMLFile::registerProtein_(const String& protein_name)
 {
   ProteinHit hit;
   hit.setAccession(protein_name);
   prot_id_->insertHit(hit);
   // add protein to groups
   protein_group_.accessions.push_back(protein_name);
   prot_id_->getIndistinguishableProteins().back().accessions.push_back(
     protein_name);
 }
예제 #3
0
 String describeHit_(const ProteinHit& hit)
 {
   return "protein hit with accession '" + hit.getAccession() + "', score " +
     String(hit.getScore());
 }