-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomputation.h
More file actions
49 lines (34 loc) · 1.22 KB
/
computation.h
File metadata and controls
49 lines (34 loc) · 1.22 KB
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
#ifndef COMPUTATION_H
#define COMPUTATION_H
#include "parsefile.h"
class computation
{
public:
computation(){};
computation(parsefile files,int rows = 0, int cols = 0);
void filter_simple(bool zeroes = true, double min_expr_perc = 0.1);
void filter_genes();
void normalisation(std::string type_of_normal = "col_mean");
void addGeneList(std::string geneListPath);
void addGeneList(std::vector<std::string> geneList);
void saveToFile(std::string filename);
std::vector<std::string> getcurrentGenes();
Eigen::MatrixXd compute_tot_expr();
const parsemtx &getExpression_raw() const;
protected:
parsemtx expression_raw;
parsing spatial;
std::vector<std::string> geneNames, geneSubset;
Eigen::MatrixXd A_spatial;
Eigen::MatrixXd* expression;
Eigen::MatrixXd total_expression;
Eigen::MatrixXd perc_expression;
// crop matrix
void initialise(int rows, int cols);
int block_rows_start,block_cols_start,block_rows,block_cols;
bool def = true;
// filter parameters
bool filterGenes = false;
Eigen::MatrixXd compute_total_expression(const Eigen::MatrixXd& expression, const Eigen::MatrixXd& spatial,bool perc=false);
};
#endif // COMPUTATION_H