-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathread_file.h
74 lines (65 loc) · 1.98 KB
/
read_file.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef READ_FILE_H
#define READ_FILE_H
#include <QObject>
#include<QFile>
#include<QFileDialog>
#include<QString>
#include<QDir>
#include <Eigen/Dense>
#include<QTextStream>
#include<QMessageBox>
#include"selcon.h"
#include"global.h"
using namespace Eigen;
class Read_file: public QObject
{
Q_OBJECT
public:
explicit Read_file(QObject *parent = nullptr);
~Read_file();
//signals:
Q_SIGNALS:
Q_SIGNAL void send_data( const QVector<double> & ,const QVector<double> & );
Q_SIGNAL void sendSolution(const QList< VectorXd> &);
Q_SIGNAL void sendlabels(const QStringList &);
Q_SIGNAL void sendProtInd(const MatrixXi &);
Q_SIGNAL void sendparams(const QList<VectorXi> &);
Q_SIGNAL void sendRefit(const VectorXd &);
Q_SIGNAL void sendNMRSD(const double&);
Q_SIGNAL void sendXVal(const QList<QList<double>> &);
Q_SIGNAL void xValNMRSDlist(const QList<double> &);
Q_SIGNAL void proteinList(const QStringList &);
//#####################################################
//progress bar
Q_SIGNAL void sendProg(const int &);
//#############################################
public Q_SLOTS:
void openSpectrum(QString &, bool &);
void openDataSet(QString &, VectorXd &Q);
void solutions(QList<VectorXd> );
void XValfiles(QString &);
QString openProtLabel(QString &, int &);
private Q_SLOTS:
void extract_data(QStringList &);
void read_data(QStringList &);
void getProtIndex(MatrixXi );
// void getParams(QList<VectorXi> );
void refit(VectorXd );
void NMRSD(double);
void progress( int );
// for xvalidation
void XValsolutions(QList<VectorXd> );
void refitList(VectorXd );
private:
int offset ;
int wave_column ;
int CD_column ;
QStringList labelList;
MatrixXi protIndex;
QList <VectorXi> params;
int col=1;
MatrixXd sel3solutions;
MatrixXd FXval;
QStringList protList;
};
#endif // READ_FILE_H