Skip to content
Snippets Groups Projects
Commit fd4a185b authored by Olivier Langella's avatar Olivier Langella
Browse files

accession label

parent e4b79ddc
No related branches found
No related tags found
No related merge requests found
......@@ -125,7 +125,7 @@ unsigned int ProteinXtp::countTrypticPeptidesForPAI() const {
void ProteinXtp::parseAccession2dbxref() {
qDebug() << "ProteinXtp::parseAccession2dbxref begin" ;
QStringList access_list = getAccession().split("\\|");
QStringList access_list = getAccession().split("|");
// if (access.length == 1)
QRegExp atg("^[Aa][Tt][MmCc1-5][Gg]\\d{5}\\.?\\d?$");
QRegExp ncbi_gi("^[0-9]{5,8}$");
......@@ -134,6 +134,7 @@ void ProteinXtp::parseAccession2dbxref() {
QRegExp ref ("^[NZ]P\\_[0-9]{5,8}$");
for (QString & accession :access_list) {
qDebug() << "ProteinXtp::parseAccession2dbxref accession " << accession;
if (atg.indexIn(accession, 0) != -1) {
QStringList temp = accession.split("\\.");
_dbxref_list.push_back(std::make_pair(ExternalDatabase::AGI_LocusCode, temp.at(0)));
......@@ -143,10 +144,12 @@ void ProteinXtp::parseAccession2dbxref() {
}
if (swiss_prot.indexIn(accession, 0) != -1) {
qDebug() << "ProteinXtp::parseAccession2dbxref accession SwissProt " << accession;
_dbxref_list.push_back(std::make_pair(ExternalDatabase::SwissProt, accession));
}
if (trembl.indexIn(accession, 0) != -1) {
qDebug() << "ProteinXtp::parseAccession2dbxref accession TrEMBL " << accession;
_dbxref_list.push_back(std::make_pair(ExternalDatabase::TrEMBL, accession));
}
if (ref.indexIn(accession, 0) != -1) {
......
......@@ -39,27 +39,12 @@
</item>
<item>
<widget class="QLabel" name="accession_label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>167</height>
</size>
</property>
<property name="text">
<string>TextLabel</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item>
......@@ -172,7 +157,7 @@
<x>0</x>
<y>0</y>
<width>609</width>
<height>46</height>
<height>25</height>
</rect>
</property>
</widget>
......
......@@ -76,6 +76,11 @@ void ProteinWindow::updateDisplay() {
ui->decoy_checkbox->setCheckState(Qt::Unchecked);
if (_p_protein_match->getProteinXtpSp().get()->isDecoy()) ui->decoy_checkbox->setCheckState(Qt::Checked);
ui->accession_label->setText(_p_protein_match->getProteinXtpSp().get()->getAccession());
for (std::pair<ExternalDatabase, QString> dbxref:_p_protein_match->getProteinXtpSp().get()->getDbxrefList()) {
QString accession = ui->accession_label->text().replace(dbxref.second, QString("<a href=\"\" style=\"color:%2;\">%1</a>").arg(dbxref.second).arg("blue"));
ui->accession_label->setText(accession);
qDebug() << "ProteinWindow::updateDisplay " << accession;
}
ui->description_label->setText(_p_protein_match->getProteinXtpSp().get()->getDescription());
ui->sequenceTextEdit->setText(_p_protein_match->getHtmlSequence());
ui->coverage_label->setText(QString("%1 %").arg(_p_protein_match->getCoverage()*100));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment