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

html sequence coverage

parent 60eeb09c
No related branches found
No related tags found
No related merge requests found
......@@ -278,20 +278,21 @@ const QString ProteinMatch::getHtmlSequence() const
}
QString sequence = getProteinXtpSp().get()->getSequence();
QString sequence_html;
for (unsigned int i=0; i < prot_size; i++) {
if(cover_bool[i]) {
sequence_html.append(QString("<span style=\"background-color:yellow;\">%1").arg(sequence[i]));
for (;i < prot_size; i++) {
if(cover_bool[i]) {
sequence_html.append(sequence[i]);
}
else {
sequence_html.append(QString("</span>%1").arg(sequence[i]));
break;
for (unsigned int i=0; i < prot_size; i++) {
if(cover_bool[i]) {
sequence_html.append(QString("<span style=\"background-color:yellow;\">%1").arg(sequence[i]));
i++;
for (;i < prot_size; i++) {
if(cover_bool[i]) {
sequence_html.append(sequence[i]);
}
else {
sequence_html.append(QString("</span>%1").arg(sequence[i]));
break;
}
}
}
sequence_html.append(QString("</span>"));
sequence_html.append(QString("</span>"));
}
else {
sequence_html.append(sequence[i]);
......
......@@ -98,7 +98,7 @@ int PeptideTableModel::rowCount(const QModelIndex &parent ) const {
return 0;
}
int PeptideTableModel::columnCount(const QModelIndex &parent ) const {
return 8;
return 10;
}
QVariant PeptideTableModel::headerData(int section, Qt::Orientation orientation, int role) const
{
......@@ -123,6 +123,10 @@ QVariant PeptideTableModel::headerData(int section, Qt::Orientation orientation,
return QString("sequence");
case 7:
return QString("modifs");
case 8:
return QString("start");
case 9:
return QString("length");
}
}
}
......@@ -184,6 +188,11 @@ QVariant PeptideTableModel::data(const QModelIndex &index, int role ) const {
if (col ==7) {
return _p_protein_match->getPeptideMatchList().at(row)->getPeptideXtpSp().get()->getModifString();
}
if (col ==8) {
return QVariant((qreal) _p_protein_match->getPeptideMatchList().at(row)->getStart()+1);
}if (col ==9) {
return QVariant((qreal) _p_protein_match->getPeptideMatchList().at(row)->getPeptideXtpSp().get()->size());
}
}
return QString("Row%1, Column%2")
.arg(index.row() + 1)
......
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