-
Notifications
You must be signed in to change notification settings - Fork 0
/
gcta.cpp
executable file
·51 lines (43 loc) · 1.33 KB
/
gcta.cpp
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
#include "gcta.h"
Gcta::Gcta()
{
}
/**
* @brief Gcta::makeGRM Set practical parameters of GCTA to make .grm file.
* @param binGenoBaseName binary genotype file base name(without suffix)
* @param out out file path
* @return
*/
bool Gcta::makeGRM(QString binGenoBaseName, QString out)
{
if (binGenoBaseName.isNull() || out.isNull())
{
return false;
}
this->paramlist.clear();
// gcta64 --bfile 222_filter1_rec12 --make-grm --out 222_filter1_rec12
this->paramlist.append("--bfile");
this->paramlist.append(binGenoBaseName);
this->paramlist.append("--make-grm");
this->paramlist.append("--out");
this->paramlist.append(out);
return true;
}
bool Gcta::runPCA(QString grmBaseName, int PCs, int threads, QString out)
{
if (grmBaseName.isNull() || out.isNull() || PCs < 1 || threads < 1)
{
return false;
}
// gcta64 --grm 222_filter1_rec12 --pca 4 --out 222_filter1_rec12 --threads 56;
this->paramlist.clear();
this->paramlist.append("--grm");
this->paramlist.append(grmBaseName);
this->paramlist.append("--pca");
this->paramlist.append(QString::number(PCs));
this->paramlist.append("--out");
this->paramlist.append(out);
this->paramlist.append("--threads");
this->paramlist.append(QString::number(threads));
return true;
}