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

economic accession parsing

parent 32e92c77
No related branches found
No related tags found
No related merge requests found
......@@ -568,6 +568,7 @@ void ProjectWindow::setProjectSp(ProjectSp project_sp) {
_project_sp = project_sp;
ui->decoy_regexp_radiobutton->setChecked(true);
ui->decoy_regexp_groupbox->setVisible(true);
ui->decoy_database_groupbox->setVisible(false);
if (_project_sp.get()->getProteinStore().getDecoyFastaFileList().size() > 0) {
ui->decoy_database_files_radiobutton->setChecked(true);
......
......@@ -83,6 +83,7 @@ void ContaminantWidget::setFastaFileList(std::vector<FastaFileSp> fasta_file_lis
void ContaminantWidget::getProjectContaminants(const Project * p_project) {
ui->contaminant_regexp_radiobutton->setChecked(true);
ui->contaminant_protein_regexp_line_edit->setVisible(true);
ui->contaminant_database_listview->setVisible(false);
if (p_project->getProteinStore().getContaminantFastaFileList().size() > 0) {
ui->contaminant_file_radiobutton->setChecked(true);
......
......@@ -128,24 +128,27 @@ ProteinXtpSp & ProteinStore::getInstance(ProteinXtpSp & peptide_in) {
if (ret.second) {
//the protein is new in the store, update content
setProteinInformations(ret.first->second);
if (ret.first->second.get()->getDbxrefList().size() == 0) {
ret.first->second.get()->parseAccession2dbxref();
}
}
return (ret.first->second);
}
void ProteinStore::setProteinInformations(ProteinXtpSp & peptide_in) {
void ProteinStore::setProteinInformations(ProteinXtpSp & protein_in) {
//qDebug() << "ProteinStore::setProteinInformations begin" << peptide_in.get()->getSequence();
peptide_in.get()->setIsContaminant(false);
peptide_in.get()->setIsDecoy(false);
QString accession = peptide_in.get()->getAccession();
peptide_in.get()->parseAccession2dbxref();
protein_in.get()->setIsContaminant(false);
protein_in.get()->setIsDecoy(false);
QString accession = protein_in.get()->getAccession();
if ((!_regexp_contaminant.isEmpty()) && (_regexp_contaminant.indexIn(accession, 0)>-1)) {
//qDebug() << "ProteinStore::setProteinInformations is contaminant " << accession;
peptide_in.get()->setIsContaminant(true);
protein_in.get()->setIsContaminant(true);
}
if ((!_regexp_decoy.isEmpty()) && (_regexp_decoy.indexIn(accession, 0)>-1) ) {
peptide_in.get()->setIsDecoy(true);
protein_in.get()->setIsDecoy(true);
}
//qDebug() << "ProteinStore::setProteinInformations end";
}
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