Skip to content

Commit

Permalink
correcting tutorial, adding export for statistics, fixing typo
Browse files Browse the repository at this point in the history
  • Loading branch information
dominik-kopczynski committed May 31, 2022
1 parent af00f41 commit 94fefb9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions lipidspace/importtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class ImportTable : public QDialog
string sheet;
Ui::ImportTable *ui;
string data_table_file;
QString file_name;
map<QString, int> original_column_index;

explicit ImportTable(QWidget *parent = nullptr);
Expand Down
4 changes: 3 additions & 1 deletion src/Tutorial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ void Tutorial::action_performed(){
case FOpenImport:
{
ImportTable &it = lipidSpaceGUI->import_table;
if (it.sheet != "Example-Dataset"){
QFileInfo qFileInfo(it.file_name);
string cleaned_file_name = qFileInfo.baseName().toStdString();
if (cleaned_file_name != "Example-Dataset" || it.sheet != "Data"){
QMessageBox::warning(this, "Wrong table", "You have selected the wrong file, please select the correct file according to the tutorial.");
it.accept();
}
Expand Down
4 changes: 3 additions & 1 deletion src/importtable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ ImportTable::ImportTable(QWidget *parent) : QDialog(parent), ui(new Ui::ImportTa
connect(ui->lipidListWidgetRow, SIGNAL(oneItemViolation(string, int)), this, SLOT(oneItemViolated(string, int)));
connect(ui->lipidListWidgetFlat, SIGNAL(oneItemViolation(string, int)), this, SLOT(oneItemViolated(string, int)));
connect(ui->quantListWidgetFlat, SIGNAL(oneItemViolation(string, int)), this, SLOT(oneItemViolated(string, int)));

file_name = "";
}

void ImportTable::show(){
Expand All @@ -113,7 +115,7 @@ void ImportTable::show(){
ui->tableWidget->setColumnCount(0);
ui->tabWidget->setCurrentIndex(0);

QString file_name = QFileDialog::getOpenFileName(this, "Select a lipid data table", GlobalData::last_folder, "Worksheets *.xlsx (*.xlsx);;Data Tables *.csv *.tsv (*.csv *.tsv)");
file_name = QFileDialog::getOpenFileName(this, "Select a lipid data table", GlobalData::last_folder, "Worksheets *.xlsx (*.xlsx);;Data Tables *.csv *.tsv (*.csv *.tsv)");
if (!file_name.length()) {
QMetaObject::invokeMethod(this, "close", Qt::QueuedConnection);
return;
Expand Down
2 changes: 1 addition & 1 deletion src/statistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ void Statistics::updateBoxPlot(){
else if (nom_counter > 2){
double p_anova = p_value_anova(series);
stat_results.insert({"p_value(ANOVA)", p_anova});
chart->setTitle(QString("Statistics: <i>p-value</i><sub>AONVA</sub> = %1").arg(QString::number(p_anova, 'g', 3)));
chart->setTitle(QString("Statistics: <i>p-value</i><sub>ANOVA</sub> = %1").arg(QString::number(p_anova, 'g', 3)));
}
}
else {
Expand Down

0 comments on commit 94fefb9

Please sign in to comment.