├── Docs
└── images
│ ├── PDF_icon.svg
│ ├── Simplot_ex_clipped.svg
│ ├── Simplot_ex_svg.svg
│ ├── User_preferences.png
│ ├── bootscan_gif.gif
│ ├── findsite.gif
│ ├── group_page_steps.png
│ ├── group_page_steps_gif.gif
│ ├── newtwork_gif.gif
│ ├── plot_toolbar.gif
│ ├── recomb_gif.gif
│ └── simplot_gif.gif
├── LICENSE
├── PyQt5_gui
├── PyQT5_project
│ ├── app_settings.ui
│ ├── bootscan_dialog.ui
│ ├── file_info_dialog.ui
│ ├── group_list_widget.ui
│ ├── gui_test.pro
│ ├── gui_test.pro.user
│ ├── gui_test.pro.user.4a7d66f
│ ├── gui_test.pro.user.6d2e820
│ ├── icons
│ │ ├── Icons.qrc
│ │ ├── active
│ │ │ ├── Bootscan_page_active.svg
│ │ │ ├── View_new_window_active.svg
│ │ │ ├── browse_active.svg
│ │ │ ├── findsite_page_active.svg
│ │ │ ├── group_page_active.svg
│ │ │ ├── launch_active.svg
│ │ │ ├── network_page_active.svg
│ │ │ ├── pause_button.svg
│ │ │ ├── question_active.svg
│ │ │ ├── recombination_active.svg
│ │ │ ├── reopen_active.svg
│ │ │ ├── save_groups_active.svg
│ │ │ ├── save_html_active.svg
│ │ │ ├── save_text_active.svg
│ │ │ ├── settings_active.svg
│ │ │ ├── simplot_page_active.svg
│ │ │ ├── user_pref_active.svg
│ │ │ └── view_quality_active.svg
│ │ ├── csv_button.svg
│ │ ├── detectiom.svg
│ │ ├── detection.svg
│ │ ├── disabled
│ │ │ ├── Bootscan_page_grey.svg
│ │ │ ├── View_new_window_disabled.svg
│ │ │ ├── browse_grey.svg
│ │ │ ├── findsite_page_grey.svg
│ │ │ ├── group_page_grey.svg
│ │ │ ├── launch_disabled.svg
│ │ │ ├── network_page_grey.svg
│ │ │ ├── recombination_disabled.svg
│ │ │ ├── reopen_grey.svg
│ │ │ ├── save_groups_grey.svg
│ │ │ ├── save_html_disabled.svg
│ │ │ ├── save_text_disabled.svg
│ │ │ ├── settings_disabled.svg
│ │ │ ├── simplot_page_grey.svg
│ │ │ ├── user_pref_disabled.svg
│ │ │ └── view_quality_disabled.svg
│ │ ├── hover
│ │ │ ├── Bootscan_page_hover.svg
│ │ │ ├── View_new_window_hover.svg
│ │ │ ├── browse_hover.svg
│ │ │ ├── findsite_page_hover.svg
│ │ │ ├── group_page_hover.svg
│ │ │ ├── launch_hover.svg
│ │ │ ├── network_page_hover.svg
│ │ │ ├── question_hover.svg
│ │ │ ├── recombination_hover.svg
│ │ │ ├── reopen_hover.svg
│ │ │ ├── save_groups_hover.svg
│ │ │ ├── save_html_hover.svg
│ │ │ ├── save_text_hover.svg
│ │ │ ├── settings_hover.svg
│ │ │ ├── simplot_page_hover.svg
│ │ │ ├── user_pref_hover.svg
│ │ │ └── view_quality_hover.svg
│ │ ├── icons_rc
│ │ ├── icons_rc.py
│ │ ├── logo
│ │ │ └── simplot++_logo.svg
│ │ ├── other
│ │ │ ├── Method Draw Vector Editor_files
│ │ │ │ ├── all.css
│ │ │ │ └── all.js.download
│ │ │ ├── chevron-down.svg
│ │ │ ├── chevron-up.svg
│ │ │ ├── delete.svg
│ │ │ ├── dna.svg
│ │ │ ├── down_arrow.svg
│ │ │ ├── edit.svg
│ │ │ └── up-arrow.svg
│ │ ├── pause_button.svg
│ │ └── pressed
│ │ │ ├── Bootscan_page_pressed.svg
│ │ │ ├── View_new_window_pressed.svg
│ │ │ ├── browse_pressed.svg
│ │ │ ├── findsite_page_pressed.svg
│ │ │ ├── group_page_pressed.svg
│ │ │ ├── launch_pressed.svg
│ │ │ ├── network_page_pressed.svg
│ │ │ ├── question_pressed.svg
│ │ │ ├── recombination_pressed.svg
│ │ │ ├── reopen_pressed.svg
│ │ │ ├── save_groups_pressed.svg
│ │ │ ├── save_html_pressed.svg
│ │ │ ├── save_text_pressed.svg
│ │ │ ├── settings_pressed.svg
│ │ │ ├── simplot_page_pressed.svg
│ │ │ ├── user_pref_pressed.svg
│ │ │ └── view_quality_pressed.svg
│ ├── main.cpp
│ ├── mainwindow.cpp
│ ├── mainwindow.h
│ ├── mainwindow.ui
│ ├── model_dialog.cpp
│ ├── model_dialog.h
│ ├── model_dialog.ui
│ ├── seq_window.cpp
│ ├── seq_window.h
│ ├── seq_window.ui
│ ├── simplot_settings_form.cpp
│ ├── simplot_settings_form.h
│ └── simplot_settings_form.ui
├── __init__.py
├── app_settings.py
├── bootscan_dialog.py
├── build-gui_test-Desktop_Qt_5_15_1_MinGW_32_bit-Debug
│ ├── .qmake.stash
│ ├── Makefile
│ ├── Makefile.Debug
│ ├── Makefile.Release
│ ├── debug
│ │ ├── main.o
│ │ ├── mainwindow.o
│ │ ├── moc_mainwindow.cpp
│ │ ├── moc_model_dialog.cpp
│ │ ├── moc_model_dialog.o
│ │ ├── moc_predefs.h
│ │ ├── moc_seq_window.cpp
│ │ ├── moc_seq_window.o
│ │ ├── model_dialog.o
│ │ └── seq_window.o
│ ├── ui_bootscan_dialog.h
│ ├── ui_file_info_dialog.h
│ ├── ui_mainwindow.h
│ ├── ui_model_dialog.h
│ └── ui_seq_window.h
├── file_info_dialog.py
├── group_list_widget.py
├── group_widget.py
├── group_widget_info.txt
├── model_dialog.py
├── seq_window.py
├── simplot_settings_form.py
└── ui_main.py
├── README.md
├── SimPlot.ico
├── example_data
├── HIVULN_groups.nexus
├── h_pylori.fasta
├── sars_cov_2_gene_s.fas
└── sars_cov_2_gene_s_grouped.nexus
├── lib
├── Bootscan
│ └── bootscan.py
├── DistanceModels
│ └── DistCalc.py
├── FindSites
│ └── findsites.py
├── Misc
│ ├── RGB_colors.py
│ ├── global_running.py
│ ├── groups_class.py
│ └── preferences.py
├── Network
│ ├── Bokeh_graph_functions.py
│ ├── network_analysis.py
│ └── recombination_detection.py
├── SimPlot
│ ├── analysis_class.py
│ └── quality_report.py
└── recombination_tests
│ ├── lib
│ ├── misc.py
│ ├── pair_score.py
│ ├── queue.py
│ ├── seq_manip.py
│ └── stats.py
│ └── phipack_main.py
├── main.py
├── requirements.txt
└── setup.py
/Docs/images/User_preferences.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Stephane-S/Simplot_PlusPlus/82daaa67b54c2a8e31909945ac9a69ef026ef067/Docs/images/User_preferences.png
--------------------------------------------------------------------------------
/Docs/images/bootscan_gif.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Stephane-S/Simplot_PlusPlus/82daaa67b54c2a8e31909945ac9a69ef026ef067/Docs/images/bootscan_gif.gif
--------------------------------------------------------------------------------
/Docs/images/findsite.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Stephane-S/Simplot_PlusPlus/82daaa67b54c2a8e31909945ac9a69ef026ef067/Docs/images/findsite.gif
--------------------------------------------------------------------------------
/Docs/images/group_page_steps.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Stephane-S/Simplot_PlusPlus/82daaa67b54c2a8e31909945ac9a69ef026ef067/Docs/images/group_page_steps.png
--------------------------------------------------------------------------------
/Docs/images/group_page_steps_gif.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Stephane-S/Simplot_PlusPlus/82daaa67b54c2a8e31909945ac9a69ef026ef067/Docs/images/group_page_steps_gif.gif
--------------------------------------------------------------------------------
/Docs/images/newtwork_gif.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Stephane-S/Simplot_PlusPlus/82daaa67b54c2a8e31909945ac9a69ef026ef067/Docs/images/newtwork_gif.gif
--------------------------------------------------------------------------------
/Docs/images/plot_toolbar.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Stephane-S/Simplot_PlusPlus/82daaa67b54c2a8e31909945ac9a69ef026ef067/Docs/images/plot_toolbar.gif
--------------------------------------------------------------------------------
/Docs/images/recomb_gif.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Stephane-S/Simplot_PlusPlus/82daaa67b54c2a8e31909945ac9a69ef026ef067/Docs/images/recomb_gif.gif
--------------------------------------------------------------------------------
/Docs/images/simplot_gif.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Stephane-S/Simplot_PlusPlus/82daaa67b54c2a8e31909945ac9a69ef026ef067/Docs/images/simplot_gif.gif
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/gui_test.pro:
--------------------------------------------------------------------------------
1 | QT += core gui
2 |
3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
4 |
5 | CONFIG += c++11
6 |
7 | # You can make your code fail to compile if it uses deprecated APIs.
8 | # In order to do so, uncomment the following line.
9 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
10 |
11 | SOURCES += \
12 | main.cpp \
13 | mainwindow.cpp \
14 | model_dialog.cpp \
15 | seq_window.cpp \
16 | simplot_settings_form.cpp
17 |
18 | HEADERS += \
19 | mainwindow.h \
20 | model_dialog.h \
21 | seq_window.h \
22 | simplot_settings_form.h
23 |
24 | FORMS += \
25 | app_settings.ui \
26 | bootscan_dialog.ui \
27 | file_info_dialog.ui \
28 | group_list_widget.ui \
29 | mainwindow.ui \
30 | model_dialog.ui \
31 | seq_window.ui \
32 | simplot_settings_form.ui
33 |
34 | # Default rules for deployment.
35 | qnx: target.path = /tmp/$${TARGET}/bin
36 | else: unix:!android: target.path = /opt/$${TARGET}/bin
37 | !isEmpty(target.path): INSTALLS += target
38 |
39 | RESOURCES += \
40 | icons/Icons.qrc
41 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/Icons.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | active/Bootscan_page_active.svg
4 | active/findsite_page_active.svg
5 | active/group_page_active.svg
6 | active/network_page_active.svg
7 | active/reopen_active.svg
8 | active/save_groups_active.svg
9 | active/simplot_page_active.svg
10 | active/browse_active.svg
11 | active/launch_active.svg
12 | active/View_new_window_active.svg
13 | active/settings_active.svg
14 | active/save_html_active.svg
15 | active/view_quality_active.svg
16 | active/save_text_active.svg
17 | active/user_pref_active.svg
18 | active/recombination_active.svg
19 | active/question_active.svg
20 | active/pause_button_active.svg
21 |
22 |
23 | hover/Bootscan_page_hover.svg
24 | hover/browse_hover.svg
25 | hover/findsite_page_hover.svg
26 | hover/group_page_hover.svg
27 | hover/network_page_hover.svg
28 | hover/reopen_hover.svg
29 | hover/save_groups_hover.svg
30 | hover/simplot_page_hover.svg
31 | hover/launch_hover.svg
32 | hover/settings_hover.svg
33 | hover/View_new_window_hover.svg
34 | hover/save_html_hover.svg
35 | hover/view_quality_hover.svg
36 | hover/save_text_hover.svg
37 | hover/user_pref_hover.svg
38 | hover/recombination_hover.svg
39 | hover/question_hover.svg
40 | hover/pause_button_hover.svg
41 |
42 |
43 | disabled/Bootscan_page_grey.svg
44 | disabled/browse_grey.svg
45 | disabled/findsite_page_grey.svg
46 | disabled/group_page_grey.svg
47 | disabled/network_page_grey.svg
48 | disabled/reopen_grey.svg
49 | disabled/save_groups_grey.svg
50 | disabled/simplot_page_grey.svg
51 | disabled/launch_disabled.svg
52 | disabled/settings_disabled.svg
53 | disabled/View_new_window_disabled.svg
54 | disabled/save_html_disabled.svg
55 | disabled/view_quality_disabled.svg
56 | disabled/save_text_disabled.svg
57 | disabled/user_pref_disabled.svg
58 | disabled/recombination_disabled.svg
59 |
60 |
61 | pressed/Bootscan_page_pressed.svg
62 | pressed/browse_pressed.svg
63 | pressed/findsite_page_pressed.svg
64 | pressed/group_page_pressed.svg
65 | pressed/launch_pressed.svg
66 | pressed/network_page_pressed.svg
67 | pressed/reopen_pressed.svg
68 | pressed/save_groups_pressed.svg
69 | pressed/save_html_pressed.svg
70 | pressed/settings_pressed.svg
71 | pressed/simplot_page_pressed.svg
72 | pressed/View_new_window_pressed.svg
73 | pressed/view_quality_pressed.svg
74 | pressed/save_text_pressed.svg
75 | pressed/user_pref_pressed.svg
76 | pressed/recombination_pressed.svg
77 | pressed/question_pressed.svg
78 | pressed/pause_button_pressed.svg
79 |
80 |
81 | logo/simplot++_logo.svg
82 |
83 |
84 | other/delete.svg
85 | other/edit.svg
86 | other/dna.svg
87 | other/chevron-down.svg
88 | other/chevron-up.svg
89 | other/down_arrow.svg
90 | other/up-arrow.svg
91 |
92 |
93 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/active/browse_active.svg:
--------------------------------------------------------------------------------
1 |
31 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/active/findsite_page_active.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/active/launch_active.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/active/network_page_active.svg:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/active/question_active.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/active/recombination_active.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/active/reopen_active.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/active/save_groups_active.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/active/save_html_active.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/active/save_text_active.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/active/settings_active.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/active/simplot_page_active.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/active/view_quality_active.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/detectiom.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/detection.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/disabled/browse_grey.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/disabled/findsite_page_grey.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/disabled/launch_disabled.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/disabled/network_page_grey.svg:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/disabled/reopen_grey.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/disabled/save_groups_grey.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/disabled/save_html_disabled.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/disabled/save_text_disabled.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/disabled/settings_disabled.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/disabled/simplot_page_grey.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/disabled/view_quality_disabled.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/hover/browse_hover.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/hover/findsite_page_hover.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/hover/launch_hover.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/hover/network_page_hover.svg:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/hover/question_hover.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/hover/recombination_hover.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/hover/reopen_hover.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/hover/save_groups_hover.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/hover/save_html_hover.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/hover/save_text_hover.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/hover/settings_hover.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/hover/simplot_page_hover.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/hover/view_quality_hover.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/icons_rc:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Form implementation generated from reading ui file '.\Icons.rc'
4 | #
5 | # Created by: PyQt5 UI code generator 5.15.0
6 | #
7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is
8 | # run again. Do not edit this file unless you know what you are doing.
9 |
10 |
11 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/logo/simplot++_logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/other/chevron-down.svg:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/other/chevron-up.svg:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/other/delete.svg:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/other/down_arrow.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/other/edit.svg:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/other/up-arrow.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/pressed/browse_pressed.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/pressed/findsite_page_pressed.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/pressed/launch_pressed.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/pressed/network_page_pressed.svg:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/pressed/question_pressed.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/pressed/reopen_pressed.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/pressed/save_groups_pressed.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/pressed/save_html_pressed.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/pressed/save_text_pressed.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/pressed/settings_pressed.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/pressed/simplot_page_pressed.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/icons/pressed/view_quality_pressed.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/main.cpp:
--------------------------------------------------------------------------------
1 | #include "mainwindow.h"
2 |
3 | #include
4 |
5 | int main(int argc, char *argv[])
6 | {
7 | QApplication a(argc, argv);
8 | MainWindow w;
9 | w.show();
10 | return a.exec();
11 | }
12 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/mainwindow.cpp:
--------------------------------------------------------------------------------
1 | #include "mainwindow.h"
2 | #include "ui_mainwindow.h"
3 |
4 | MainWindow::MainWindow(QWidget *parent)
5 | : QMainWindow(parent)
6 | , ui(new Ui::MainWindow)
7 | {
8 | ui->setupUi(this);
9 | }
10 |
11 | MainWindow::~MainWindow()
12 | {
13 | delete ui;
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/mainwindow.h:
--------------------------------------------------------------------------------
1 | #ifndef MAINWINDOW_H
2 | #define MAINWINDOW_H
3 |
4 | #include
5 |
6 | QT_BEGIN_NAMESPACE
7 | namespace Ui { class MainWindow; }
8 | QT_END_NAMESPACE
9 |
10 | class MainWindow : public QMainWindow
11 | {
12 | Q_OBJECT
13 |
14 | public:
15 | MainWindow(QWidget *parent = nullptr);
16 | ~MainWindow();
17 |
18 | private:
19 | Ui::MainWindow *ui;
20 | };
21 | #endif // MAINWINDOW_H
22 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/model_dialog.cpp:
--------------------------------------------------------------------------------
1 | #include "model_dialog.h"
2 | #include "ui_model_dialog.h"
3 |
4 | model_dialog::model_dialog(QWidget *parent) :
5 | QDialog(parent),
6 | ui(new Ui::model_dialog)
7 | {
8 | ui->setupUi(this);
9 | }
10 |
11 | model_dialog::~model_dialog()
12 | {
13 | delete ui;
14 | }
15 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/model_dialog.h:
--------------------------------------------------------------------------------
1 | #ifndef MODEL_DIALOG_H
2 | #define MODEL_DIALOG_H
3 |
4 | #include
5 |
6 | namespace Ui {
7 | class model_dialog;
8 | }
9 |
10 | class model_dialog : public QDialog
11 | {
12 | Q_OBJECT
13 |
14 | public:
15 | explicit model_dialog(QWidget *parent = nullptr);
16 | ~model_dialog();
17 |
18 | private:
19 | Ui::model_dialog *ui;
20 | };
21 |
22 | #endif // MODEL_DIALOG_H
23 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/seq_window.cpp:
--------------------------------------------------------------------------------
1 | #include "seq_window.h"
2 | #include "ui_seq_window.h"
3 |
4 | Seq_window::Seq_window(QWidget *parent) :
5 | QDialog(parent),
6 | ui(new Ui::Seq_window)
7 | {
8 | ui->setupUi(this);
9 | }
10 |
11 | Seq_window::~Seq_window()
12 | {
13 | delete ui;
14 | }
15 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/seq_window.h:
--------------------------------------------------------------------------------
1 | #ifndef SEQ_WINDOW_H
2 | #define SEQ_WINDOW_H
3 |
4 | #include
5 |
6 | namespace Ui {
7 | class Seq_window;
8 | }
9 |
10 | class Seq_window : public QDialog
11 | {
12 | Q_OBJECT
13 |
14 | public:
15 | explicit Seq_window(QWidget *parent = nullptr);
16 | ~Seq_window();
17 |
18 | private slots:
19 | void on_pushButton_3_clicked();
20 |
21 | private:
22 | Ui::Seq_window *ui;
23 | };
24 |
25 | #endif // SEQ_WINDOW_H
26 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/seq_window.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | Seq_window
4 |
5 |
6 |
7 | 0
8 | 0
9 | 958
10 | 411
11 |
12 |
13 |
14 | Group Editor
15 |
16 |
17 |
18 |
19 | 280
20 | 370
21 | 341
22 | 32
23 |
24 |
25 |
26 | Qt::Horizontal
27 |
28 |
29 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok
30 |
31 |
32 |
33 |
34 |
35 | 30
36 | 90
37 | 901
38 | 261
39 |
40 |
41 |
42 | -
43 |
44 |
45 | -
46 |
47 |
48 | 1
49 |
50 |
51 | 20
52 |
53 |
54 | 20
55 |
56 |
-
57 |
58 |
59 | >>
60 |
61 |
62 |
63 | -
64 |
65 |
66 | >
67 |
68 |
69 |
70 | -
71 |
72 |
73 | <
74 |
75 |
76 |
77 | -
78 |
79 |
80 | <<
81 |
82 |
83 |
84 |
85 |
86 | -
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 | 30
95 | 29
96 | 891
97 | 51
98 |
99 |
100 |
101 | -
102 |
103 |
104 | Group
105 |
106 |
107 | Qt::AlignCenter
108 |
109 |
110 |
111 | -
112 |
113 |
114 | Sequences
115 |
116 |
117 | Qt::AlignCenter
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 | buttonBox
128 | accepted()
129 | Seq_window
130 | accept()
131 |
132 |
133 | 248
134 | 254
135 |
136 |
137 | 157
138 | 274
139 |
140 |
141 |
142 |
143 | buttonBox
144 | rejected()
145 | Seq_window
146 | reject()
147 |
148 |
149 | 316
150 | 260
151 |
152 |
153 | 286
154 | 274
155 |
156 |
157 |
158 |
159 |
160 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/simplot_settings_form.cpp:
--------------------------------------------------------------------------------
1 | #include "simplot_settings_form.h"
2 | #include "ui_simplot_settings_form.h"
3 |
4 | SimPlot_settings_form::SimPlot_settings_form(QWidget *parent) :
5 | QDialog(parent),
6 | ui(new Ui::SimPlot_settings_form)
7 | {
8 | ui->setupUi(this);
9 | }
10 |
11 | SimPlot_settings_form::~SimPlot_settings_form()
12 | {
13 | delete ui;
14 | }
15 |
--------------------------------------------------------------------------------
/PyQt5_gui/PyQT5_project/simplot_settings_form.h:
--------------------------------------------------------------------------------
1 | #ifndef SIMPLOT_SETTINGS_FORM_H
2 | #define SIMPLOT_SETTINGS_FORM_H
3 |
4 | #include
5 |
6 | namespace Ui {
7 | class SimPlot_settings_form;
8 | }
9 |
10 | class SimPlot_settings_form : public QDialog
11 | {
12 | Q_OBJECT
13 |
14 | public:
15 | explicit SimPlot_settings_form(QWidget *parent = nullptr);
16 | ~SimPlot_settings_form();
17 |
18 | private:
19 | Ui::SimPlot_settings_form *ui;
20 | };
21 |
22 | #endif // SIMPLOT_SETTINGS_FORM_H
23 |
--------------------------------------------------------------------------------
/PyQt5_gui/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Stephane-S/Simplot_PlusPlus/82daaa67b54c2a8e31909945ac9a69ef026ef067/PyQt5_gui/__init__.py
--------------------------------------------------------------------------------
/PyQt5_gui/build-gui_test-Desktop_Qt_5_15_1_MinGW_32_bit-Debug/.qmake.stash:
--------------------------------------------------------------------------------
1 | QMAKE_CXX.QT_COMPILER_STDCXX = 201402L
2 | QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 8
3 | QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 1
4 | QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
5 | QMAKE_CXX.COMPILER_MACROS = \
6 | QT_COMPILER_STDCXX \
7 | QMAKE_GCC_MAJOR_VERSION \
8 | QMAKE_GCC_MINOR_VERSION \
9 | QMAKE_GCC_PATCH_VERSION
10 | QMAKE_CXX.INCDIRS = \
11 | D:/Work/programs/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++ \
12 | D:/Work/programs/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/i686-w64-mingw32 \
13 | D:/Work/programs/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/backward \
14 | D:/Work/programs/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include \
15 | D:/Work/programs/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include-fixed \
16 | D:/Work/programs/Tools/mingw810_32/i686-w64-mingw32/include
17 | QMAKE_CXX.LIBDIRS = \
18 | D:/Work/programs/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0 \
19 | D:/Work/programs/Tools/mingw810_32/lib/gcc \
20 | D:/Work/programs/Tools/mingw810_32/i686-w64-mingw32/lib \
21 | D:/Work/programs/Tools/mingw810_32/lib
22 |
--------------------------------------------------------------------------------
/PyQt5_gui/build-gui_test-Desktop_Qt_5_15_1_MinGW_32_bit-Debug/debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Stephane-S/Simplot_PlusPlus/82daaa67b54c2a8e31909945ac9a69ef026ef067/PyQt5_gui/build-gui_test-Desktop_Qt_5_15_1_MinGW_32_bit-Debug/debug/main.o
--------------------------------------------------------------------------------
/PyQt5_gui/build-gui_test-Desktop_Qt_5_15_1_MinGW_32_bit-Debug/debug/mainwindow.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Stephane-S/Simplot_PlusPlus/82daaa67b54c2a8e31909945ac9a69ef026ef067/PyQt5_gui/build-gui_test-Desktop_Qt_5_15_1_MinGW_32_bit-Debug/debug/mainwindow.o
--------------------------------------------------------------------------------
/PyQt5_gui/build-gui_test-Desktop_Qt_5_15_1_MinGW_32_bit-Debug/debug/moc_mainwindow.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'mainwindow.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.1)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include
10 | #include "../../PyQT5_project/mainwindow.h"
11 | #include
12 | #include
13 | #if !defined(Q_MOC_OUTPUT_REVISION)
14 | #error "The header file 'mainwindow.h' doesn't include ."
15 | #elif Q_MOC_OUTPUT_REVISION != 67
16 | #error "This file was generated using the moc from 5.15.1. It"
17 | #error "cannot be used with the include files from this version of Qt."
18 | #error "(The moc has changed too much.)"
19 | #endif
20 |
21 | QT_BEGIN_MOC_NAMESPACE
22 | QT_WARNING_PUSH
23 | QT_WARNING_DISABLE_DEPRECATED
24 | struct qt_meta_stringdata_MainWindow_t {
25 | QByteArrayData data[5];
26 | char stringdata0[73];
27 | };
28 | #define QT_MOC_LITERAL(idx, ofs, len) \
29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
30 | qptrdiff(offsetof(qt_meta_stringdata_MainWindow_t, stringdata0) + ofs \
31 | - idx * sizeof(QByteArrayData)) \
32 | )
33 | static const qt_meta_stringdata_MainWindow_t qt_meta_stringdata_MainWindow = {
34 | {
35 | QT_MOC_LITERAL(0, 0, 10), // "MainWindow"
36 | QT_MOC_LITERAL(1, 11, 38), // "on_listWidget_groups_itemDoub..."
37 | QT_MOC_LITERAL(2, 50, 0), // ""
38 | QT_MOC_LITERAL(3, 51, 16), // "QListWidgetItem*"
39 | QT_MOC_LITERAL(4, 68, 4) // "item"
40 |
41 | },
42 | "MainWindow\0on_listWidget_groups_itemDoubleClicked\0"
43 | "\0QListWidgetItem*\0item"
44 | };
45 | #undef QT_MOC_LITERAL
46 |
47 | static const uint qt_meta_data_MainWindow[] = {
48 |
49 | // content:
50 | 8, // revision
51 | 0, // classname
52 | 0, 0, // classinfo
53 | 1, 14, // methods
54 | 0, 0, // properties
55 | 0, 0, // enums/sets
56 | 0, 0, // constructors
57 | 0, // flags
58 | 0, // signalCount
59 |
60 | // slots: name, argc, parameters, tag, flags
61 | 1, 1, 19, 2, 0x08 /* Private */,
62 |
63 | // slots: parameters
64 | QMetaType::Void, 0x80000000 | 3, 4,
65 |
66 | 0 // eod
67 | };
68 |
69 | void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
70 | {
71 | if (_c == QMetaObject::InvokeMetaMethod) {
72 | auto *_t = static_cast(_o);
73 | Q_UNUSED(_t)
74 | switch (_id) {
75 | case 0: _t->on_listWidget_groups_itemDoubleClicked((*reinterpret_cast< QListWidgetItem*(*)>(_a[1]))); break;
76 | default: ;
77 | }
78 | }
79 | }
80 |
81 | QT_INIT_METAOBJECT const QMetaObject MainWindow::staticMetaObject = { {
82 | QMetaObject::SuperData::link(),
83 | qt_meta_stringdata_MainWindow.data,
84 | qt_meta_data_MainWindow,
85 | qt_static_metacall,
86 | nullptr,
87 | nullptr
88 | } };
89 |
90 |
91 | const QMetaObject *MainWindow::metaObject() const
92 | {
93 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
94 | }
95 |
96 | void *MainWindow::qt_metacast(const char *_clname)
97 | {
98 | if (!_clname) return nullptr;
99 | if (!strcmp(_clname, qt_meta_stringdata_MainWindow.stringdata0))
100 | return static_cast(this);
101 | return QMainWindow::qt_metacast(_clname);
102 | }
103 |
104 | int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
105 | {
106 | _id = QMainWindow::qt_metacall(_c, _id, _a);
107 | if (_id < 0)
108 | return _id;
109 | if (_c == QMetaObject::InvokeMetaMethod) {
110 | if (_id < 1)
111 | qt_static_metacall(this, _c, _id, _a);
112 | _id -= 1;
113 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
114 | if (_id < 1)
115 | *reinterpret_cast(_a[0]) = -1;
116 | _id -= 1;
117 | }
118 | return _id;
119 | }
120 | QT_WARNING_POP
121 | QT_END_MOC_NAMESPACE
122 |
--------------------------------------------------------------------------------
/PyQt5_gui/build-gui_test-Desktop_Qt_5_15_1_MinGW_32_bit-Debug/debug/moc_model_dialog.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'model_dialog.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.1)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include
10 | #include "../../PyQT5_project/model_dialog.h"
11 | #include
12 | #include
13 | #if !defined(Q_MOC_OUTPUT_REVISION)
14 | #error "The header file 'model_dialog.h' doesn't include ."
15 | #elif Q_MOC_OUTPUT_REVISION != 67
16 | #error "This file was generated using the moc from 5.15.1. It"
17 | #error "cannot be used with the include files from this version of Qt."
18 | #error "(The moc has changed too much.)"
19 | #endif
20 |
21 | QT_BEGIN_MOC_NAMESPACE
22 | QT_WARNING_PUSH
23 | QT_WARNING_DISABLE_DEPRECATED
24 | struct qt_meta_stringdata_model_dialog_t {
25 | QByteArrayData data[1];
26 | char stringdata0[13];
27 | };
28 | #define QT_MOC_LITERAL(idx, ofs, len) \
29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
30 | qptrdiff(offsetof(qt_meta_stringdata_model_dialog_t, stringdata0) + ofs \
31 | - idx * sizeof(QByteArrayData)) \
32 | )
33 | static const qt_meta_stringdata_model_dialog_t qt_meta_stringdata_model_dialog = {
34 | {
35 | QT_MOC_LITERAL(0, 0, 12) // "model_dialog"
36 |
37 | },
38 | "model_dialog"
39 | };
40 | #undef QT_MOC_LITERAL
41 |
42 | static const uint qt_meta_data_model_dialog[] = {
43 |
44 | // content:
45 | 8, // revision
46 | 0, // classname
47 | 0, 0, // classinfo
48 | 0, 0, // methods
49 | 0, 0, // properties
50 | 0, 0, // enums/sets
51 | 0, 0, // constructors
52 | 0, // flags
53 | 0, // signalCount
54 |
55 | 0 // eod
56 | };
57 |
58 | void model_dialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
59 | {
60 | Q_UNUSED(_o);
61 | Q_UNUSED(_id);
62 | Q_UNUSED(_c);
63 | Q_UNUSED(_a);
64 | }
65 |
66 | QT_INIT_METAOBJECT const QMetaObject model_dialog::staticMetaObject = { {
67 | QMetaObject::SuperData::link(),
68 | qt_meta_stringdata_model_dialog.data,
69 | qt_meta_data_model_dialog,
70 | qt_static_metacall,
71 | nullptr,
72 | nullptr
73 | } };
74 |
75 |
76 | const QMetaObject *model_dialog::metaObject() const
77 | {
78 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
79 | }
80 |
81 | void *model_dialog::qt_metacast(const char *_clname)
82 | {
83 | if (!_clname) return nullptr;
84 | if (!strcmp(_clname, qt_meta_stringdata_model_dialog.stringdata0))
85 | return static_cast(this);
86 | return QDialog::qt_metacast(_clname);
87 | }
88 |
89 | int model_dialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
90 | {
91 | _id = QDialog::qt_metacall(_c, _id, _a);
92 | return _id;
93 | }
94 | QT_WARNING_POP
95 | QT_END_MOC_NAMESPACE
96 |
--------------------------------------------------------------------------------
/PyQt5_gui/build-gui_test-Desktop_Qt_5_15_1_MinGW_32_bit-Debug/debug/moc_model_dialog.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Stephane-S/Simplot_PlusPlus/82daaa67b54c2a8e31909945ac9a69ef026ef067/PyQt5_gui/build-gui_test-Desktop_Qt_5_15_1_MinGW_32_bit-Debug/debug/moc_model_dialog.o
--------------------------------------------------------------------------------
/PyQt5_gui/build-gui_test-Desktop_Qt_5_15_1_MinGW_32_bit-Debug/debug/moc_seq_window.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'seq_window.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.1)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include
10 | #include "../../PyQT5_project/seq_window.h"
11 | #include
12 | #include
13 | #if !defined(Q_MOC_OUTPUT_REVISION)
14 | #error "The header file 'seq_window.h' doesn't include ."
15 | #elif Q_MOC_OUTPUT_REVISION != 67
16 | #error "This file was generated using the moc from 5.15.1. It"
17 | #error "cannot be used with the include files from this version of Qt."
18 | #error "(The moc has changed too much.)"
19 | #endif
20 |
21 | QT_BEGIN_MOC_NAMESPACE
22 | QT_WARNING_PUSH
23 | QT_WARNING_DISABLE_DEPRECATED
24 | struct qt_meta_stringdata_Seq_window_t {
25 | QByteArrayData data[3];
26 | char stringdata0[36];
27 | };
28 | #define QT_MOC_LITERAL(idx, ofs, len) \
29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
30 | qptrdiff(offsetof(qt_meta_stringdata_Seq_window_t, stringdata0) + ofs \
31 | - idx * sizeof(QByteArrayData)) \
32 | )
33 | static const qt_meta_stringdata_Seq_window_t qt_meta_stringdata_Seq_window = {
34 | {
35 | QT_MOC_LITERAL(0, 0, 10), // "Seq_window"
36 | QT_MOC_LITERAL(1, 11, 23), // "on_pushButton_3_clicked"
37 | QT_MOC_LITERAL(2, 35, 0) // ""
38 |
39 | },
40 | "Seq_window\0on_pushButton_3_clicked\0"
41 | };
42 | #undef QT_MOC_LITERAL
43 |
44 | static const uint qt_meta_data_Seq_window[] = {
45 |
46 | // content:
47 | 8, // revision
48 | 0, // classname
49 | 0, 0, // classinfo
50 | 1, 14, // methods
51 | 0, 0, // properties
52 | 0, 0, // enums/sets
53 | 0, 0, // constructors
54 | 0, // flags
55 | 0, // signalCount
56 |
57 | // slots: name, argc, parameters, tag, flags
58 | 1, 0, 19, 2, 0x08 /* Private */,
59 |
60 | // slots: parameters
61 | QMetaType::Void,
62 |
63 | 0 // eod
64 | };
65 |
66 | void Seq_window::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
67 | {
68 | if (_c == QMetaObject::InvokeMetaMethod) {
69 | auto *_t = static_cast(_o);
70 | Q_UNUSED(_t)
71 | switch (_id) {
72 | case 0: _t->on_pushButton_3_clicked(); break;
73 | default: ;
74 | }
75 | }
76 | Q_UNUSED(_a);
77 | }
78 |
79 | QT_INIT_METAOBJECT const QMetaObject Seq_window::staticMetaObject = { {
80 | QMetaObject::SuperData::link(),
81 | qt_meta_stringdata_Seq_window.data,
82 | qt_meta_data_Seq_window,
83 | qt_static_metacall,
84 | nullptr,
85 | nullptr
86 | } };
87 |
88 |
89 | const QMetaObject *Seq_window::metaObject() const
90 | {
91 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
92 | }
93 |
94 | void *Seq_window::qt_metacast(const char *_clname)
95 | {
96 | if (!_clname) return nullptr;
97 | if (!strcmp(_clname, qt_meta_stringdata_Seq_window.stringdata0))
98 | return static_cast(this);
99 | return QDialog::qt_metacast(_clname);
100 | }
101 |
102 | int Seq_window::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
103 | {
104 | _id = QDialog::qt_metacall(_c, _id, _a);
105 | if (_id < 0)
106 | return _id;
107 | if (_c == QMetaObject::InvokeMetaMethod) {
108 | if (_id < 1)
109 | qt_static_metacall(this, _c, _id, _a);
110 | _id -= 1;
111 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
112 | if (_id < 1)
113 | *reinterpret_cast(_a[0]) = -1;
114 | _id -= 1;
115 | }
116 | return _id;
117 | }
118 | QT_WARNING_POP
119 | QT_END_MOC_NAMESPACE
120 |
--------------------------------------------------------------------------------
/PyQt5_gui/build-gui_test-Desktop_Qt_5_15_1_MinGW_32_bit-Debug/debug/moc_seq_window.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Stephane-S/Simplot_PlusPlus/82daaa67b54c2a8e31909945ac9a69ef026ef067/PyQt5_gui/build-gui_test-Desktop_Qt_5_15_1_MinGW_32_bit-Debug/debug/moc_seq_window.o
--------------------------------------------------------------------------------
/PyQt5_gui/build-gui_test-Desktop_Qt_5_15_1_MinGW_32_bit-Debug/debug/model_dialog.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Stephane-S/Simplot_PlusPlus/82daaa67b54c2a8e31909945ac9a69ef026ef067/PyQt5_gui/build-gui_test-Desktop_Qt_5_15_1_MinGW_32_bit-Debug/debug/model_dialog.o
--------------------------------------------------------------------------------
/PyQt5_gui/build-gui_test-Desktop_Qt_5_15_1_MinGW_32_bit-Debug/debug/seq_window.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Stephane-S/Simplot_PlusPlus/82daaa67b54c2a8e31909945ac9a69ef026ef067/PyQt5_gui/build-gui_test-Desktop_Qt_5_15_1_MinGW_32_bit-Debug/debug/seq_window.o
--------------------------------------------------------------------------------
/PyQt5_gui/group_list_widget.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Form implementation generated from reading ui file '.\group_list_widget.ui'
4 | #
5 | # Created by: PyQt5 UI code generator 5.15.0
6 | #
7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is
8 | # run again. Do not edit this file unless you know what you are doing.
9 |
10 |
11 | from PyQt5 import QtCore, QtGui, QtWidgets
12 |
13 |
14 | class Ui_group_list_widget(object):
15 | def setupUi(self, group_list_widget):
16 | group_list_widget.setObjectName("group_list_widget")
17 | group_list_widget.resize(300, 75)
18 | group_list_widget.setMinimumSize(QtCore.QSize(300, 0))
19 | group_list_widget.setMaximumSize(QtCore.QSize(300, 75))
20 | group_list_widget.setStyleSheet("")
21 | self.verticalLayout = QtWidgets.QVBoxLayout(group_list_widget)
22 | self.verticalLayout.setContentsMargins(0, 0, 0, 0)
23 | self.verticalLayout.setSpacing(0)
24 | self.verticalLayout.setObjectName("verticalLayout")
25 | self.frame = QtWidgets.QFrame(group_list_widget)
26 | self.frame.setStyleSheet("border-top: 1px solid black;\n"
27 | "\n"
28 | "border-bottom: 1px solid black;")
29 | self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
30 | self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
31 | self.frame.setObjectName("frame")
32 | self.horizontalLayout = QtWidgets.QHBoxLayout(self.frame)
33 | self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
34 | self.horizontalLayout.setSpacing(0)
35 | self.horizontalLayout.setObjectName("horizontalLayout")
36 | self.frame_2 = QtWidgets.QFrame(self.frame)
37 | self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel)
38 | self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised)
39 | self.frame_2.setObjectName("frame_2")
40 | self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.frame_2)
41 | self.verticalLayout_2.setContentsMargins(4, 4, 4, 4)
42 | self.verticalLayout_2.setSpacing(0)
43 | self.verticalLayout_2.setObjectName("verticalLayout_2")
44 | self.Btn_group_color = QtWidgets.QPushButton(self.frame_2)
45 | self.Btn_group_color.setMinimumSize(QtCore.QSize(60, 60))
46 | self.Btn_group_color.setStyleSheet("border: 0px;\n"
47 | "background-color: rgb(0, 170, 255);\n"
48 | "border-radius: 30px;")
49 | self.Btn_group_color.setText("")
50 | self.Btn_group_color.setFlat(False)
51 | self.Btn_group_color.setObjectName("Btn_group_color")
52 | self.verticalLayout_2.addWidget(self.Btn_group_color)
53 | self.horizontalLayout.addWidget(self.frame_2)
54 | self.frame_4 = QtWidgets.QFrame(self.frame)
55 | self.frame_4.setStyleSheet("")
56 | self.frame_4.setFrameShape(QtWidgets.QFrame.StyledPanel)
57 | self.frame_4.setFrameShadow(QtWidgets.QFrame.Raised)
58 | self.frame_4.setObjectName("frame_4")
59 | self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.frame_4)
60 | self.verticalLayout_3.setObjectName("verticalLayout_3")
61 | self.lineEdit_group_name = QtWidgets.QLineEdit(self.frame_4)
62 | self.lineEdit_group_name.setStyleSheet("border: 1px solid black")
63 | self.lineEdit_group_name.setText("")
64 | self.lineEdit_group_name.setObjectName("lineEdit_group_name")
65 | self.verticalLayout_3.addWidget(self.lineEdit_group_name)
66 | self.label_seq_length = QtWidgets.QLabel(self.frame_4)
67 | self.label_seq_length.setStyleSheet("border: 0px;")
68 | self.label_seq_length.setFrameShape(QtWidgets.QFrame.NoFrame)
69 | self.label_seq_length.setFrameShadow(QtWidgets.QFrame.Plain)
70 | self.label_seq_length.setLineWidth(-22)
71 | self.label_seq_length.setText("")
72 | self.label_seq_length.setObjectName("label_seq_length")
73 | self.verticalLayout_3.addWidget(self.label_seq_length)
74 | self.horizontalLayout.addWidget(self.frame_4)
75 | self.verticalLayout.addWidget(self.frame)
76 |
77 | self.retranslateUi(group_list_widget)
78 | QtCore.QMetaObject.connectSlotsByName(group_list_widget)
79 |
80 | def retranslateUi(self, group_list_widget):
81 | _translate = QtCore.QCoreApplication.translate
82 | group_list_widget.setWindowTitle(_translate("group_list_widget", "Form"))
83 |
--------------------------------------------------------------------------------
/PyQt5_gui/group_widget_info.txt:
--------------------------------------------------------------------------------
1 | procedure to modify the group_widget.py file.
2 |
3 | This file's layout and .ui comes from "group_list_widget.py", obtainable through "pyuic5 .\group_list_widget.ui -o group_list_widget.py" in the child folder "PyQt5_project"
4 |
5 | To modify the layout, follow these steps:
6 |
7 | 1. replace the layout of the "group_widget.py" from the modified "group_list_widget.py"
8 | 2. make sure "group_list_widget.setObjectName("group_list_widget")" and "# Ui_group_widget.resize(221, 81)" are commented out
9 | 3. replace all "group_list_widget" and "group_widget" variables in layout by "self"
10 | 4. make sure to add the name, color etc. variables in the right widgets
--------------------------------------------------------------------------------
/PyQt5_gui/seq_window.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Form implementation generated from reading ui file 'seq_window.ui'
4 | #
5 | # Created by: PyQt5 UI code generator 5.13.0
6 | #
7 | # WARNING! All changes made in this file will be lost!
8 |
9 |
10 | from PyQt5 import QtCore, QtGui, QtWidgets
11 |
12 |
13 | class Ui_Seq_window(object):
14 | def setupUi(self, Seq_window, groupName):
15 | Seq_window.setObjectName("Seq_window")
16 | Seq_window.resize(958, 411)
17 | self.buttonBox = QtWidgets.QDialogButtonBox(Seq_window)
18 | self.buttonBox.setGeometry(QtCore.QRect(280, 370, 341, 32))
19 | self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
20 | self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
21 | self.buttonBox.setObjectName("buttonBox")
22 | self.horizontalLayoutWidget = QtWidgets.QWidget(Seq_window)
23 | self.horizontalLayoutWidget.setGeometry(QtCore.QRect(30, 90, 901, 261))
24 | self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
25 | self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
26 | self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
27 | self.horizontalLayout.setObjectName("horizontalLayout")
28 | self.seqOutput = QtWidgets.QListWidget(self.horizontalLayoutWidget)
29 | self.seqOutput.setObjectName("seqOutput")
30 | self.horizontalLayout.addWidget(self.seqOutput)
31 | self.verticalLayout_2 = QtWidgets.QVBoxLayout()
32 | self.verticalLayout_2.setContentsMargins(-1, 20, -1, 20)
33 | self.verticalLayout_2.setSpacing(1)
34 | self.verticalLayout_2.setObjectName("verticalLayout_2")
35 | self.mBtnMoveToSelected = QtWidgets.QPushButton(self.horizontalLayoutWidget)
36 | self.mBtnMoveToSelected.setObjectName("mBtnMoveToSelected")
37 | self.verticalLayout_2.addWidget(self.mBtnMoveToSelected)
38 | self.mButtonToAvailable = QtWidgets.QPushButton(self.horizontalLayoutWidget)
39 | self.mButtonToAvailable.setObjectName("mButtonToAvailable")
40 | self.verticalLayout_2.addWidget(self.mButtonToAvailable)
41 | self.mBtnMoveToAvailable = QtWidgets.QPushButton(self.horizontalLayoutWidget)
42 | self.mBtnMoveToAvailable.setObjectName("mBtnMoveToAvailable")
43 | self.verticalLayout_2.addWidget(self.mBtnMoveToAvailable)
44 | self.mButtonToSelected = QtWidgets.QPushButton(self.horizontalLayoutWidget)
45 | self.mButtonToSelected.setObjectName("mButtonToSelected")
46 | self.verticalLayout_2.addWidget(self.mButtonToSelected)
47 | self.horizontalLayout.addLayout(self.verticalLayout_2)
48 | self.seqInput = QtWidgets.QListWidget(self.horizontalLayoutWidget)
49 | self.seqInput.setObjectName("seqInput")
50 | self.horizontalLayout.addWidget(self.seqInput)
51 | self.horizontalLayoutWidget_2 = QtWidgets.QWidget(Seq_window)
52 | self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(30, 29, 891, 51))
53 | self.horizontalLayoutWidget_2.setObjectName("horizontalLayoutWidget_2")
54 | self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_2)
55 | self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
56 | self.horizontalLayout_2.setObjectName("horizontalLayout_2")
57 | self.label_2 = QtWidgets.QLabel(self.horizontalLayoutWidget_2)
58 | self.label_2.setAlignment(QtCore.Qt.AlignCenter)
59 | self.label_2.setObjectName("label_2")
60 | self.label_2.setText(groupName)
61 | self.horizontalLayout_2.addWidget(self.label_2)
62 | self.label = QtWidgets.QLabel(self.horizontalLayoutWidget_2)
63 | self.label.setAlignment(QtCore.Qt.AlignCenter)
64 | self.label.setObjectName("label")
65 | self.horizontalLayout_2.addWidget(self.label)
66 |
67 | self.retranslateUi(Seq_window)
68 | self.buttonBox.accepted.connect(Seq_window.accept)
69 | self.buttonBox.rejected.connect(Seq_window.reject)
70 | QtCore.QMetaObject.connectSlotsByName(Seq_window)
71 |
72 | def retranslateUi(self, Seq_window):
73 | _translate = QtCore.QCoreApplication.translate
74 | Seq_window.setWindowTitle(_translate("Seq_window", "Group Editor"))
75 | self.mBtnMoveToSelected.setText(_translate("Seq_window", ">>"))
76 | self.mButtonToAvailable.setText(_translate("Seq_window", ">"))
77 | self.mBtnMoveToAvailable.setText(_translate("Seq_window", "<"))
78 | self.mButtonToSelected.setText(_translate("Seq_window", "<<"))
79 | #self.label_2.setText(_translate("Seq_window", ""))
80 | self.label.setText(_translate("Seq_window", "Sequences"))
81 |
--------------------------------------------------------------------------------
/SimPlot.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Stephane-S/Simplot_PlusPlus/82daaa67b54c2a8e31909945ac9a69ef026ef067/SimPlot.ico
--------------------------------------------------------------------------------
/lib/FindSites/findsites.py:
--------------------------------------------------------------------------------
1 | import pathlib
2 | from Bio import SeqIO
3 |
4 |
5 | class FindSitesAnalysis:
6 | def __init__(self, filepath, filetype, query, ref1, ref2, outgroup): # add group class, progress bar
7 |
8 | self.initial_setup(filepath, query, ref1, ref2, outgroup)
9 | result_dict, count = self.findsites(filepath, filetype, query, ref1, ref2, outgroup)
10 | self.write_output(result_dict, count)
11 |
12 | def initial_setup(self, filepath, query, ref1, ref2, outgroup):
13 | input_path = pathlib.Path(filepath)
14 |
15 | with open("temp_findSite.txt", "w") as data_file:
16 | data_file.write("input file: " + str(input_path) + "\n\n" +
17 | "Using the letters A, B, C and D as placeholders:" + "\n" +
18 | "A = " + query + "\n" +
19 | "B = " + ref1 + "\n" +
20 | "C = " + ref2 + "\n" +
21 | "D = " + outgroup + "\n\n" +
22 | "There are 3 possible bifurcating trees:" + "\n\n"+
23 | " 1 2 3" + "\n" +
24 | " A C A B A B" + "\n" +
25 | " \___/ \___/ \___/ " + "\n" +
26 | " / \ / \ / \\" + "\n" +
27 | " B D C D D C" + "\n" +
28 | "\n\n\n")
29 |
30 |
31 |
32 | def extract_sequences(self, filepath, filetype, query, ref1, ref2, outgroup):
33 | records = SeqIO.parse(filepath, filetype)
34 | for record in records:
35 | if record.id == str(query):
36 | seq_query = str(record.seq)
37 | elif record.id == str(ref1):
38 | seq_ref1 = str(record.seq)
39 | elif record.id == str(ref2):
40 | seq_ref2 = str(record.seq)
41 | elif record.id == str(outgroup):
42 | seq_outgroup = str(record.seq)
43 |
44 | return seq_query, seq_ref1, seq_ref2, seq_outgroup
45 |
46 | def findsites(self, filepath, filetype, query, ref1, ref2, outgroup):
47 | seq_query, seq_ref1, seq_ref2, seq_outgroup = self.extract_sequences(filepath, filetype, query, ref1, ref2, outgroup)
48 |
49 | # dict in following format: "position" :[seq_query, seq_ref1, seq_ref2, seq_outgroup, tree]
50 | result_dict = {}
51 | count = 0
52 | for i in range (len(seq_query)):
53 | tree = 0
54 | if seq_query[i] == seq_ref1[i] and seq_ref2[i] == seq_outgroup[i] and seq_query[i] != seq_ref2[i] \
55 | and seq_query[i] != "-" and seq_query[i] != "?" and seq_ref2[i] != "-" and seq_ref2[i] != "?":
56 | tree = "1"
57 |
58 | elif seq_query[i] == seq_ref2[i] and seq_ref1[i] == seq_outgroup[i] and seq_query[i] != seq_ref1[i] \
59 | and seq_query[i] != "-" and seq_query[i] != "?" and seq_ref1[i] != "-" and seq_ref1[i] != "?":
60 | tree = "2"
61 |
62 | elif seq_query[i] == seq_outgroup[i] and seq_ref1[i] == seq_ref2[i] and seq_query[i] != seq_ref1[i] \
63 | and seq_query[i] != "-" and seq_query[i] != "?" and seq_ref1[i] != "-" and seq_ref1[i] != "?":
64 | tree = "3"
65 |
66 | if tree != 0:
67 | count += 1
68 | #print ("position:" ,i+1, seq_query[i], seq_ref1[i], seq_ref2[i], seq_outgroup[i], tree)
69 | temp_list = [seq_query[i], seq_ref1[i], seq_ref2[i], seq_outgroup[i], tree]
70 | result_dict[i+1] = temp_list
71 |
72 |
73 | return result_dict, count
74 |
75 |
76 | def write_output(self, result_dict, count):
77 | with open("temp_findSite.txt", "a") as data_file:
78 | data_file.write("Total sites: " + str(count) + "\n" +"pos \tA \tB \tC \t D\t Tree\n" +
79 | "--- --- --- --- --- -----\n")
80 |
81 | # dict in following format: "position" :[seq_query, seq_ref1, seq_ref2, seq_outgroup, tree]
82 | for position, values in result_dict.items():
83 | data_file.write(str(position) + "\t" + values[0] + "\t" +values[1] + "\t" + values[2]+ "\t " + values[3] + "\t " + values[4] + "\n")
84 |
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/lib/Misc/global_running.py:
--------------------------------------------------------------------------------
1 | from PyQt5.QtCore import QObject, pyqtSignal
2 |
3 |
4 | class RunningStatus:
5 | """
6 | This class is used to manage the status of the app in relation with the analyses QThread() used by the SimPlot
7 | and Bootscanning analyses. If the GUI is closed during an analysis, the running variable will be switched
8 | to False and this value will be accessible by both the analysis_class and bootscan class and the workers to speed
9 | through the analysis and free the cpu cores.
10 | """
11 | def __init__(self):
12 | self.running = True
13 |
14 | def terminate(self):
15 | self.running = False
16 |
17 | def reset_status(self):
18 | self.running = True
19 |
20 | def get_status(self):
21 | return self.running
--------------------------------------------------------------------------------
/lib/Misc/groups_class.py:
--------------------------------------------------------------------------------
1 | from Bio import SeqIO
2 | import pathlib
3 |
4 | class Groups:
5 | def __init__(self, file_path, file_format, datatype):
6 | self.file_path = pathlib.Path(file_path)
7 | self.file_format = file_format
8 | self.datatype = datatype
9 | self.seq_list = self.list_seq()
10 | self.groups_dict = {}
11 | self.groups_colors = {}
12 | self.groups_id = {}
13 | self.ungrouped_seq = self.seq_list.copy()
14 | # print ("Groups class instance created")
15 |
16 | def add_group_color(self, group_name, color):
17 | self.groups_colors[group_name] = color
18 |
19 | def list_seq(self):
20 | seq_list = []
21 |
22 | for record in SeqIO.parse(self.file_path, self.file_format):
23 | seq_list.append(record.id)
24 | return seq_list
25 |
26 | def add_group(self, group_name):
27 | self.groups_dict[group_name]= []
28 | self.groups_id[group_name] = group_name.replace(" ", "_")
29 | #self.groups_colors[group_name] = None
30 | #print (group_name + " added")
31 |
32 | def remove_group(self, group_name):
33 | if group_name is not None:
34 | seq_list = self.groups_dict[group_name]
35 | self.ungrouped_seq = self.ungrouped_seq + seq_list
36 |
37 | self.groups_dict.pop(group_name)
38 | self.groups_colors.pop(group_name)
39 | del self.groups_id[group_name]
40 | #print (group_name + " removed")
41 |
42 |
43 | def change_group_name(self, old, new):
44 | if old != new:
45 | self.groups_dict[new] = self.groups_dict[old]
46 | self.groups_colors[new] = self.groups_colors.pop(old)
47 | del self.groups_dict[old]
48 | del self.groups_id[old]
49 | self.groups_id[new] = new.replace(" ", "_")
50 |
51 | def update_group(self, group, seq): #seq is a list here
52 | new_seq = [item for item in seq if item not in self.groups_dict[group]] #get seqs added by user
53 | removed_seq = [item for item in self.groups_dict[group] if item not in seq] #get seqs removed by user
54 |
55 | # print ("----")
56 | # print ("new_seq:", new_seq)
57 | # print ("removed_seq:", removed_seq)
58 |
59 | for seq in removed_seq:
60 | self.groups_dict[group].remove(seq)
61 |
62 | self.groups_dict[group] = self.groups_dict[group]+ new_seq
63 | self.ungrouped_seq = self.ungrouped_seq + removed_seq
64 |
65 | # print ("self.ungrouped_seq:", self.ungrouped_seq)
66 |
67 | for seq in new_seq:
68 | self.ungrouped_seq.remove(seq)
69 |
70 | #print ("updated")
71 | # for i, j in self.return_groups_dict().items():
72 | # print (i,j)
73 | # print("---------------------------------------------")
74 |
75 | def check_if_empty_group(self):
76 | empty_group = False
77 | for group_name, content in self.groups_dict.items():
78 | if content is None or content == []:
79 | empty_group = True
80 |
81 | return empty_group
82 |
83 | def set_groups_dict(self, dict):
84 | self.groups_dict = dict
85 |
86 | def remove_seq_from_group(self, group, seq):
87 | self.groups_dict[group].remove(seq)
88 | self.ungrouped_seq.append(seq)
89 |
90 | def get_ungrouped_seq(self):
91 | return self.ungrouped_seq
92 |
93 | def get_seq_in_group(self, group):
94 | return self.groups_dict[group]
95 |
96 | def return_groups_dict(self):
97 | return self.groups_dict.copy()
98 |
99 | def get_group_names(self):
100 | return self.groups_dict.keys()
101 |
102 | def get_file_path(self):
103 | return self.file_path
104 |
105 | def get_file_format(self):
106 | return self.file_format
107 |
108 | def get_seq_list(self):
109 | return self.seq_list
110 |
111 | def get_datatype(self):
112 | return self.datatype
113 |
114 | def get_groups_colors(self):
115 | #print ("giving groups_colors", self.groups_colors)
116 | return self.groups_colors
117 |
118 | def get_groups_id(self):
119 | return self.groups_id
120 |
121 | def show_groups_colors(self):
122 | print (self.groups_colors.items())
123 |
--------------------------------------------------------------------------------
/lib/Misc/preferences.py:
--------------------------------------------------------------------------------
1 | from configparser import ConfigParser
2 | import pathlib
3 |
4 | class user_preferences:
5 | def __init__(self):
6 | self.pref_filepath = pathlib.Path("stored/user_preferences.ini")
7 | self.pref_dict = self.load_user_pref()
8 |
9 | def save_pref_dict(self, pref_dict):
10 | config = ConfigParser()
11 | for key, value in pref_dict.items():
12 | config.set("user_preferences", key, value)
13 |
14 | with open(self.pref_filepath, "w") as configfile:
15 | config.write(configfile)
16 |
17 | print("user preferences saved")
18 |
19 |
20 | def load_user_pref(self):
21 | config = ConfigParser()
22 | user_pref_dict = self.get_default_preferences()
23 | if self.pref_filepath.is_file():
24 | try:
25 | config.read(self.pref_filepath)
26 | user_pref_dict["display_ambiguous_warning"] = config.getboolean("user_preferences", "display_ambiguous_warning")
27 | user_pref_dict["auto_save_sp_qual"] = config.getboolean("user_preferences", "auto_save_sp_qual")
28 | user_pref_dict["consensus_threshold"] = config.getfloat("user_preferences", "consensus_threshold")
29 | user_pref_dict["X_grid_lines"] = config.getboolean("user_preferences", "X_grid_lines")
30 | user_pref_dict["Y_grid_lines"] = config.getboolean("user_preferences", "Y_grid_lines")
31 | user_pref_dict["normalize_simplot"] = config.getboolean("user_preferences", "normalize_simplot")
32 | user_pref_dict["nprocs"] = config.getint("user_preferences", "nprocs")
33 | user_pref_dict["network_svg"] = config.getboolean("user_preferences", "network_svg")
34 | except Exception:
35 | print ("error exception preferences")
36 | self.create_preference_config_file()
37 |
38 | else:
39 | self.create_preference_config_file()
40 |
41 | return user_pref_dict
42 |
43 |
44 | def create_preference_config_file(self, user_pref_dict=None):
45 | config = ConfigParser()
46 | if user_pref_dict is None:
47 | user_pref_dict = {"display_ambiguous_warning": "true",
48 | "auto_save_sp_qual": "false",
49 | "consensus_threshold": "0.5",
50 | "X_grid_lines": "false",
51 | "Y_grid_lines": "false",
52 | "normalize_simplot": "false",
53 | "nprocs": "1",
54 | "network_svg": "true"
55 | }
56 |
57 | config.add_section("user_preferences")
58 | for key, value in user_pref_dict.items():
59 | config.set("user_preferences", key, value)
60 |
61 | # create stored folder if it doesnt exist
62 | parent_directory_of_file = self.pref_filepath.parent
63 | parent_directory_of_file.mkdir(parents=True, exist_ok=True)
64 |
65 | with open(self.pref_filepath, "w") as configfile:
66 | config.write(configfile)
67 |
68 | def get_default_preferences(self):
69 | user_pref_dict = {"display_ambiguous_warning": True,
70 | "auto_save_sp_qual": False,
71 | "consensus_threshold": 0.5,
72 | "X_grid_lines": False,
73 | "Y_grid_lines": False,
74 | "normalize_simplot": False,
75 | "nprocs": 1,
76 | "network_svg": True
77 | }
78 | return user_pref_dict
79 |
--------------------------------------------------------------------------------
/lib/recombination_tests/lib/pair_score.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 | from lib.recombination_tests.lib.misc import *
3 | from numba import njit, int32, int64, jit
4 | from numba.experimental import jitclass
5 |
6 |
7 | @njit()
8 | def create_new_node(array, new_value, num_taxa):
9 | arr = np.empty(num_taxa, dtype=np.int64)
10 | arr.fill(-1)
11 | pos = 0
12 | arr[pos] = int64(new_value)
13 | pos += 1
14 | for i in range(num_taxa - 1):
15 | arr[pos] = array[i]
16 | pos += 1
17 |
18 | return arr
19 |
20 |
21 | @njit()
22 | def pair_score(alignment, site_states, char_a, char_b, num_sites, num_taxa):
23 | char_a_states = site_states[char_a]
24 | char_b_states = site_states[char_b]
25 | total_states = int(char_a_states + char_b_states)
26 |
27 | top = 0
28 | cur_vertex = 0
29 | inc_score = -1
30 | array_stack = np.zeros(total_states)
31 | adjacency_matrix = np.zeros((total_states, total_states), dtype=np.int64)
32 |
33 | adjacency_list = []
34 | for i in range(total_states):
35 | arr = np.empty(num_taxa, dtype=int64)
36 | arr.fill(-1)
37 | adjacency_list.append(arr)
38 |
39 |
40 | edge_count = 0
41 | for i in range(num_taxa):
42 | char_a_val = int(alignment[char_a, i])
43 | char_b_val = int(alignment[char_b, i])
44 | if char_a_val <= MAX_STATE and char_b_val <= MAX_STATE: # cond 1
45 | char_b_val = int(char_b_val + char_a_states)
46 |
47 | if not adjacency_matrix[char_a_val, char_b_val]: # if False == 0
48 | # Update symmetric adjacency matrix (undirected graph)
49 | adjacency_matrix[char_a_val, char_b_val] = 1
50 | adjacency_matrix[char_b_val, char_a_val] = 1
51 |
52 | edge_count += 1
53 |
54 | # Add to adjacency lists
55 | cur_node = adjacency_list[char_a_val]
56 | new_node = create_new_node(cur_node, int(char_b_val), num_taxa)
57 | adjacency_list[char_a_val] = new_node
58 | # and other list
59 | cur_node = adjacency_list[char_b_val]
60 | new_node = create_new_node(cur_node, int(char_a_val), num_taxa)
61 | adjacency_list[char_b_val] = new_node
62 |
63 | array_stack = np.zeros(total_states, dtype=np.int64)
64 | marked = np.zeros(total_states, dtype=np.int64)
65 | DFS_adjacency = []
66 | for i in range(total_states):
67 | DFS_adjacency.append(adjacency_list[i])
68 |
69 | top = -1
70 | comp_count = 0
71 | for i in range(total_states):
72 | if marked[i] == 0:
73 | comp_count += 1
74 | top += 1
75 | array_stack[top] = i
76 |
77 | while top >= 0:
78 | cur_vertex = int(array_stack[top])
79 | marked[cur_vertex] = 1
80 | has_valid_neighbour = False
81 | i_counter = 0
82 | while DFS_adjacency[cur_vertex][i_counter] != -1 and has_valid_neighbour is False:
83 | potential_neighbour = DFS_adjacency[cur_vertex][i_counter]
84 | if marked[potential_neighbour] == 0:
85 | top += 1
86 | array_stack[top] = potential_neighbour
87 | has_valid_neighbour = True
88 |
89 | else:
90 | i_counter += 1
91 |
92 | if has_valid_neighbour is False:
93 | top -= 1
94 |
95 | # For the pairwise incompatibility
96 | inc_score = edge_count - total_states + comp_count
97 |
98 | return inc_score
99 |
--------------------------------------------------------------------------------
/lib/recombination_tests/lib/queue.py:
--------------------------------------------------------------------------------
1 | from numba.experimental import jitclass
2 | from numba import int64
3 | import numpy as np
4 |
5 | spec = [
6 | ('max_size', int64), # a simple scalar field
7 | ('front', int64),
8 | ('back', int64),
9 | ('cur_size', int64),
10 | ('elements', int64[:]), # an array field
11 | ]
12 |
13 |
14 | @jitclass(spec)
15 | class QueueElem:
16 | def __init__(self, a):
17 | self.max_size = a
18 | self.front = 0
19 | self.back = 0
20 | self.cur_size = 0
21 | self.elements = np.zeros(a, dtype=int64)
22 |
23 | def clear_queue(self):
24 | self.front = 0
25 | self.back = 0
26 | self.cur_size = 0
27 |
28 | def enqueue(self, elem):
29 | if self.cur_size == self.max_size:
30 | #return -1
31 | pass
32 | else:
33 | self.elements[self.back] = elem
34 | self.cur_size += 1
35 | # loop around storage space
36 | self.back = (self.back + 1) % self.max_size
37 | #return self
38 |
39 | def at_position(self, elem, index):
40 | if index > self.cur_size:
41 | pass
42 | else:
43 | mapped_index = (self.front + index) % self.max_size
44 | elem = self.elements[mapped_index]
45 |
46 | return elem
47 |
48 | def dequeue_front(self, elem):
49 | if self.cur_size == 0:
50 | print ("cannot dequeue")
51 | return -1
52 | else:
53 | elem = self.elements[self.front]
54 | self.cur_size -= 1
55 | # loop around storage space
56 | self.front = (self.front + 1) % self.max_size
57 | return elem
58 |
59 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | biopython==1.78
2 | bokeh==2.2.3
3 | cogent3==2020.12.21a0
4 | colorcet==2.0.2
5 | matplotlib==3.3.1
6 | networkx==2.5
7 | numba==0.53.0
8 | numpy==1.19.1
9 | pandas==1.1.2
10 | psutil==5.8.0
11 | PyQt5==5.15.6
12 | tabulate==0.8.9
13 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | import sys
2 | from cx_Freeze import setup, Executable
3 |
4 | product_name = 'SimPlot++'
5 |
6 | bdist_msi_options = {
7 | 'upgrade_code': '{66620F3A-DC3A-11E2-B341-002219E9B01E}',
8 | 'add_to_path': False,
9 | 'initial_target_dir': r'[ProgramFilesFolder]\%s' % product_name
10 | }
11 |
12 | # Dependencies are automatically detected, but it might need fine tuning.
13 | # "packages": ["os"] is used as example only
14 | build_exe_options = {"packages": ["os", "cogent3"], "excludes": [], "include_files": ["example_data"]}
15 |
16 | # base="Win32GUI" should be used only for Windows GUI app
17 | base = None
18 | if sys.platform == "win32":
19 | base = "Win32GUI"
20 |
21 | setup(
22 | name = "SimPlot++",
23 | version = "1.3",
24 | author = "Stephane Samson",
25 | description = "Recombination detection software",
26 | options = {'bdist_msi': bdist_msi_options,
27 | "build_exe": build_exe_options},
28 | executables = [Executable("main.py", base=base,
29 | icon="SimPlot.ico",
30 | targetName="SimPlot++.exe",
31 | shortcut_name="SimPlot++",
32 | shortcutDir="DesktopFolder")]
33 | )
--------------------------------------------------------------------------------