Skip to content

Commit

Permalink
change suffix as loadings
Browse files Browse the repository at this point in the history
  • Loading branch information
Zilong-Li committed Feb 14, 2022
1 parent b05e5e5 commit 5f5d5c5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.org
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- publish PCAone on mac with =libiomp5= support

- update makefile and setup bioconda
- update documentation

- add --shuffle option

Expand Down
11 changes: 5 additions & 6 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ PCAone is designed to be extensible to accept many different formats. Currently,

- eigen vectors :: eigen vectors are saved in file with suffix =.eigvecs=. each row represents a sample and each col represents a PC.
- eigen values :: eigen values are saved in file with suffix =.eigvals=. each row represents the eigenvalue of correspoding PC.
- loadings :: loadings are saved in file with suffix =.projection=. need to use =--printv= option.
- loadings :: loadings are saved in file with suffix =.loadings=. need to use =--printv= option.

** Advanced options

Expand Down Expand Up @@ -163,21 +163,20 @@ Usage:
--bfile PREFIX prefix of PLINK .bed/.bim/.fam files.
--bgen FILE path of BGEN file.
--csv FILE path of zstd compressed csv file.
--maxp INT maximum number of power iteration for Halko.[20]
--printv print out another eigen vectors with suffix .loadings.
-e, --emu use EMU algorithm for data with lots of missingness.
-f, --fast force to use fast super power iterations for Halko.
-h, --halko use Halko method instead of default Arnoldi method.
-k, --eigs INT top k components to be calculated.[10]
--maxp INT maximum number of power iteration for Halko.[20]
-m, --memory DOUBLE specify the RAM usage in GB unit instead of exploiting
the RAM of the server.
-n, --threads INT number of threads.[1]
-M, INT number of features. eg, SNPs.
-N, INT number of samples.
-o, --out PREFIX prefix of output files.
-p, --pcangsd use PCAngsd algorithm for genotype likelihood input.
--printv print out another eigen vectors with projection
suffix.
-v, --verbose verbose message output.
-M, INT number of features. eg. SNPs.
-N, INT number of samples.

#+end_src

Expand Down
2 changes: 1 addition & 1 deletion src/Data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void Data::write_eigs_files(const MyVector& S, const MyMatrix& U, const MyMatrix
outu << U << '\n';
}
if (params.printv) {
std::ofstream outv(params.outfile + ".projection");
std::ofstream outv(params.outfile + ".loadings");
if (outv.is_open()) {
outv << V << '\n';
}
Expand Down
8 changes: 4 additions & 4 deletions src/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,19 @@ void parse_params(int argc, char* argv[], struct Param* params)
// ("pfile", "prefix to PLINK2 .pgen/.pvar/.psam files.", cxxopts::value<std::string>(), "PREFIX")
("bgen", "path of BGEN file.", cxxopts::value<std::string>(), "FILE")
("csv", "path of zstd compressed csv file.", cxxopts::value<std::string>(), "FILE")
("maxp", "maximum number of power iteration for Halko.[20]", cxxopts::value<int>(),"INT")
("printv", "print out another eigen vectors with suffix .loadings.", cxxopts::value<bool>()->default_value("false"))
("e,emu", "use EMU algorithm for data with lots of missingness.", cxxopts::value<bool>()->default_value("false"))
("f, fast", "force to use fast super power iterations for Halko.", cxxopts::value<bool>()->default_value("false"))
("h, halko", "use Halko method instead of default Arnoldi method.", cxxopts::value<bool>()->default_value("false"))
("k,eigs", "top k components to be calculated.[10]", cxxopts::value<int>(),"INT")
("maxp", "maximum number of power iteration for Halko.[20]", cxxopts::value<int>(),"INT")
("m,memory", "specify the RAM usage in GB unit instead of exploiting the RAM of the server.", cxxopts::value<double>(),"DOUBLE")
("n,threads", "number of threads.[1]", cxxopts::value<int>(),"INT")
("M", "number of features. eg. SNPs.", cxxopts::value<int>(),"INT")
("N", "number of samples.", cxxopts::value<int>(),"INT")
("o,out", "prefix of output files.", cxxopts::value<string>(),"PREFIX")
("p,pcangsd", "use PCAngsd algorithm for genotype likelihood input.", cxxopts::value<bool>()->default_value("false"))
("printv", "print out another eigen vectors with projection suffix.", cxxopts::value<bool>()->default_value("false"))
("v,verbose", "verbose message output.", cxxopts::value<bool>()->default_value("false"))
("M", "number of features. eg. SNPs.", cxxopts::value<int>(),"INT")
("N", "number of samples.", cxxopts::value<int>(),"INT")
;
opts.add_options("More")
("bands", "number of bands to use for fast Halko.[32]", cxxopts::value<int>(),"INT")
Expand Down

0 comments on commit 5f5d5c5

Please sign in to comment.