diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aa00915 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +Default/ +*.o +.settings/ +.project +.cproject +lambda.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..5d8ac7b --- /dev/null +++ b/README.md @@ -0,0 +1,109 @@ +# Heritable Component Analysis Pipeline + +This repository represents a pipeline that performs three primary functions: + +1. Heritable Component Analysis + +2. Heritability Estimation + +3. Kinship Matrix Generation + +The pipeline accepts genotypic and phenotypic data, as well as covariates, and generates a highly-heritable trait. It can then estimate the heritability of that trait via the second function above. If the user already has a kinship matrix available (i.e. from GCTA), the program can accept this matrix. Alternatively, it can use genotypic data to generate the kinship matrix. + +# Usage + +Running the program without any options will trigger the help function, which will show all options that are available. The program takes a command (`kinship`, `h2r`, `hca`, or `score`), as well as a set of options for each command. + +Generally speaking, one can follow the below guidelines when using this program: + +1. Obtain the following data: phenotypic data, quantitative and discrete covariates (optional), kinship file (optional), genotypic data (required if kinship data is not present). Ensure that individual IDs are present in all of these files, and are common across each file. If an individual ID is missing from one file but present in another, it will not be included in analysis. + +2. Determine the parameters for your analysis. These are specified in the “heritable component analysis” help section. There are a few options that you must consider: “numSplits” and “lambdaVecFile”. “numSplits” controls the cross-validation functionality; if this is set to 1 (default), cross-validation will not be performed. If this is set to a value of 2 or more, cross-validation will be performed (see the cross-validation section). “lambdaVecFile” must point to a file with lambda values to use during the HCA process; each line must represent one lambda value. + +3. Determine if you would like to save output data to disk; if so, specify the “outDir” parameter (set this to “.” to save to the current directory). In addition, specify the “numThreads” option (default 2) to enable multi-thread functionality. + +4. Run HCA with the parameters chosen, and observe the output. Analysis may take a long time depending on the size of your dataset. + +Additional options are present, but are not required. Review the documentation and help output for more details. + +# HCA Cross-Validation and Lambda Tuning + +If “numSplits” is equal to one or is not set, the following process will be used for lambda tuning: + +1. HCA will be run with each lambda value. + +2. For each Lambda value, Heritability analysis will be run with the generated trait. + +3. The Lambda value that generates the most heritable trait trait will be saved as a result of the analysis. + +If the “numSplits” option is greater than one, the dataset will be split randomly into “numSplits” splits. The following process will then occur: + +1. The code will iterate through each lambda value. + +2. For each lambda value, the code will iterate through each split. On each iteration, the chosen split will be used as cross-validation data; all other data will be marked as training data. HCA will be run with the training data and the current lambda value. Once HCA has been run with all splits, the average heritability score for the current lambda value will be calculated. + +3. The lambda with the highest average heritability score will be considered the best. HCA and heritability estimation will be re-performed with this lambda value, on the full data set. This will be considered the final result set. + +**Important Note on Cross-Validation Functionality** + +Note that some datasets may be particularly sensitive to removing certain subjects. As specifying a numSplits value causes subjects to be removed during the training process, this may cause instability in the generated weights. If you notice unstable results with data spliting enabled, consider running the program without this functionality. + +# Outputs + +In addition to outputting data to the CLI, if an `outDir` parameter is specified, some data will also be saved. For all analysis, if a GRM was generated (non-pregiven), that GRM will be saved to "kinship.csv". The following analysis-specific data will also be saved: + +## HCA + +When HCA is run, the final weights will be saved to "trait_hca.csv". Indiviudals will be scored with these weights, and the output from the "Scoring" section will be saved. In addition, the output from the "Heritability Analysis" section will be saved for the final weights. + +## Heritability Analysis + +When heritability analysis is run, statistics regarding the analysis will be saved to "h2r_est.txt". + +## Scoring + +When scoring is run, the calculated scores will be saved to "scores.txt". + +## Kinship Generation + +When kinship generation is run, the kinship file will be saved to "kinship.txt". + +# Special Note on Heritability Estimation + +In the event that the variance-covariance matrix is non-invertible during heritability estimation, small values will be added to the matrix diagonals. This will generally resolve the invertibility error, but may adversely affect the results. A warning will be outputted in the event that the add-to-diagonals approach is used. + +# Documentation + +Further documentation is available in the `docs` folder. + +# Dependencies + +The Linux binary should work automatically on most Linux distributions. If not, compile it for your architecture. + +The OSX binary requires GCC version 6. Install it by running `brew install gcc6 --without-multilib` on your machine. + +# Compiling + +To compile on most Linux distributions and OSX, follow these steps: + +1. Install the Armadillo matrix library (download [here](http://arma.sourceforge.net/download.html) and run `cmake . && make && sudo make install`) + +2. Install the NLOpt optimization library (download [here](http://ab-initio.mit.edu/nlopt/) and run `./configure && make && sudo make install`) + +3. Install the OpenBLAS library [from source](https://github.com/xianyi/OpenBLAS/wiki/Installation-Guide). Make sure to specify `DYNAMIC_ARCH=1` when running `make` and `make install`, if you plan on using the binary across multiple architectures. + +4. If on Linux, run (i.e. `sudo apt-get install liblapack-dev`). If on Mac, run `brew install gcc6 --without-multilib` and `brew install lapack`. + +6. Run `make --file Makefile_osx` or `make --file Makefile_linux`, depending on your platform. + +# References + +The following references were used while preparing this program: + +``` +Sun J, Kranzler HR, Bi J. Refining multivariate disease phenotypes for high chip heritability. BMC Medical Genomics. 2015;8(Suppl 3):S3. doi:10.1186/1755-8794-8-S3-S3. + +Yang J, Lee SH, Goddard ME, Visscher PM. GCTA: A Tool for Genome-wide Complex Trait Analysis. American Journal of Human Genetics. 2011;88(1):76-82. doi:10.1016/j.ajhg.2010.11.011. + +Yang J, Benyamin B, McEvoy BP, et al. Common SNPs explain a large proportion of heritability for human height. Nature genetics. 2010;42(7):565-569. doi:10.1038/ng.608. +``` diff --git a/bin/hca-linux b/bin/hca-linux new file mode 100755 index 0000000..a809387 Binary files /dev/null and b/bin/hca-linux differ diff --git a/bin/hca-osx b/bin/hca-osx new file mode 100755 index 0000000..0387985 Binary files /dev/null and b/bin/hca-osx differ diff --git a/docs/html/_data_8cpp.html b/docs/html/_data_8cpp.html new file mode 100644 index 0000000..d769b3a --- /dev/null +++ b/docs/html/_data_8cpp.html @@ -0,0 +1,120 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/Data.cpp File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Data.cpp File Reference
+
+
+
#include "Data.h"
+#include <unistd.h>
+#include <sys/stat.h>
+#include <bitset>
+#include "SnpKinship.h"
+#include "GivenKinship.h"
+
+Include dependency graph for Data.cpp:
+
+
+ + + + + + + + + + + +
+
+
+ + + + diff --git a/docs/html/_data_8cpp__incl.map b/docs/html/_data_8cpp__incl.map new file mode 100644 index 0000000..43b69dd --- /dev/null +++ b/docs/html/_data_8cpp__incl.map @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/docs/html/_data_8cpp__incl.md5 b/docs/html/_data_8cpp__incl.md5 new file mode 100644 index 0000000..38f2e57 --- /dev/null +++ b/docs/html/_data_8cpp__incl.md5 @@ -0,0 +1 @@ +b873e50246071bf6ccec9b6b36c9ae3c \ No newline at end of file diff --git a/docs/html/_data_8cpp__incl.png b/docs/html/_data_8cpp__incl.png new file mode 100644 index 0000000..fd2aede Binary files /dev/null and b/docs/html/_data_8cpp__incl.png differ diff --git a/docs/html/_data_8h.html b/docs/html/_data_8h.html new file mode 100644 index 0000000..cc15564 --- /dev/null +++ b/docs/html/_data_8h.html @@ -0,0 +1,145 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/Data.h File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Data.h File Reference
+
+
+
#include <iostream>
+#include <armadillo>
+#include <map>
+#include <set>
+#include <iterator>
+#include <bitset>
+#include "IndividualDataSet.h"
+#include "Option.h"
+#include "Scorer.h"
+
+Include dependency graph for Data.h:
+
+
+ + + + + + + + + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + +
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  Data
 A class to load all relevant data. Responsible solely for loading data - not for reconciling missing individuals. More...
 
+
+
+ + + + diff --git a/docs/html/_data_8h__dep__incl.map b/docs/html/_data_8h__dep__incl.map new file mode 100644 index 0000000..65234d2 --- /dev/null +++ b/docs/html/_data_8h__dep__incl.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/html/_data_8h__dep__incl.md5 b/docs/html/_data_8h__dep__incl.md5 new file mode 100644 index 0000000..ba18b91 --- /dev/null +++ b/docs/html/_data_8h__dep__incl.md5 @@ -0,0 +1 @@ +493f6d8f508098722e1d8a49a369c6b0 \ No newline at end of file diff --git a/docs/html/_data_8h__dep__incl.png b/docs/html/_data_8h__dep__incl.png new file mode 100644 index 0000000..84b862e Binary files /dev/null and b/docs/html/_data_8h__dep__incl.png differ diff --git a/docs/html/_data_8h__incl.map b/docs/html/_data_8h__incl.map new file mode 100644 index 0000000..08de796 --- /dev/null +++ b/docs/html/_data_8h__incl.map @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/docs/html/_data_8h__incl.md5 b/docs/html/_data_8h__incl.md5 new file mode 100644 index 0000000..08017a4 --- /dev/null +++ b/docs/html/_data_8h__incl.md5 @@ -0,0 +1 @@ +d75f77723d868d9310570ba36113000c \ No newline at end of file diff --git a/docs/html/_data_8h__incl.png b/docs/html/_data_8h__incl.png new file mode 100644 index 0000000..9947bd9 Binary files /dev/null and b/docs/html/_data_8h__incl.png differ diff --git a/docs/html/_data_8h_source.html b/docs/html/_data_8h_source.html new file mode 100644 index 0000000..94d84cf --- /dev/null +++ b/docs/html/_data_8h_source.html @@ -0,0 +1,104 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/Data.h Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Data.h
+
+
+
1 /*
2  * data.h
3  *
4  * Created on: Feb 10, 2016
5  * Author: Joey
6  */
7 
8 #ifndef DATA_H_
9 #define DATA_H_
10 
11 #include <iostream>
12 #include <armadillo>
13 #include <map>
14 #include <set>
15 #include <iterator>
16 #include <bitset>
17 
18 #include "IndividualDataSet.h"
19 #include "Option.h"
20 #include "Scorer.h"
21 
23 
26 class Data
27 {
28  public:
29  Data(Option &option);
30  void load(Option &option);
31  void writeKinship(std::string outDir);
32 
33  IndividualDataSet individualDataSet;
34  arma::mat trait;
35  std::vector<double> lambdaVec;
36  std::vector<Scorer> scorers;
37 
38  private:
39  bool canLoadFam(const Option &option);
40  void loadFam(const Option &option);
41  bool canLoadPheno(const Option &option);
42  void loadPheno(const Option &option);
43  bool canLoadQCov(const Option &option);
44  void loadQCov(const Option &option);
45  bool canLoadCCov(const Option &option);
46  void loadCCov(const Option &option);
47  bool canLoadSNP(const Option &option);
48  void loadSNP(const Option &option);
49  bool canLoadTrait(const Option &option);
50  void loadTrait(const Option &option);
51  bool canLoadLambdaVecFile(const Option &option);
52  void loadLambdaVecFile(const Option &option);
53 };
54 
55 
56 #endif /* DATA_H_ */
A class to load all relevant data. Responsible solely for loading data - not for reconciling missing ...
Definition: Data.h:26
+
A class to keep track of and reconcile IndividualData objects.
Definition: IndividualDataSet.h:20
+
void writeKinship(std::string outDir)
Writes the Kinship file to disk.
Definition: Data.cpp:368
+
void load(Option &option)
Loads data based on the provided option argument.
Definition: Data.cpp:27
+
Data(Option &option)
A constructor.
Definition: Data.cpp:10
+
A class to load all user options.
Definition: Option.h:12
+
+
+ + + + diff --git a/docs/html/_given_kinship_8cpp.html b/docs/html/_given_kinship_8cpp.html new file mode 100644 index 0000000..b7f2dc7 --- /dev/null +++ b/docs/html/_given_kinship_8cpp.html @@ -0,0 +1,109 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/GivenKinship.cpp File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
GivenKinship.cpp File Reference
+
+
+
#include "GivenKinship.h"
+
+Include dependency graph for GivenKinship.cpp:
+
+
+ + + + + +
+
+
+ + + + diff --git a/docs/html/_given_kinship_8cpp__incl.map b/docs/html/_given_kinship_8cpp__incl.map new file mode 100644 index 0000000..3232210 --- /dev/null +++ b/docs/html/_given_kinship_8cpp__incl.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/html/_given_kinship_8cpp__incl.md5 b/docs/html/_given_kinship_8cpp__incl.md5 new file mode 100644 index 0000000..432663a --- /dev/null +++ b/docs/html/_given_kinship_8cpp__incl.md5 @@ -0,0 +1 @@ +0b2e29bb60068626fe1ebe3823e1df7c \ No newline at end of file diff --git a/docs/html/_given_kinship_8cpp__incl.png b/docs/html/_given_kinship_8cpp__incl.png new file mode 100644 index 0000000..ab4b6dc Binary files /dev/null and b/docs/html/_given_kinship_8cpp__incl.png differ diff --git a/docs/html/_given_kinship_8h.html b/docs/html/_given_kinship_8h.html new file mode 100644 index 0000000..23bdaa8 --- /dev/null +++ b/docs/html/_given_kinship_8h.html @@ -0,0 +1,140 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/GivenKinship.h File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
GivenKinship.h File Reference
+
+
+
#include <stdint.h>
+#include "Kinship.h"
+#include "util.h"
+#include <armadillo>
+
+Include dependency graph for GivenKinship.h:
+
+
+ + + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + + + + + + + +
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  GivenKinship
 A class to load a pregiven kinship matrix. More...
 
+
+
+ + + + diff --git a/docs/html/_given_kinship_8h__dep__incl.map b/docs/html/_given_kinship_8h__dep__incl.map new file mode 100644 index 0000000..625105c --- /dev/null +++ b/docs/html/_given_kinship_8h__dep__incl.map @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/docs/html/_given_kinship_8h__dep__incl.md5 b/docs/html/_given_kinship_8h__dep__incl.md5 new file mode 100644 index 0000000..21a4406 --- /dev/null +++ b/docs/html/_given_kinship_8h__dep__incl.md5 @@ -0,0 +1 @@ +8ada6f21b60808b82f1366e1efbe7ec3 \ No newline at end of file diff --git a/docs/html/_given_kinship_8h__dep__incl.png b/docs/html/_given_kinship_8h__dep__incl.png new file mode 100644 index 0000000..c9ca00b Binary files /dev/null and b/docs/html/_given_kinship_8h__dep__incl.png differ diff --git a/docs/html/_given_kinship_8h__incl.map b/docs/html/_given_kinship_8h__incl.map new file mode 100644 index 0000000..c131317 --- /dev/null +++ b/docs/html/_given_kinship_8h__incl.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/html/_given_kinship_8h__incl.md5 b/docs/html/_given_kinship_8h__incl.md5 new file mode 100644 index 0000000..d7aeac8 --- /dev/null +++ b/docs/html/_given_kinship_8h__incl.md5 @@ -0,0 +1 @@ +83e9ba7ca97c69f9a8a333e0ffb1b17a \ No newline at end of file diff --git a/docs/html/_given_kinship_8h__incl.png b/docs/html/_given_kinship_8h__incl.png new file mode 100644 index 0000000..fb18081 Binary files /dev/null and b/docs/html/_given_kinship_8h__incl.png differ diff --git a/docs/html/_given_kinship_8h_source.html b/docs/html/_given_kinship_8h_source.html new file mode 100644 index 0000000..a85fdff --- /dev/null +++ b/docs/html/_given_kinship_8h_source.html @@ -0,0 +1,101 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/GivenKinship.h Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
GivenKinship.h
+
+
+
1 /*
2  * givenkinship.h
3  *
4  * Created on: Jan 25, 2017
5  * Author: Daniel
6  */
7 
8 #ifndef GIVENKINSHIP_H_
9 #define GIVENKINSHIP_H_
10 
11 #include <stdint.h>
12 #include "Kinship.h"
13 #include <armadillo>
14 #include "Util.h"
15 
17 
20 class GivenKinship : public Kinship
21 {
22  public:
23  void construct(std::string kinshipfile, std::string kinshipidfile);
24  private:
25  int lastAccountedForId = 0;
26  void saveId(const std::string &indID);
27 };
28 
29 
30 #endif /* GIVENKINSHIP_H_ */
A class used to load or generate kinship data. This class must not be used directly; only subclasses ...
Definition: Kinship.h:18
+
void construct(std::string kinshipfile, std::string kinshipidfile)
Constructor. Loads and parses the kinship file into a matrix.
Definition: GivenKinship.cpp:11
+
A class to load a pregiven kinship matrix.
Definition: GivenKinship.h:20
+
+
+ + + + diff --git a/docs/html/_h2r_est_8h_source.html b/docs/html/_h2r_est_8h_source.html new file mode 100644 index 0000000..fb65f4b --- /dev/null +++ b/docs/html/_h2r_est_8h_source.html @@ -0,0 +1,99 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/H2rEst.h Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
H2rEst.h
+
+
+
1 /*
2  * H2rEst.h
3  *
4  * Created on: April 17, 2017
5  * Author: Daniel
6  */
7 
8 #ifndef H2REST_H_
9 #define H2REST_H_
10 
11 #include <stdint.h>
12 #include <iostream>
13 #include <armadillo>
14 #include <map>
15 #include <set>
16 
18 class H2rEst
19 {
20 
21 };
22 
23 
24 #endif /* H2REST_H_ */
A class used to perform heritability analysis.
Definition: H2rEst.h:18
+
+
+ + + + diff --git a/docs/html/_hca_8h_source.html b/docs/html/_hca_8h_source.html new file mode 100644 index 0000000..bc7bd98 --- /dev/null +++ b/docs/html/_hca_8h_source.html @@ -0,0 +1,99 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/Hca.h Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Hca.h
+
+
+
1 /*
2  * Hca.h
3  *
4  * Created on: April 17, 2017
5  * Author: Daniel
6  */
7 
8 #ifndef HCA_H_
9 #define HCA_H_
10 
11 #include <stdint.h>
12 #include <iostream>
13 #include <armadillo>
14 #include <map>
15 #include <set>
16 
18 class Hca
19 {
20 
21 };
22 
23 
24 #endif /* HCA_H_ */
A class used to perform heritable component analysis.
Definition: Hca.h:18
+
+
+ + + + diff --git a/docs/html/_individual_data_8cpp.html b/docs/html/_individual_data_8cpp.html new file mode 100644 index 0000000..34742f6 --- /dev/null +++ b/docs/html/_individual_data_8cpp.html @@ -0,0 +1,107 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/IndividualData.cpp File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
IndividualData.cpp File Reference
+
+
+
#include "IndividualData.h"
+
+Include dependency graph for IndividualData.cpp:
+
+
+ + + +
+
+
+ + + + diff --git a/docs/html/_individual_data_8cpp__incl.map b/docs/html/_individual_data_8cpp__incl.map new file mode 100644 index 0000000..59c6216 --- /dev/null +++ b/docs/html/_individual_data_8cpp__incl.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/_individual_data_8cpp__incl.md5 b/docs/html/_individual_data_8cpp__incl.md5 new file mode 100644 index 0000000..fe0353f --- /dev/null +++ b/docs/html/_individual_data_8cpp__incl.md5 @@ -0,0 +1 @@ +bcaf64b4fb1028903a1ce341b29ead0c \ No newline at end of file diff --git a/docs/html/_individual_data_8cpp__incl.png b/docs/html/_individual_data_8cpp__incl.png new file mode 100644 index 0000000..ec789fc Binary files /dev/null and b/docs/html/_individual_data_8cpp__incl.png differ diff --git a/docs/html/_individual_data_8h.html b/docs/html/_individual_data_8h.html new file mode 100644 index 0000000..d3a5ce3 --- /dev/null +++ b/docs/html/_individual_data_8h.html @@ -0,0 +1,137 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/IndividualData.h File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
IndividualData.h File Reference
+
+
+
#include <iostream>
+#include <armadillo>
+#include <map>
+
+Include dependency graph for IndividualData.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + + + + + + + +
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  IndividualData
 A class to represent data associated with a given individual. More...
 
+
+
+ + + + diff --git a/docs/html/_individual_data_8h__dep__incl.map b/docs/html/_individual_data_8h__dep__incl.map new file mode 100644 index 0000000..032e5ad --- /dev/null +++ b/docs/html/_individual_data_8h__dep__incl.map @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/docs/html/_individual_data_8h__dep__incl.md5 b/docs/html/_individual_data_8h__dep__incl.md5 new file mode 100644 index 0000000..c64b86f --- /dev/null +++ b/docs/html/_individual_data_8h__dep__incl.md5 @@ -0,0 +1 @@ +c13a9277c83b82f9a6d79f509bd7387a \ No newline at end of file diff --git a/docs/html/_individual_data_8h__dep__incl.png b/docs/html/_individual_data_8h__dep__incl.png new file mode 100644 index 0000000..4986868 Binary files /dev/null and b/docs/html/_individual_data_8h__dep__incl.png differ diff --git a/docs/html/_individual_data_8h__incl.map b/docs/html/_individual_data_8h__incl.map new file mode 100644 index 0000000..5204a76 --- /dev/null +++ b/docs/html/_individual_data_8h__incl.map @@ -0,0 +1,2 @@ + + diff --git a/docs/html/_individual_data_8h__incl.md5 b/docs/html/_individual_data_8h__incl.md5 new file mode 100644 index 0000000..b54762d --- /dev/null +++ b/docs/html/_individual_data_8h__incl.md5 @@ -0,0 +1 @@ +7354a94bca24578663a265a7127bece5 \ No newline at end of file diff --git a/docs/html/_individual_data_8h__incl.png b/docs/html/_individual_data_8h__incl.png new file mode 100644 index 0000000..daa629a Binary files /dev/null and b/docs/html/_individual_data_8h__incl.png differ diff --git a/docs/html/_individual_data_8h_source.html b/docs/html/_individual_data_8h_source.html new file mode 100644 index 0000000..3320d92 --- /dev/null +++ b/docs/html/_individual_data_8h_source.html @@ -0,0 +1,118 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/IndividualData.h Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
IndividualData.h
+
+
+
1 /*
2  * IndividualData.h
3  *
4  * Created on: March 22, 2017
5  * Author: Daniel
6  */
7 
8 #ifndef INDIVIDUAL_DATA_H_
9 #define INDIVIDUAL_DATA_H_
10 
11 #include <iostream>
12 #include <armadillo>
13 #include <map>
14 
16 
20 {
21  public:
22  std::vector<double>& getPed();
23  std::vector<double>& getPhen();
24  std::vector<double>& getQCov();
25  std::vector<double>& getCCov();
26 
27  void setStrId(std::string strIdNew);
28  std::string getStrId() const;
29 
30  void setPregivenGrmId(int idNew);
31  int getPregivenGrmId() const;
32 
33  void setNewGrmId(int idNew);
34  int getNewGrmId() const;
35 
36  void setPedId(int idNew);
37  int getPedId() const;
38 
39  void setNumMissingGenoValues(int numMissingGenoValuesNew);
41 
42  void addPedData(std::vector<double>& pedNew);
43 
44  void resetPhenData();
45  void addPhenData(std::vector<double>& phenNew);
46 
47  void addQCovData(std::vector<double>& qCovNew);
48 
49  void addCCovData(std::vector<double>& cCovNew);
50 
51  private:
52  int pregivenGrmId = -1;
53  int newGrmId = -1;
54  int pedId = -1;
55  std::string strId;
56 
57  int numMissingGenoValues = -1;
58 
59  std::vector<double> ped;
60  std::vector<double> phen;
61  std::vector<double> qCov;
62  std::vector<double> cCov;
63 };
64 
65 
66 #endif /* INDIVIDUAL_DATA_H_ */
void resetPhenData()
Deletes all phenotypic data on this individual.
Definition: IndividualData.cpp:88
+
int getNumMissingGenoValues()
Returns the number of missing genotypic values for this individual.
Definition: IndividualData.cpp:46
+
int getPedId() const
Returns this individual&#39;s position in the genotypic data matrix.
Definition: IndividualData.cpp:76
+
void addCCovData(std::vector< double > &cCovNew)
Adds categorical covariate data to this individual.
Definition: IndividualData.cpp:107
+
void addQCovData(std::vector< double > &qCovNew)
Adds quantitative covariate data to this individual.
Definition: IndividualData.cpp:100
+
std::vector< double > & getPed()
Returns PED data for this individual.
Definition: IndividualData.cpp:11
+
void setNumMissingGenoValues(int numMissingGenoValuesNew)
Sets the number of missing genotypic values for this individual.
Definition: IndividualData.cpp:41
+
void setPregivenGrmId(int idNew)
Sets this individual&#39;s position in the pregiven GRM.
Definition: IndividualData.cpp:51
+
std::vector< double > & getCCov()
Returns categorical covariate data for this individual.
Definition: IndividualData.cpp:26
+
A class to represent data associated with a given individual.
Definition: IndividualData.h:19
+
void addPhenData(std::vector< double > &phenNew)
Adds phenotypic data to this individual.
Definition: IndividualData.cpp:93
+
std::string getStrId() const
Returns the string ID for this individual.
Definition: IndividualData.cpp:36
+
void setPedId(int idNew)
Sets this individual&#39;s position in the genotypic data matrix.
Definition: IndividualData.cpp:71
+
void setStrId(std::string strIdNew)
Sets the string ID for this individual (i.e. the ID provided in input files).
Definition: IndividualData.cpp:31
+
std::vector< double > & getQCov()
Returns quantitative covariate data for this individual.
Definition: IndividualData.cpp:21
+
int getNewGrmId() const
Returns this individual&#39;s position in the final GRM.
Definition: IndividualData.cpp:66
+
void addPedData(std::vector< double > &pedNew)
Adds data from the PED file to this individual.
Definition: IndividualData.cpp:81
+
std::vector< double > & getPhen()
Returns phenotypic data for this individual.
Definition: IndividualData.cpp:16
+
int getPregivenGrmId() const
Returns this individual&#39;s position in the pregiven GRM.
Definition: IndividualData.cpp:56
+
void setNewGrmId(int idNew)
Sets this individual&#39;s position in the final GRM.
Definition: IndividualData.cpp:61
+
+
+ + + + diff --git a/docs/html/_individual_data_set_8cpp.html b/docs/html/_individual_data_set_8cpp.html new file mode 100644 index 0000000..7f492c9 --- /dev/null +++ b/docs/html/_individual_data_set_8cpp.html @@ -0,0 +1,113 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/IndividualDataSet.cpp File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
IndividualDataSet.cpp File Reference
+
+
+
#include "IndividualDataSet.h"
+
+Include dependency graph for IndividualDataSet.cpp:
+
+
+ + + + + + + + + +
+
+
+ + + + diff --git a/docs/html/_individual_data_set_8cpp__incl.map b/docs/html/_individual_data_set_8cpp__incl.map new file mode 100644 index 0000000..4c9375d --- /dev/null +++ b/docs/html/_individual_data_set_8cpp__incl.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/html/_individual_data_set_8cpp__incl.md5 b/docs/html/_individual_data_set_8cpp__incl.md5 new file mode 100644 index 0000000..42e7731 --- /dev/null +++ b/docs/html/_individual_data_set_8cpp__incl.md5 @@ -0,0 +1 @@ +2298b24d46c16da67712b255493c9e3a \ No newline at end of file diff --git a/docs/html/_individual_data_set_8cpp__incl.png b/docs/html/_individual_data_set_8cpp__incl.png new file mode 100644 index 0000000..fde0664 Binary files /dev/null and b/docs/html/_individual_data_set_8cpp__incl.png differ diff --git a/docs/html/_individual_data_set_8h.html b/docs/html/_individual_data_set_8h.html new file mode 100644 index 0000000..4c40a7d --- /dev/null +++ b/docs/html/_individual_data_set_8h.html @@ -0,0 +1,144 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/IndividualDataSet.h File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
IndividualDataSet.h File Reference
+
+
+
#include "GivenKinship.h"
+#include <armadillo>
+#include <list>
+#include "IndividualData.h"
+#include "Option.h"
+#include "SnpKinship.h"
+
+Include dependency graph for IndividualDataSet.h:
+
+
+ + + + + + + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + + + + + +
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  IndividualDataSet
 A class to keep track of and reconcile IndividualData objects. More...
 
+
+
+ + + + diff --git a/docs/html/_individual_data_set_8h__dep__incl.map b/docs/html/_individual_data_set_8h__dep__incl.map new file mode 100644 index 0000000..dc7979a --- /dev/null +++ b/docs/html/_individual_data_set_8h__dep__incl.map @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/docs/html/_individual_data_set_8h__dep__incl.md5 b/docs/html/_individual_data_set_8h__dep__incl.md5 new file mode 100644 index 0000000..cef745e --- /dev/null +++ b/docs/html/_individual_data_set_8h__dep__incl.md5 @@ -0,0 +1 @@ +bbfecf56719e491022119be0599519e3 \ No newline at end of file diff --git a/docs/html/_individual_data_set_8h__dep__incl.png b/docs/html/_individual_data_set_8h__dep__incl.png new file mode 100644 index 0000000..5b74b97 Binary files /dev/null and b/docs/html/_individual_data_set_8h__dep__incl.png differ diff --git a/docs/html/_individual_data_set_8h__incl.map b/docs/html/_individual_data_set_8h__incl.map new file mode 100644 index 0000000..71f1cfe --- /dev/null +++ b/docs/html/_individual_data_set_8h__incl.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/html/_individual_data_set_8h__incl.md5 b/docs/html/_individual_data_set_8h__incl.md5 new file mode 100644 index 0000000..ecc80a5 --- /dev/null +++ b/docs/html/_individual_data_set_8h__incl.md5 @@ -0,0 +1 @@ +3a5f8b430d47e56b682564b7063a3d4d \ No newline at end of file diff --git a/docs/html/_individual_data_set_8h__incl.png b/docs/html/_individual_data_set_8h__incl.png new file mode 100644 index 0000000..4f31de1 Binary files /dev/null and b/docs/html/_individual_data_set_8h__incl.png differ diff --git a/docs/html/_individual_data_set_8h_source.html b/docs/html/_individual_data_set_8h_source.html new file mode 100644 index 0000000..ba8f12b --- /dev/null +++ b/docs/html/_individual_data_set_8h_source.html @@ -0,0 +1,130 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/IndividualDataSet.h Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
IndividualDataSet.h
+
+
+
1 /*
2  * UserDataSet.h
3  *
4  * Created on: March 22, 2017
5  * Author: Daniel
6  */
7 
8 #ifndef INDIVIDUAL_DATA_SET_H_
9 #define INDIVIDUAL_DATA_SET_H_
10 
11 #include "GivenKinship.h"
12 #include <armadillo>
13 #include <list>
14 
15 #include "IndividualData.h"
16 #include "Option.h"
17 #include "SnpKinship.h"
18 
21 {
22  public:
23  void addingPedData();
24  void addPedData(std::string id, int pedId, std::vector<double>& pedData);
25  void addingPhenData();
26  void addPhenData(std::string id, std::vector<double>& phenData);
27  void addingQCovData();
28  void addQCovData(std::string id, std::vector<double>& qCovData);
29  void addingCCovData();
30  void addCCovData(std::string id, std::vector<double>& cCovData);
31  void addingChrData();
32  void setChrData(std::vector<int>& chrNew);
33  void settingGenoData();
34  void setGenoData(arma::mat& genoNew, std::vector<int> numMissingValues);
35  void setOption(Option &optionNew);
36  void reconcile();
37 
38  int getNumSubjects();
39  bool getCovAdded();
40 
41  arma::mat& getGeno();
42  std::vector<int>& getChr();
43  arma::mat& getAN();
44  arma::mat& getGrm(int idx);
45  arma::mat& getCov(int idx);
46  arma::mat& getPhen(int idx);
47  arma::mat& getGrmWithoutSplit(int idx);
48  arma::mat& getCovWithoutSplit(int idx);
49  arma::mat& getPhenWithoutSplit(int idx);
50  arma::mat& getPed();
51  std::vector< std::vector<std::string> >& getSplitPartIds();
52  std::list< std::reference_wrapper<IndividualData> >& getIndividualList();
53  std::map<std::string, IndividualData>& getIndividualMap();
54 
55  private:
56  bool pregivenGrmAdded = false;
57  bool pedAdded = false;
58  int numPedCols = -1;
59  bool phenAdded = false;
60  int numPhenCols = -1;
61  bool qCovAdded = false;
62  int numQCovCols = -1;
63  bool cCovAdded = false;
64  int numCCovCols = -1;
65  bool chrAdded = false;
66  int numChrCols = -1;
67  bool genoAdded = false;
68 
69  Option option;
70 
71  SnpKinship snpKinship;
72  arma::mat grmInit;
73  arma::mat ped;
74 
75  std::vector<arma::mat> phenSplit;
76  std::vector<arma::mat> phenWithoutSplit;
77  std::vector<arma::mat> covSplit;
78  std::vector<arma::mat> covWithoutSplit;
79  std::vector<arma::mat> grmSplit;
80  std::vector<arma::mat> grmWithoutSplit;
81 
82  arma::mat phenFull;
83  arma::mat covFull;
84  arma::mat grmFull;
85 
86  std::vector<int> chr;
87  arma::mat genoInit;
88  arma::mat geno;
89  std::map<std::string, IndividualData> individualDataIdMap;
90  std::list< std::reference_wrapper<IndividualData> > individualDataList;
91 
92  std::vector< std::vector<std::string> > splitPartIds;
93 
94  void addingPregivenGrm();
95  void addPregivenGrm(arma::mat& newGrm, std::vector<std::string>& grmIds);
96 
97  void addIndividualIfNotAdded(std::string &id);
98 
99  void createGeno();
100  void createMatrices(std::string type, std::vector<std::string>& idList, int splitId);
101  void createPed();
102 };
103 
104 
105 #endif /* INDIVIDUAL_DATA_SET_H_ */
std::vector< int > & getChr()
Returns the provided chromosome data.
Definition: IndividualDataSet.cpp:424
+
void addCCovData(std::string id, std::vector< double > &cCovData)
Add categorical covariate data to this IndividualDataSet, for the provided individual ID...
Definition: IndividualDataSet.cpp:104
+
arma::mat & getAN()
Returns the AN matrix (only available if the matrix was generated from SNP data). ...
Definition: IndividualDataSet.cpp:438
+
void addPhenData(std::string id, std::vector< double > &phenData)
Add phenotypic data to this IndividualDataSet, for the provided individual ID.
Definition: IndividualDataSet.cpp:68
+
arma::mat & getGeno()
Returns the generated genotypic data matrix.
Definition: IndividualDataSet.cpp:419
+
std::list< std::reference_wrapper< IndividualData > > & getIndividualList()
Returns the IndividualData objects in a list data structure.
Definition: IndividualDataSet.cpp:493
+
arma::mat & getGrm(int idx)
Returns the generated genetic relationship matrix.
Definition: IndividualDataSet.cpp:429
+
void addingCCovData()
Indicate that categorical covariate data will be added to this IndividualDataSet. ...
Definition: IndividualDataSet.cpp:99
+
A class to keep track of and reconcile IndividualData objects.
Definition: IndividualDataSet.h:20
+
void addPedData(std::string id, int pedId, std::vector< double > &pedData)
Add PED data to this IndividualDataSet, for the provided individual ID.
Definition: IndividualDataSet.cpp:32
+
bool getCovAdded()
Returns true if covariate data has been added.
Definition: IndividualDataSet.cpp:414
+
void addingPedData()
Indicate that PED data will be added to this IndividualDataSet.
Definition: IndividualDataSet.cpp:27
+
int getNumSubjects()
Returns the number of individuals currently being kept track of.
Definition: IndividualDataSet.cpp:409
+
std::map< std::string, IndividualData > & getIndividualMap()
Returns the IndividualData objects in a map data structure.
Definition: IndividualDataSet.cpp:498
+
void reconcile()
Reconciles data by removing individuals with missing data.
Definition: IndividualDataSet.cpp:185
+
arma::mat & getGrmWithoutSplit(int idx)
Returns the GRM data with all individuals EXCEPT for those in the provided split number.
Definition: IndividualDataSet.cpp:479
+
void addingChrData()
Indicate that chromsome data will be added to this IndividualDataSet.
Definition: IndividualDataSet.cpp:116
+
void addingPhenData()
Indicate that phenotypic data will be added to this IndividualDataSet.
Definition: IndividualDataSet.cpp:48
+
void addingQCovData()
Indicate that quantitative covariate data will be added to this IndividualDataSet.
Definition: IndividualDataSet.cpp:82
+
void setChrData(std::vector< int > &chrNew)
Add chromosome data to this IndividualDataSet.
Definition: IndividualDataSet.cpp:121
+
arma::mat & getPed()
Returns the PED data associated with the given index (based on split number).
Definition: IndividualDataSet.cpp:488
+
A class to load all user options.
Definition: Option.h:12
+
void settingGenoData()
Indicate that genotypic data will be added to this IndividualDataSet.
Definition: IndividualDataSet.cpp:126
+
arma::mat & getPhen(int idx)
Returns the phenotypic data associated with the given index (based on split number).
Definition: IndividualDataSet.cpp:452
+
A class to generate a kinship matrix from SNP data.
Definition: SnpKinship.h:16
+
arma::mat & getCov(int idx)
Returns the covariate data associated with the given index (based on split number).
Definition: IndividualDataSet.cpp:443
+
arma::mat & getPhenWithoutSplit(int idx)
Returns the phenotypic data with all individuals EXCEPT for those in the provided split number...
Definition: IndividualDataSet.cpp:470
+
arma::mat & getCovWithoutSplit(int idx)
Returns the covariates with all individuals EXCEPT for those in the provided split number...
Definition: IndividualDataSet.cpp:461
+
void setOption(Option &optionNew)
Sets the Option object on this individualDataSet.
Definition: IndividualDataSet.cpp:153
+
void setGenoData(arma::mat &genoNew, std::vector< int > numMissingValues)
Add genotypic data to this IndividualDataSet.
Definition: IndividualDataSet.cpp:131
+
void addQCovData(std::string id, std::vector< double > &qCovData)
Add quantitative covariate data to this IndividualDataSet, for the provided individual ID...
Definition: IndividualDataSet.cpp:87
+
std::vector< std::vector< std::string > > & getSplitPartIds()
Returns the IDs associated with each "split".
Definition: IndividualDataSet.cpp:503
+
+
+ + + + diff --git a/docs/html/_kinship_8cpp.html b/docs/html/_kinship_8cpp.html new file mode 100644 index 0000000..0cf2e63 --- /dev/null +++ b/docs/html/_kinship_8cpp.html @@ -0,0 +1,108 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/Kinship.cpp File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Kinship.cpp File Reference
+
+
+
#include "Kinship.h"
+#include <cmath>
+
+Include dependency graph for Kinship.cpp:
+
+
+ + + +
+
+
+ + + + diff --git a/docs/html/_kinship_8cpp__incl.map b/docs/html/_kinship_8cpp__incl.map new file mode 100644 index 0000000..9a567c4 --- /dev/null +++ b/docs/html/_kinship_8cpp__incl.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/_kinship_8cpp__incl.md5 b/docs/html/_kinship_8cpp__incl.md5 new file mode 100644 index 0000000..5bdfa78 --- /dev/null +++ b/docs/html/_kinship_8cpp__incl.md5 @@ -0,0 +1 @@ +7d7bee46ad273f0295ec03a2295cddfe \ No newline at end of file diff --git a/docs/html/_kinship_8cpp__incl.png b/docs/html/_kinship_8cpp__incl.png new file mode 100644 index 0000000..800c136 Binary files /dev/null and b/docs/html/_kinship_8cpp__incl.png differ diff --git a/docs/html/_kinship_8h.html b/docs/html/_kinship_8h.html new file mode 100644 index 0000000..8e3a8a0 --- /dev/null +++ b/docs/html/_kinship_8h.html @@ -0,0 +1,143 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/Kinship.h File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Kinship.h File Reference
+
+
+
#include <stdint.h>
+#include <iostream>
+#include <armadillo>
+#include <map>
+#include <set>
+
+Include dependency graph for Kinship.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + + + + + + + + + + + +
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  Kinship
 A class used to load or generate kinship data. This class must not be used directly; only subclasses should be used. More...
 
+
+
+ + + + diff --git a/docs/html/_kinship_8h__dep__incl.map b/docs/html/_kinship_8h__dep__incl.map new file mode 100644 index 0000000..5a64050 --- /dev/null +++ b/docs/html/_kinship_8h__dep__incl.map @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/docs/html/_kinship_8h__dep__incl.md5 b/docs/html/_kinship_8h__dep__incl.md5 new file mode 100644 index 0000000..020ef5a --- /dev/null +++ b/docs/html/_kinship_8h__dep__incl.md5 @@ -0,0 +1 @@ +038e62413b01365a5ef975098bba248b \ No newline at end of file diff --git a/docs/html/_kinship_8h__dep__incl.png b/docs/html/_kinship_8h__dep__incl.png new file mode 100644 index 0000000..a3ab6f6 Binary files /dev/null and b/docs/html/_kinship_8h__dep__incl.png differ diff --git a/docs/html/_kinship_8h__incl.map b/docs/html/_kinship_8h__incl.map new file mode 100644 index 0000000..74489e3 --- /dev/null +++ b/docs/html/_kinship_8h__incl.map @@ -0,0 +1,2 @@ + + diff --git a/docs/html/_kinship_8h__incl.md5 b/docs/html/_kinship_8h__incl.md5 new file mode 100644 index 0000000..9018e9d --- /dev/null +++ b/docs/html/_kinship_8h__incl.md5 @@ -0,0 +1 @@ +cbed37876e04b058e116cafda844f917 \ No newline at end of file diff --git a/docs/html/_kinship_8h__incl.png b/docs/html/_kinship_8h__incl.png new file mode 100644 index 0000000..f4059a8 Binary files /dev/null and b/docs/html/_kinship_8h__incl.png differ diff --git a/docs/html/_kinship_8h_source.html b/docs/html/_kinship_8h_source.html new file mode 100644 index 0000000..c54d8b7 --- /dev/null +++ b/docs/html/_kinship_8h_source.html @@ -0,0 +1,102 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/Kinship.h Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Kinship.h
+
+
+
1 /*
2  * Kinship.h
3  *
4  * Created on: Feb 12, 2016
5  * Author: Joey
6  */
7 
8 #ifndef KINSHIP_H_
9 #define KINSHIP_H_
10 
11 #include <stdint.h>
12 #include <iostream>
13 #include <armadillo>
14 #include <map>
15 #include <set>
16 
18 class Kinship
19 {
20  public:
21  Kinship();
22  Kinship(arma::mat grm,std::map<std::string, int> ind, int nIndv, std::vector<std::string> idVec);
23  //std::vector<std::string*> getGrm();
24  arma::mat& getGrm();
25  std::vector<std::string>& getIdVec();
26 
27  protected:
28  arma::mat m_grm;
29  uint32_t m_nIndv;
30  std::vector<std::string> idVec;
31 };
32 
33 
34 #endif /* KINSHIP_H_ */
A class used to load or generate kinship data. This class must not be used directly; only subclasses ...
Definition: Kinship.h:18
+
std::vector< std::string > & getIdVec()
Returns the generated or parsed individual id vector.
Definition: Kinship.cpp:25
+
Kinship()
Constructor.
Definition: Kinship.cpp:5
+
arma::mat & getGrm()
Returns the generated or parsed Genetic Relationship Matrix (GRM).
Definition: Kinship.cpp:16
+
+
+ + + + diff --git a/docs/html/_option_8cpp.html b/docs/html/_option_8cpp.html new file mode 100644 index 0000000..59f7efd --- /dev/null +++ b/docs/html/_option_8cpp.html @@ -0,0 +1,116 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/Option.cpp File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Option.cpp File Reference
+
+
+
#include "Option.h"
+#include "Data.h"
+
+Include dependency graph for Option.cpp:
+
+
+ + + + + + + + + + + +
+
+
+ + + + diff --git a/docs/html/_option_8cpp__incl.map b/docs/html/_option_8cpp__incl.map new file mode 100644 index 0000000..95668ec --- /dev/null +++ b/docs/html/_option_8cpp__incl.map @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/docs/html/_option_8cpp__incl.md5 b/docs/html/_option_8cpp__incl.md5 new file mode 100644 index 0000000..907f2df --- /dev/null +++ b/docs/html/_option_8cpp__incl.md5 @@ -0,0 +1 @@ +698e66b9bc94e04192c53321d05dcb99 \ No newline at end of file diff --git a/docs/html/_option_8cpp__incl.png b/docs/html/_option_8cpp__incl.png new file mode 100644 index 0000000..d59047e Binary files /dev/null and b/docs/html/_option_8cpp__incl.png differ diff --git a/docs/html/_option_8h.html b/docs/html/_option_8h.html new file mode 100644 index 0000000..1fdce53 --- /dev/null +++ b/docs/html/_option_8h.html @@ -0,0 +1,140 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/Option.h File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Option.h File Reference
+
+
+
#include <iostream>
+#include <stdlib.h>
+#include <stdint.h>
+
+Include dependency graph for Option.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + + + + + + + + + + +
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  Option
 A class to load all user options. More...
 
+
+
+ + + + diff --git a/docs/html/_option_8h__dep__incl.map b/docs/html/_option_8h__dep__incl.map new file mode 100644 index 0000000..62e99e1 --- /dev/null +++ b/docs/html/_option_8h__dep__incl.map @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/docs/html/_option_8h__dep__incl.md5 b/docs/html/_option_8h__dep__incl.md5 new file mode 100644 index 0000000..899c26a --- /dev/null +++ b/docs/html/_option_8h__dep__incl.md5 @@ -0,0 +1 @@ +76d33c3c8100280dab1ca25b227531f6 \ No newline at end of file diff --git a/docs/html/_option_8h__dep__incl.png b/docs/html/_option_8h__dep__incl.png new file mode 100644 index 0000000..5667dd4 Binary files /dev/null and b/docs/html/_option_8h__dep__incl.png differ diff --git a/docs/html/_option_8h__incl.map b/docs/html/_option_8h__incl.map new file mode 100644 index 0000000..e2e4a23 --- /dev/null +++ b/docs/html/_option_8h__incl.map @@ -0,0 +1,2 @@ + + diff --git a/docs/html/_option_8h__incl.md5 b/docs/html/_option_8h__incl.md5 new file mode 100644 index 0000000..0481adc --- /dev/null +++ b/docs/html/_option_8h__incl.md5 @@ -0,0 +1 @@ +ce0d95cb5ff352ae4256646fd76328a6 \ No newline at end of file diff --git a/docs/html/_option_8h__incl.png b/docs/html/_option_8h__incl.png new file mode 100644 index 0000000..3c52497 Binary files /dev/null and b/docs/html/_option_8h__incl.png differ diff --git a/docs/html/_option_8h_source.html b/docs/html/_option_8h_source.html new file mode 100644 index 0000000..a1d0ecd --- /dev/null +++ b/docs/html/_option_8h_source.html @@ -0,0 +1,117 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/Option.h Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Option.h
+
+
+
1 #ifndef OPTION_H_
2 #define OPTION_H_
3 
4 #include <iostream>
5 #include <stdlib.h>
6 #include <stdint.h>
7 
9 
12 class Option
13 {
14  private:
15  uint16_t m_cmmd;
16  std::string m_bFilePrefix;
17  std::string m_qCovFile;
18  std::string m_cCovFile;
19  std::string m_kinshipFile;
20  std::string m_kinshipIDFile;
21  std::string m_phenFile;
22  std::string m_traitFile;
23  int m_kinshipSrc;
24  double m_mafCutoff = 0;
25  double m_missingGenoCutoff = -1;
26  std::string lambdaVecFile;
27  int numSplits = 1;
28  std::string m_outDir;
29  int m_numThreads = -1;
30  int maxIterHca = 200;
31  int maxIterH2r = 200;
32 
33  bool hyphen(std::string s);
34  std::string parseNext(int i, std::string option, int argc, char **argv);
35 
36  public:
37  void parse(int argc, char **argv);
38 
39  uint16_t getCmmd() const;
40  std::string getBFilePrefix() const;
41  std::string getQCovFile() const;
42  std::string getCCovFile() const;
43  std::string getKinshipFile() const;
44  std::string getKinshipIDFile() const;
45  std::string getPhenFile() const;
46  std::string getTraitFile() const;
47  int getKinshipSrc() const;
48  double getMafCutoff() const;
49  double getMissingGenoCutoff() const;
50  std::string getOutDir() const;
51  int getNumThreads() const;
52  std::string getLambdaVecFile() const;
53  int getNumSplits() const;
54  int getMaxIterHca() const;
55  int getMaxIterH2r() const;
56 
57 };
58 
59 #endif /* OPTION_H_ */
double getMafCutoff() const
Returns the Minor Allele Frequency cutoff for GRM generation.
Definition: Option.cpp:250
+
std::string getPhenFile() const
Returns the phenotype filename.
Definition: Option.cpp:232
+
int getNumSplits() const
Returns the number of splits to use during the cross-validation and lambda-tuning process...
Definition: Option.cpp:268
+
std::string getKinshipFile() const
Returns the kinship filename.
Definition: Option.cpp:220
+
int getMaxIterHca() const
Returns the maximum number of iterations for HCA analysis (default: 200).
Definition: Option.cpp:286
+
std::string getBFilePrefix() const
Returns the prefix for the binary data filenames.
Definition: Option.cpp:202
+
int getNumThreads() const
Returns the number of threads to use.
Definition: Option.cpp:280
+
std::string getKinshipIDFile() const
Returns the kinship ID filename.
Definition: Option.cpp:226
+
std::string getCCovFile() const
Returns the categorical covariate filename.
Definition: Option.cpp:214
+
std::string getQCovFile() const
Returns the quantitative covariate filename.
Definition: Option.cpp:208
+
uint16_t getCmmd() const
Returns the command the user specified; i.e., the analysis to run.
Definition: Option.cpp:196
+
int getMaxIterH2r() const
Returns the maximum number of iterations for heritability analysis (default: 200).
Definition: Option.cpp:292
+
std::string getLambdaVecFile() const
Returns the lambda vector filename.
Definition: Option.cpp:262
+
A class to load all user options.
Definition: Option.h:12
+
int getKinshipSrc() const
Returns the kinship source to use.
Definition: Option.cpp:244
+
std::string getOutDir() const
Returns the directory for output files.
Definition: Option.cpp:274
+
std::string getTraitFile() const
Returns the trait filename.
Definition: Option.cpp:238
+
double getMissingGenoCutoff() const
Returns the missing genotypic data cutoff for GRM generation.
Definition: Option.cpp:256
+
void parse(int argc, char **argv)
Parses all CLI options.
Definition: Option.cpp:34
+
+
+ + + + diff --git a/docs/html/_reml_h2r_est_8cpp.html b/docs/html/_reml_h2r_est_8cpp.html new file mode 100644 index 0000000..0e15b0c --- /dev/null +++ b/docs/html/_reml_h2r_est_8cpp.html @@ -0,0 +1,108 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/RemlH2rEst.cpp File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
RemlH2rEst.cpp File Reference
+
+
+
#include "RemlH2rEst.h"
+
+Include dependency graph for RemlH2rEst.cpp:
+
+
+ + + + +
+
+
+ + + + diff --git a/docs/html/_reml_h2r_est_8cpp__incl.map b/docs/html/_reml_h2r_est_8cpp__incl.map new file mode 100644 index 0000000..fb2d72a --- /dev/null +++ b/docs/html/_reml_h2r_est_8cpp__incl.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/html/_reml_h2r_est_8cpp__incl.md5 b/docs/html/_reml_h2r_est_8cpp__incl.md5 new file mode 100644 index 0000000..895c702 --- /dev/null +++ b/docs/html/_reml_h2r_est_8cpp__incl.md5 @@ -0,0 +1 @@ +b3378d525755fbb7d4b80fcec21b0aee \ No newline at end of file diff --git a/docs/html/_reml_h2r_est_8cpp__incl.png b/docs/html/_reml_h2r_est_8cpp__incl.png new file mode 100644 index 0000000..19f83a3 Binary files /dev/null and b/docs/html/_reml_h2r_est_8cpp__incl.png differ diff --git a/docs/html/_reml_h2r_est_8h.html b/docs/html/_reml_h2r_est_8h.html new file mode 100644 index 0000000..bf01ce6 --- /dev/null +++ b/docs/html/_reml_h2r_est_8h.html @@ -0,0 +1,131 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/RemlH2rEst.h File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
RemlH2rEst.h File Reference
+
+
+
#include "Option.h"
+#include <math.h>
+#include <armadillo>
+
+Include dependency graph for RemlH2rEst.h:
+
+
+ + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + +
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  RemlH2rEst
 A class to perform heritability analysis on a given dataset. More...
 
+
+
+ + + + diff --git a/docs/html/_reml_h2r_est_8h__dep__incl.map b/docs/html/_reml_h2r_est_8h__dep__incl.map new file mode 100644 index 0000000..f61c4a8 --- /dev/null +++ b/docs/html/_reml_h2r_est_8h__dep__incl.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/docs/html/_reml_h2r_est_8h__dep__incl.md5 b/docs/html/_reml_h2r_est_8h__dep__incl.md5 new file mode 100644 index 0000000..947dcfa --- /dev/null +++ b/docs/html/_reml_h2r_est_8h__dep__incl.md5 @@ -0,0 +1 @@ +724a446a426ed0704082fd725ef5d4d1 \ No newline at end of file diff --git a/docs/html/_reml_h2r_est_8h__dep__incl.png b/docs/html/_reml_h2r_est_8h__dep__incl.png new file mode 100644 index 0000000..2e15976 Binary files /dev/null and b/docs/html/_reml_h2r_est_8h__dep__incl.png differ diff --git a/docs/html/_reml_h2r_est_8h__incl.map b/docs/html/_reml_h2r_est_8h__incl.map new file mode 100644 index 0000000..dfeae25 --- /dev/null +++ b/docs/html/_reml_h2r_est_8h__incl.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/_reml_h2r_est_8h__incl.md5 b/docs/html/_reml_h2r_est_8h__incl.md5 new file mode 100644 index 0000000..f109d6c --- /dev/null +++ b/docs/html/_reml_h2r_est_8h__incl.md5 @@ -0,0 +1 @@ +12e2a9a3de66709154dad95919642ce6 \ No newline at end of file diff --git a/docs/html/_reml_h2r_est_8h__incl.png b/docs/html/_reml_h2r_est_8h__incl.png new file mode 100644 index 0000000..84fb4b2 Binary files /dev/null and b/docs/html/_reml_h2r_est_8h__incl.png differ diff --git a/docs/html/_reml_h2r_est_8h_source.html b/docs/html/_reml_h2r_est_8h_source.html new file mode 100644 index 0000000..beebc45 --- /dev/null +++ b/docs/html/_reml_h2r_est_8h_source.html @@ -0,0 +1,105 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/RemlH2rEst.h Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
RemlH2rEst.h
+
+
+
1 /*
2  * H2rEst.h
3  *
4  * Created on: Feb 12, 2016
5  * Author: Joey
6  */
7 
8 #ifndef REMLH2REST_H_
9 #define REMLH2REST_H_
10 
11 #include "H2rEst.h"
12 #include "Option.h"
13 #include <math.h>
14 #include <armadillo>
15 #include "Util.h"
16 
18 
21 class RemlH2rEst : public H2rEst
22 {
23  public:
24  RemlH2rEst(Option &newOption, arma::mat &newPhen, arma::mat &newGrm, arma::mat &newCov);
25  void calcH2r();
26  void saveOutput();
27  std::vector< std::vector<double> >& getFinalStats();
28 
29  private:
30  std::vector< std::vector<double> > finalStats;
31 
32  std::vector<arma::mat> remlAIIteration(arma::mat &oldVarCmp, arma::mat &P, double logL);
33  arma::mat remlEMIteration(arma::mat &oldVarCmp, arma::mat &P);
34  std::vector<arma::mat> preRunHelper();
35  std::vector<arma::mat> iterationHelper(arma::mat &oldVarCmp, arma::mat &P);
36  std::vector<arma::mat> preIterationHelper(arma::mat &varcmp, arma::mat &covFinal);
37  void constrainVarcmp(arma::mat &varcmp, double phenVar);
38  bool isConverged(arma::mat &varcmp, arma::mat &prevVarcmp, double dLogL);
39 
40  Option &option;
41  arma::mat &phen;
42  arma::mat &grm;
43  arma::mat &cov;
44 
45  arma::mat varcmp;
46  arma::mat se;
47 };
48 
49 
50 #endif /* H2REST_H_ */
RemlH2rEst(Option &newOption, arma::mat &newPhen, arma::mat &newGrm, arma::mat &newCov)
Constructor.
Definition: RemlH2rEst.cpp:14
+
A class used to perform heritability analysis.
Definition: H2rEst.h:18
+
void saveOutput()
Saves output to a file.
Definition: RemlH2rEst.cpp:320
+
void calcH2r()
Runs heritability analysis on the data.
Definition: RemlH2rEst.cpp:22
+
A class to load all user options.
Definition: Option.h:12
+
std::vector< std::vector< double > > & getFinalStats()
Returns the final stats from the REML analysis.
Definition: RemlH2rEst.cpp:348
+
A class to perform heritability analysis on a given dataset.
Definition: RemlH2rEst.h:21
+
+
+ + + + diff --git a/docs/html/_reml_hca_8cpp.html b/docs/html/_reml_hca_8cpp.html new file mode 100644 index 0000000..dfb43a6 --- /dev/null +++ b/docs/html/_reml_hca_8cpp.html @@ -0,0 +1,117 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/RemlHca.cpp File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
RemlHca.cpp File Reference
+
+
+
#include "RemlHca.h"
+
+Include dependency graph for RemlHca.cpp:
+
+
+ + + + + + + + + + + + + +
+
+
+ + + + diff --git a/docs/html/_reml_hca_8cpp__incl.map b/docs/html/_reml_hca_8cpp__incl.map new file mode 100644 index 0000000..b201ef9 --- /dev/null +++ b/docs/html/_reml_hca_8cpp__incl.map @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/docs/html/_reml_hca_8cpp__incl.md5 b/docs/html/_reml_hca_8cpp__incl.md5 new file mode 100644 index 0000000..3065bd1 --- /dev/null +++ b/docs/html/_reml_hca_8cpp__incl.md5 @@ -0,0 +1 @@ +e3f6986a730b65d035d17ea2a192bc68 \ No newline at end of file diff --git a/docs/html/_reml_hca_8cpp__incl.png b/docs/html/_reml_hca_8cpp__incl.png new file mode 100644 index 0000000..28087a8 Binary files /dev/null and b/docs/html/_reml_hca_8cpp__incl.png differ diff --git a/docs/html/_reml_hca_8h.html b/docs/html/_reml_hca_8h.html new file mode 100644 index 0000000..4642e00 --- /dev/null +++ b/docs/html/_reml_hca_8h.html @@ -0,0 +1,140 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/RemlHca.h File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
RemlHca.h File Reference
+
+
+
#include "Option.h"
+#include "Data.h"
+#include "RemlH2rEst.h"
+#include <nlopt.hpp>
+#include <armadillo>
+
+Include dependency graph for RemlHca.h:
+
+
+ + + + + + + + + + + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + +
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  RemlHca
 A class to perform heritable component analysis on a given dataset. More...
 
+
+
+ + + + diff --git a/docs/html/_reml_hca_8h__dep__incl.map b/docs/html/_reml_hca_8h__dep__incl.map new file mode 100644 index 0000000..664c197 --- /dev/null +++ b/docs/html/_reml_hca_8h__dep__incl.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/html/_reml_hca_8h__dep__incl.md5 b/docs/html/_reml_hca_8h__dep__incl.md5 new file mode 100644 index 0000000..dd53c5e --- /dev/null +++ b/docs/html/_reml_hca_8h__dep__incl.md5 @@ -0,0 +1 @@ +cf72a0effe12f307334265d9326713ba \ No newline at end of file diff --git a/docs/html/_reml_hca_8h__dep__incl.png b/docs/html/_reml_hca_8h__dep__incl.png new file mode 100644 index 0000000..b79dfa3 Binary files /dev/null and b/docs/html/_reml_hca_8h__dep__incl.png differ diff --git a/docs/html/_reml_hca_8h__incl.map b/docs/html/_reml_hca_8h__incl.map new file mode 100644 index 0000000..929d3d0 --- /dev/null +++ b/docs/html/_reml_hca_8h__incl.map @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/docs/html/_reml_hca_8h__incl.md5 b/docs/html/_reml_hca_8h__incl.md5 new file mode 100644 index 0000000..a37b2e9 --- /dev/null +++ b/docs/html/_reml_hca_8h__incl.md5 @@ -0,0 +1 @@ +f1aaf6811440835c0a7eb2b985555c74 \ No newline at end of file diff --git a/docs/html/_reml_hca_8h__incl.png b/docs/html/_reml_hca_8h__incl.png new file mode 100644 index 0000000..6d56e5a Binary files /dev/null and b/docs/html/_reml_hca_8h__incl.png differ diff --git a/docs/html/_reml_hca_8h_source.html b/docs/html/_reml_hca_8h_source.html new file mode 100644 index 0000000..4d60d0b --- /dev/null +++ b/docs/html/_reml_hca_8h_source.html @@ -0,0 +1,109 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/RemlHca.h Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
RemlHca.h
+
+
+
1 /*
2  * RemlHca.h
3  *
4  * Created on: Feb 17, 2016
5  * Author: Joey
6  */
7 
8 #ifndef REMLHCA_H_
9 #define REMLHCA_H_
10 
11 #include "Hca.h"
12 #include "Option.h"
13 #include "Data.h"
14 #include "RemlH2rEst.h"
15 #include <nlopt.hpp>
16 #include <armadillo>
17 
19 
22 class RemlHca : public Hca
23 {
24  public:
25  RemlHca(Option &newOption, Data &newData);
26  void train();
27  void saveOutput();
28  double getBestLambdaVal();
29  arma::mat& getBestTrainedW();
30  static double objectiveFunction(const std::vector<double> &x, std::vector<double> &grad, void *my_func_data);
31  static double constraintFunction(const std::vector<double> &x, std::vector<double> &grad, void *data);
32 
33  private:
34  std::pair<arma::mat, double> trainWithParams(double lambdaVal, arma::mat& phen, arma::mat& cov, arma::mat &grm);
35 
36  Option &option;
37  Data &data;
38 
39  std::vector< std::pair<double, arma::mat> > lambdaPerformance;
40 
41  double bestLambdaVal = -1;
42  arma::mat bestTrainedW;
43 
44 };
45 
46 
47 #endif /* REMLHCA_H_ */
void saveOutput()
Saves output to a file.
Definition: RemlHca.cpp:297
+
static double constraintFunction(const std::vector< double > &x, std::vector< double > &grad, void *data)
Constraint function for the HCA minimization process.
Definition: RemlHca.cpp:266
+
A class to load all relevant data. Responsible solely for loading data - not for reconciling missing ...
Definition: Data.h:26
+
arma::mat & getBestTrainedW()
Returns the weights generated by the train function.
Definition: RemlHca.cpp:314
+
static double objectiveFunction(const std::vector< double > &x, std::vector< double > &grad, void *my_func_data)
Objective function for the HCA minimization process.
Definition: RemlHca.cpp:221
+
void train()
Runs the REML algorithm to obtain highly-heritable traits.
Definition: RemlHca.cpp:17
+
A class to perform heritable component analysis on a given dataset.
Definition: RemlHca.h:22
+
A class to load all user options.
Definition: Option.h:12
+
A class used to perform heritable component analysis.
Definition: Hca.h:18
+
RemlHca(Option &newOption, Data &newData)
Constructor.
Definition: RemlHca.cpp:11
+
double getBestLambdaVal()
Return the best lambda value, found by the train function.
Definition: RemlHca.cpp:319
+
+
+ + + + diff --git a/docs/html/_scorer_8cpp.html b/docs/html/_scorer_8cpp.html new file mode 100644 index 0000000..d157e8f --- /dev/null +++ b/docs/html/_scorer_8cpp.html @@ -0,0 +1,114 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/Scorer.cpp File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Scorer.cpp File Reference
+
+
+
#include "Scorer.h"
+
+Include dependency graph for Scorer.cpp:
+
+
+ + + + + + + + + + +
+
+
+ + + + diff --git a/docs/html/_scorer_8cpp__incl.map b/docs/html/_scorer_8cpp__incl.map new file mode 100644 index 0000000..72f7542 --- /dev/null +++ b/docs/html/_scorer_8cpp__incl.map @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/docs/html/_scorer_8cpp__incl.md5 b/docs/html/_scorer_8cpp__incl.md5 new file mode 100644 index 0000000..4aea5c0 --- /dev/null +++ b/docs/html/_scorer_8cpp__incl.md5 @@ -0,0 +1 @@ +c067b40e3e036087d0b94d62e28e0a4d \ No newline at end of file diff --git a/docs/html/_scorer_8cpp__incl.png b/docs/html/_scorer_8cpp__incl.png new file mode 100644 index 0000000..cc94911 Binary files /dev/null and b/docs/html/_scorer_8cpp__incl.png differ diff --git a/docs/html/_scorer_8h.html b/docs/html/_scorer_8h.html new file mode 100644 index 0000000..7b2352d --- /dev/null +++ b/docs/html/_scorer_8h.html @@ -0,0 +1,142 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/Scorer.h File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Scorer.h File Reference
+
+
+
#include "Option.h"
+#include <list>
+#include <armadillo>
+#include "IndividualData.h"
+#include "IndividualDataSet.h"
+
+Include dependency graph for Scorer.h:
+
+
+ + + + + + + + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + + + +
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  Scorer
 A class to score users based on their phenotypes and a generated weight. More...
 
+
+
+ + + + diff --git a/docs/html/_scorer_8h__dep__incl.map b/docs/html/_scorer_8h__dep__incl.map new file mode 100644 index 0000000..b8b4344 --- /dev/null +++ b/docs/html/_scorer_8h__dep__incl.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/html/_scorer_8h__dep__incl.md5 b/docs/html/_scorer_8h__dep__incl.md5 new file mode 100644 index 0000000..98d7e4c --- /dev/null +++ b/docs/html/_scorer_8h__dep__incl.md5 @@ -0,0 +1 @@ +a1c22c64d324b3f98268a952e4d16195 \ No newline at end of file diff --git a/docs/html/_scorer_8h__dep__incl.png b/docs/html/_scorer_8h__dep__incl.png new file mode 100644 index 0000000..9fca827 Binary files /dev/null and b/docs/html/_scorer_8h__dep__incl.png differ diff --git a/docs/html/_scorer_8h__incl.map b/docs/html/_scorer_8h__incl.map new file mode 100644 index 0000000..b606117 --- /dev/null +++ b/docs/html/_scorer_8h__incl.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/html/_scorer_8h__incl.md5 b/docs/html/_scorer_8h__incl.md5 new file mode 100644 index 0000000..5f9416a --- /dev/null +++ b/docs/html/_scorer_8h__incl.md5 @@ -0,0 +1 @@ +913168867ced2a5e13a7f273bb91da1e \ No newline at end of file diff --git a/docs/html/_scorer_8h__incl.png b/docs/html/_scorer_8h__incl.png new file mode 100644 index 0000000..f1038b5 Binary files /dev/null and b/docs/html/_scorer_8h__incl.png differ diff --git a/docs/html/_scorer_8h_source.html b/docs/html/_scorer_8h_source.html new file mode 100644 index 0000000..a38fa85 --- /dev/null +++ b/docs/html/_scorer_8h_source.html @@ -0,0 +1,104 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/Scorer.h Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Scorer.h
+
+
+
1 /*
2  * Scorer.h
3  *
4  * Created on: March 27, 2017
5  * Author: Daniel
6  */
7 
8 #ifndef SCORER_H_
9 #define SCORER_H_
10 
11 #include "Option.h"
12 #include <list>
13 #include <armadillo>
14 #include "IndividualData.h"
15 #include "IndividualDataSet.h"
16 
18 
21 class Scorer
22 {
23  private:
24  Option &option;
25  arma::mat score;
26 
27  public:
28  Scorer(Option &newOption, arma::mat &phen, arma::mat &trait);
29  arma::mat& getScore();
30  void saveOutput(IndividualDataSet &individualDataSet);
31 };
32 
33 
34 #endif /* SCORER_H */
arma::mat & getScore()
Returns the generated scores.
Definition: Scorer.cpp:20
+
Scorer(Option &newOption, arma::mat &phen, arma::mat &trait)
Constructor.
Definition: Scorer.cpp:14
+
A class to keep track of and reconcile IndividualData objects.
Definition: IndividualDataSet.h:20
+
void saveOutput(IndividualDataSet &individualDataSet)
Saves output to a file.
Definition: Scorer.cpp:25
+
A class to score users based on their phenotypes and a generated weight.
Definition: Scorer.h:21
+
A class to load all user options.
Definition: Option.h:12
+
+
+ + + + diff --git a/docs/html/_snp_kinship_8cpp.html b/docs/html/_snp_kinship_8cpp.html new file mode 100644 index 0000000..654ffb0 --- /dev/null +++ b/docs/html/_snp_kinship_8cpp.html @@ -0,0 +1,109 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/SnpKinship.cpp File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
SnpKinship.cpp File Reference
+
+
+
#include "SnpKinship.h"
+
+Include dependency graph for SnpKinship.cpp:
+
+
+ + + + + +
+
+
+ + + + diff --git a/docs/html/_snp_kinship_8cpp__incl.map b/docs/html/_snp_kinship_8cpp__incl.map new file mode 100644 index 0000000..b3d3b5a --- /dev/null +++ b/docs/html/_snp_kinship_8cpp__incl.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/html/_snp_kinship_8cpp__incl.md5 b/docs/html/_snp_kinship_8cpp__incl.md5 new file mode 100644 index 0000000..97ef72a --- /dev/null +++ b/docs/html/_snp_kinship_8cpp__incl.md5 @@ -0,0 +1 @@ +468cea120c17110b925585b654db55b8 \ No newline at end of file diff --git a/docs/html/_snp_kinship_8cpp__incl.png b/docs/html/_snp_kinship_8cpp__incl.png new file mode 100644 index 0000000..32a7293 Binary files /dev/null and b/docs/html/_snp_kinship_8cpp__incl.png differ diff --git a/docs/html/_snp_kinship_8h.html b/docs/html/_snp_kinship_8h.html new file mode 100644 index 0000000..35a5ee5 --- /dev/null +++ b/docs/html/_snp_kinship_8h.html @@ -0,0 +1,139 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/SnpKinship.h File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
SnpKinship.h File Reference
+
+
+
#include "Kinship.h"
+#include "Option.h"
+#include <armadillo>
+
+Include dependency graph for SnpKinship.h:
+
+
+ + + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + + + + + + + + + + +
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  SnpKinship
 A class to generate a kinship matrix from SNP data. More...
 
+
+
+ + + + diff --git a/docs/html/_snp_kinship_8h__dep__incl.map b/docs/html/_snp_kinship_8h__dep__incl.map new file mode 100644 index 0000000..db06d7e --- /dev/null +++ b/docs/html/_snp_kinship_8h__dep__incl.map @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/docs/html/_snp_kinship_8h__dep__incl.md5 b/docs/html/_snp_kinship_8h__dep__incl.md5 new file mode 100644 index 0000000..22824fb --- /dev/null +++ b/docs/html/_snp_kinship_8h__dep__incl.md5 @@ -0,0 +1 @@ +d7e07a0d95bb2cdd7958c9ab9adeb0a5 \ No newline at end of file diff --git a/docs/html/_snp_kinship_8h__dep__incl.png b/docs/html/_snp_kinship_8h__dep__incl.png new file mode 100644 index 0000000..ea34dec Binary files /dev/null and b/docs/html/_snp_kinship_8h__dep__incl.png differ diff --git a/docs/html/_snp_kinship_8h__incl.map b/docs/html/_snp_kinship_8h__incl.map new file mode 100644 index 0000000..c516348 --- /dev/null +++ b/docs/html/_snp_kinship_8h__incl.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/html/_snp_kinship_8h__incl.md5 b/docs/html/_snp_kinship_8h__incl.md5 new file mode 100644 index 0000000..bd7cb85 --- /dev/null +++ b/docs/html/_snp_kinship_8h__incl.md5 @@ -0,0 +1 @@ +3634c9b6614d7a8f75b0002cc5bd23f8 \ No newline at end of file diff --git a/docs/html/_snp_kinship_8h__incl.png b/docs/html/_snp_kinship_8h__incl.png new file mode 100644 index 0000000..0d5aee5 Binary files /dev/null and b/docs/html/_snp_kinship_8h__incl.png differ diff --git a/docs/html/_snp_kinship_8h_source.html b/docs/html/_snp_kinship_8h_source.html new file mode 100644 index 0000000..9bd42ff --- /dev/null +++ b/docs/html/_snp_kinship_8h_source.html @@ -0,0 +1,103 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/SnpKinship.h Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
SnpKinship.h
+
+
+
1 /*
2  * SnpKinship.h
3  *
4  * Created on: Feb 17, 2016
5  * Author: Joey
6  */
7 
8 #ifndef SNPKINSHIP_H_
9 #define SNPKINSHIP_H_
10 
11 #include "Kinship.h"
12 #include "Option.h"
13 #include <armadillo>
14 
16 class SnpKinship : public Kinship
17 {
18  public:
19  void construct(Option &option, arma::mat &ped, std::vector<int> &chr, arma::mat &newGeno);
20  arma::mat& getAN();
21  private:
22  arma::mat A_N;
23 };
24 
25 
26 #endif /* SNPKINSHIP_H_ */
A class used to load or generate kinship data. This class must not be used directly; only subclasses ...
Definition: Kinship.h:18
+
arma::mat & getAN()
Returns AN matrix, which represents the number of SNPs that were used to calculate the GRM (on a per-...
Definition: SnpKinship.cpp:159
+
A class to load all user options.
Definition: Option.h:12
+
A class to generate a kinship matrix from SNP data.
Definition: SnpKinship.h:16
+
void construct(Option &option, arma::mat &ped, std::vector< int > &chr, arma::mat &newGeno)
Constructor.
Definition: SnpKinship.cpp:14
+
+
+ + + + diff --git a/docs/html/_util_8h_source.html b/docs/html/_util_8h_source.html new file mode 100644 index 0000000..5233078 --- /dev/null +++ b/docs/html/_util_8h_source.html @@ -0,0 +1,104 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/Util.h Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Util.h
+
+
+
1 /*
2  * SnpKinship.h
3  *
4  * Created on: Feb 17, 2016
5  * Author: Joey
6  */
7 
8 #ifndef UTIL_H_
9 #define UTIL_H_
10 
11 #include <armadillo>
12 
13 class Util
14 {
15  public:
16  static std::vector<std::string> splitByDelimeter(std::string data, std::string delim);
17  static double parseToDouble(std::string data);
18  static int parseToInt(std::string data);
19  static arma::mat invertMatrix(arma::mat& m, std::string name, bool alreadyAdded = false);
20  static arma::mat invertMatrixSympd(arma::mat& m, std::string name, bool alreadyAdded = false);
21 };
22 
23 
24 #endif /* UTIL_H_ */
static std::vector< std::string > splitByDelimeter(std::string data, std::string delim)
Splits a string by delimiter, and returns a vector swith the result.
Definition: Util.cpp:4
+
static arma::mat invertMatrixSympd(arma::mat &m, std::string name, bool alreadyAdded=false)
Inverts the matrix via arma::inv_sympd, adding values to diagonals should inversion fail...
Definition: Util.cpp:72
+
static double parseToDouble(std::string data)
Parses a string to a double, raising an error if the data is invalid.
Definition: Util.cpp:20
+
static int parseToInt(std::string data)
Parses a string to an integer, raising an error if the data is invalid.
Definition: Util.cpp:33
+
static arma::mat invertMatrix(arma::mat &m, std::string name, bool alreadyAdded=false)
Inverts the matrix via arma::inv, adding values to diagonals should inversion fail. If values are added to diagonals, outputs a warning with the "name" variable.
Definition: Util.cpp:46
+
Definition: Util.h:13
+
+
+ + + + diff --git a/docs/html/annotated.html b/docs/html/annotated.html new file mode 100644 index 0000000..702ec9f --- /dev/null +++ b/docs/html/annotated.html @@ -0,0 +1,114 @@ + + + + + + + +HCA: Class List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+ + + + + + + + + + + + + + +
 CDataA class to load all relevant data. Responsible solely for loading data - not for reconciling missing individuals
 CGivenKinshipA class to load a pregiven kinship matrix
 CH2rEstA class used to perform heritability analysis
 CHcaA class used to perform heritable component analysis
 CIndividualDataA class to represent data associated with a given individual
 CIndividualDataSetA class to keep track of and reconcile IndividualData objects
 CKinshipA class used to load or generate kinship data. This class must not be used directly; only subclasses should be used
 COptionA class to load all user options
 CRemlH2rEstA class to perform heritability analysis on a given dataset
 CRemlHcaA class to perform heritable component analysis on a given dataset
 CScorerA class to score users based on their phenotypes and a generated weight
 CSnpKinshipA class to generate a kinship matrix from SNP data
 CUtil
+
+
+
+ + + + diff --git a/docs/html/annotated_dup.js b/docs/html/annotated_dup.js new file mode 100644 index 0000000..ddf7b07 --- /dev/null +++ b/docs/html/annotated_dup.js @@ -0,0 +1,16 @@ +var annotated_dup = +[ + [ "Data", "class_data.html", "class_data" ], + [ "GivenKinship", "class_given_kinship.html", "class_given_kinship" ], + [ "H2rEst", "class_h2r_est.html", null ], + [ "Hca", "class_hca.html", null ], + [ "IndividualData", "class_individual_data.html", "class_individual_data" ], + [ "IndividualDataSet", "class_individual_data_set.html", "class_individual_data_set" ], + [ "Kinship", "class_kinship.html", "class_kinship" ], + [ "Option", "class_option.html", "class_option" ], + [ "RemlH2rEst", "class_reml_h2r_est.html", "class_reml_h2r_est" ], + [ "RemlHca", "class_reml_hca.html", "class_reml_hca" ], + [ "Scorer", "class_scorer.html", "class_scorer" ], + [ "SnpKinship", "class_snp_kinship.html", "class_snp_kinship" ], + [ "Util", "class_util.html", null ] +]; \ No newline at end of file diff --git a/docs/html/bc_s.png b/docs/html/bc_s.png new file mode 100644 index 0000000..224b29a Binary files /dev/null and b/docs/html/bc_s.png differ diff --git a/docs/html/bdwn.png b/docs/html/bdwn.png new file mode 100644 index 0000000..940a0b9 Binary files /dev/null and b/docs/html/bdwn.png differ diff --git a/docs/html/class_data-members.html b/docs/html/class_data-members.html new file mode 100644 index 0000000..1fe3c9e --- /dev/null +++ b/docs/html/class_data-members.html @@ -0,0 +1,107 @@ + + + + + + + +HCA: Member List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Data Member List
+
+
+ +

This is the complete list of members for Data, including all inherited members.

+ + + + + + + + +
Data(Option &option)Data
individualDataSet (defined in Data)Data
lambdaVec (defined in Data)Data
load(Option &option)Data
scorers (defined in Data)Data
trait (defined in Data)Data
writeKinship(std::string outDir)Data
+
+ + + + diff --git a/docs/html/class_data.html b/docs/html/class_data.html new file mode 100644 index 0000000..19255e7 --- /dev/null +++ b/docs/html/class_data.html @@ -0,0 +1,183 @@ + + + + + + + +HCA: Data Class Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Data Class Reference
+
+
+ +

A class to load all relevant data. Responsible solely for loading data - not for reconciling missing individuals. + More...

+ +

#include <Data.h>

+
+Collaboration diagram for Data:
+
+
Collaboration graph
+ + + +
+ + + + + + + + + + + +

+Public Member Functions

Data (Option &option)
 A constructor.
 
void load (Option &option)
 Loads data based on the provided option argument. More...
 
+void writeKinship (std::string outDir)
 Writes the Kinship file to disk.
 
+ + + + + + + + + +

+Public Attributes

+IndividualDataSet individualDataSet
 
+arma::mat trait
 
+std::vector< double > lambdaVec
 
+std::vector< Scorerscorers
 
+

Detailed Description

+

A class to load all relevant data. Responsible solely for loading data - not for reconciling missing individuals.

+

Loads data into the userDataSet, trait, lambdaVec, and scorers fields.

+

Member Function Documentation

+ +

◆ load()

+ +
+
+ + + + + + + + +
void Data::load (Optionoption)
+
+ +

Loads data based on the provided option argument.

+

Loads the following individual-specific data:

    +
  1. FAM data
  2. +
  3. SNP data
  4. +
  5. Phenotype data
  6. +
  7. Covariate data (quantitative and categorial/discrete)
  8. +
+

Loads the following non-individual-specific data:

    +
  1. Trait file (for scoring)
  2. +
  3. Lambda vector file
  4. +
+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/html/class_data.js b/docs/html/class_data.js new file mode 100644 index 0000000..2de1b27 --- /dev/null +++ b/docs/html/class_data.js @@ -0,0 +1,10 @@ +var class_data = +[ + [ "Data", "class_data.html#ae1319726a459a90bc203b3550b78e558", null ], + [ "load", "class_data.html#af103fced88bc1ea697fd6ae9f32bd15f", null ], + [ "writeKinship", "class_data.html#a98f3c36d2c92812b15be1ede5ba08986", null ], + [ "individualDataSet", "class_data.html#a61adff3d9c24eb86a754b08d39fb1e48", null ], + [ "lambdaVec", "class_data.html#a6471ad4b3fafd2270f5f1076e70a67ce", null ], + [ "scorers", "class_data.html#a191cf84ef250f6aa792b77beb2a0b4a0", null ], + [ "trait", "class_data.html#a7996ee33b569fc2f67568ec04c16158c", null ] +]; \ No newline at end of file diff --git a/docs/html/class_data__coll__graph.map b/docs/html/class_data__coll__graph.map new file mode 100644 index 0000000..8fa9549 --- /dev/null +++ b/docs/html/class_data__coll__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/class_data__coll__graph.md5 b/docs/html/class_data__coll__graph.md5 new file mode 100644 index 0000000..8c30354 --- /dev/null +++ b/docs/html/class_data__coll__graph.md5 @@ -0,0 +1 @@ +15cd8289e790c7c7b976fb021d7e9bb7 \ No newline at end of file diff --git a/docs/html/class_data__coll__graph.png b/docs/html/class_data__coll__graph.png new file mode 100644 index 0000000..375bdf6 Binary files /dev/null and b/docs/html/class_data__coll__graph.png differ diff --git a/docs/html/class_given_kinship-members.html b/docs/html/class_given_kinship-members.html new file mode 100644 index 0000000..c132cce --- /dev/null +++ b/docs/html/class_given_kinship-members.html @@ -0,0 +1,108 @@ + + + + + + + +HCA: Member List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
GivenKinship Member List
+
+
+ +

This is the complete list of members for GivenKinship, including all inherited members.

+ + + + + + + + + +
construct(std::string kinshipfile, std::string kinshipidfile)GivenKinship
getGrm()Kinship
getIdVec()Kinship
idVec (defined in Kinship)Kinshipprotected
Kinship()Kinship
Kinship(arma::mat grm, std::map< std::string, int > ind, int nIndv, std::vector< std::string > idVec)Kinship
m_grm (defined in Kinship)Kinshipprotected
m_nIndv (defined in Kinship)Kinshipprotected
+
+ + + + diff --git a/docs/html/class_given_kinship.html b/docs/html/class_given_kinship.html new file mode 100644 index 0000000..4175fa4 --- /dev/null +++ b/docs/html/class_given_kinship.html @@ -0,0 +1,166 @@ + + + + + + + +HCA: GivenKinship Class Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
GivenKinship Class Reference
+
+
+ +

A class to load a pregiven kinship matrix. + More...

+ +

#include <GivenKinship.h>

+
+Inheritance diagram for GivenKinship:
+
+
Inheritance graph
+ + + +
+
+Collaboration diagram for GivenKinship:
+
+
Collaboration graph
+ + + +
+ + + + + + + + + + + + + + + + + + +

+Public Member Functions

+void construct (std::string kinshipfile, std::string kinshipidfile)
 Constructor. Loads and parses the kinship file into a matrix.
 
- Public Member Functions inherited from Kinship
Kinship ()
 Constructor.
 
Kinship (arma::mat grm, std::map< std::string, int > ind, int nIndv, std::vector< std::string > idVec)
 Constructor.
 
+arma::mat & getGrm ()
 Returns the generated or parsed Genetic Relationship Matrix (GRM).
 
std::vector< std::string > & getIdVec ()
 Returns the generated or parsed individual id vector. More...
 
+ + + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from Kinship
+arma::mat m_grm
 
+uint32_t m_nIndv
 
+std::vector< std::string > idVec
 
+

Detailed Description

+

A class to load a pregiven kinship matrix.

+

Used if ksSrc is pregiven.

+

The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/html/class_given_kinship.js b/docs/html/class_given_kinship.js new file mode 100644 index 0000000..dc3cd08 --- /dev/null +++ b/docs/html/class_given_kinship.js @@ -0,0 +1,4 @@ +var class_given_kinship = +[ + [ "construct", "class_given_kinship.html#a1d04e3b823dc5d2dc083a79d4c96b7b1", null ] +]; \ No newline at end of file diff --git a/docs/html/class_given_kinship__coll__graph.map b/docs/html/class_given_kinship__coll__graph.map new file mode 100644 index 0000000..2fe476c --- /dev/null +++ b/docs/html/class_given_kinship__coll__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/class_given_kinship__coll__graph.md5 b/docs/html/class_given_kinship__coll__graph.md5 new file mode 100644 index 0000000..5b6f402 --- /dev/null +++ b/docs/html/class_given_kinship__coll__graph.md5 @@ -0,0 +1 @@ +1764e03c844a0b6dff66457b7068e2f4 \ No newline at end of file diff --git a/docs/html/class_given_kinship__coll__graph.png b/docs/html/class_given_kinship__coll__graph.png new file mode 100644 index 0000000..fae7f4e Binary files /dev/null and b/docs/html/class_given_kinship__coll__graph.png differ diff --git a/docs/html/class_given_kinship__inherit__graph.map b/docs/html/class_given_kinship__inherit__graph.map new file mode 100644 index 0000000..2fe476c --- /dev/null +++ b/docs/html/class_given_kinship__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/class_given_kinship__inherit__graph.md5 b/docs/html/class_given_kinship__inherit__graph.md5 new file mode 100644 index 0000000..0a753a4 --- /dev/null +++ b/docs/html/class_given_kinship__inherit__graph.md5 @@ -0,0 +1 @@ +ed5cf527bc78fabddc92755002921bf4 \ No newline at end of file diff --git a/docs/html/class_given_kinship__inherit__graph.png b/docs/html/class_given_kinship__inherit__graph.png new file mode 100644 index 0000000..fae7f4e Binary files /dev/null and b/docs/html/class_given_kinship__inherit__graph.png differ diff --git a/docs/html/class_h2r_est.html b/docs/html/class_h2r_est.html new file mode 100644 index 0000000..9e35dcc --- /dev/null +++ b/docs/html/class_h2r_est.html @@ -0,0 +1,121 @@ + + + + + + + +HCA: H2rEst Class Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
H2rEst Class Reference
+
+
+ +

A class used to perform heritability analysis. + More...

+ +

#include <H2rEst.h>

+
+Inheritance diagram for H2rEst:
+
+
Inheritance graph
+ + + +
+
+Collaboration diagram for H2rEst:
+
+
Collaboration graph
+
+

Detailed Description

+

A class used to perform heritability analysis.

+

The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/docs/html/class_h2r_est__coll__graph.map b/docs/html/class_h2r_est__coll__graph.map new file mode 100644 index 0000000..fc80067 --- /dev/null +++ b/docs/html/class_h2r_est__coll__graph.map @@ -0,0 +1,2 @@ + + diff --git a/docs/html/class_h2r_est__coll__graph.md5 b/docs/html/class_h2r_est__coll__graph.md5 new file mode 100644 index 0000000..373da14 --- /dev/null +++ b/docs/html/class_h2r_est__coll__graph.md5 @@ -0,0 +1 @@ +23c4e07dac69dd36f231440e70ab0898 \ No newline at end of file diff --git a/docs/html/class_h2r_est__coll__graph.png b/docs/html/class_h2r_est__coll__graph.png new file mode 100644 index 0000000..b40ceb4 Binary files /dev/null and b/docs/html/class_h2r_est__coll__graph.png differ diff --git a/docs/html/class_h2r_est__inherit__graph.map b/docs/html/class_h2r_est__inherit__graph.map new file mode 100644 index 0000000..24639a9 --- /dev/null +++ b/docs/html/class_h2r_est__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/class_h2r_est__inherit__graph.md5 b/docs/html/class_h2r_est__inherit__graph.md5 new file mode 100644 index 0000000..98beee0 --- /dev/null +++ b/docs/html/class_h2r_est__inherit__graph.md5 @@ -0,0 +1 @@ +c0c1b3c2e3bf53c84e614c9f808c04df \ No newline at end of file diff --git a/docs/html/class_h2r_est__inherit__graph.png b/docs/html/class_h2r_est__inherit__graph.png new file mode 100644 index 0000000..e2195cb Binary files /dev/null and b/docs/html/class_h2r_est__inherit__graph.png differ diff --git a/docs/html/class_hca.html b/docs/html/class_hca.html new file mode 100644 index 0000000..5dafe5e --- /dev/null +++ b/docs/html/class_hca.html @@ -0,0 +1,121 @@ + + + + + + + +HCA: Hca Class Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Hca Class Reference
+
+
+ +

A class used to perform heritable component analysis. + More...

+ +

#include <Hca.h>

+
+Inheritance diagram for Hca:
+
+
Inheritance graph
+ + + +
+
+Collaboration diagram for Hca:
+
+
Collaboration graph
+
+

Detailed Description

+

A class used to perform heritable component analysis.

+

The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/docs/html/class_hca__coll__graph.map b/docs/html/class_hca__coll__graph.map new file mode 100644 index 0000000..97d3921 --- /dev/null +++ b/docs/html/class_hca__coll__graph.map @@ -0,0 +1,2 @@ + + diff --git a/docs/html/class_hca__coll__graph.md5 b/docs/html/class_hca__coll__graph.md5 new file mode 100644 index 0000000..5b60e6f --- /dev/null +++ b/docs/html/class_hca__coll__graph.md5 @@ -0,0 +1 @@ +0832130c435c11bfe6ad48e24533a95f \ No newline at end of file diff --git a/docs/html/class_hca__coll__graph.png b/docs/html/class_hca__coll__graph.png new file mode 100644 index 0000000..0fab61d Binary files /dev/null and b/docs/html/class_hca__coll__graph.png differ diff --git a/docs/html/class_hca__inherit__graph.map b/docs/html/class_hca__inherit__graph.map new file mode 100644 index 0000000..aab7477 --- /dev/null +++ b/docs/html/class_hca__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/class_hca__inherit__graph.md5 b/docs/html/class_hca__inherit__graph.md5 new file mode 100644 index 0000000..35c71e9 --- /dev/null +++ b/docs/html/class_hca__inherit__graph.md5 @@ -0,0 +1 @@ +4d6d46c4e3b04daf0ddd1f859ff551ec \ No newline at end of file diff --git a/docs/html/class_hca__inherit__graph.png b/docs/html/class_hca__inherit__graph.png new file mode 100644 index 0000000..1836b7e Binary files /dev/null and b/docs/html/class_hca__inherit__graph.png differ diff --git a/docs/html/class_individual_data-members.html b/docs/html/class_individual_data-members.html new file mode 100644 index 0000000..ba3660d --- /dev/null +++ b/docs/html/class_individual_data-members.html @@ -0,0 +1,119 @@ + + + + + + + +HCA: Member List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
IndividualData Member List
+
+
+ +

This is the complete list of members for IndividualData, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + +
addCCovData(std::vector< double > &cCovNew)IndividualData
addPedData(std::vector< double > &pedNew)IndividualData
addPhenData(std::vector< double > &phenNew)IndividualData
addQCovData(std::vector< double > &qCovNew)IndividualData
getCCov()IndividualData
getNewGrmId() constIndividualData
getNumMissingGenoValues()IndividualData
getPed()IndividualData
getPedId() constIndividualData
getPhen()IndividualData
getPregivenGrmId() constIndividualData
getQCov()IndividualData
getStrId() constIndividualData
resetPhenData()IndividualData
setNewGrmId(int idNew)IndividualData
setNumMissingGenoValues(int numMissingGenoValuesNew)IndividualData
setPedId(int idNew)IndividualData
setPregivenGrmId(int idNew)IndividualData
setStrId(std::string strIdNew)IndividualData
+
+ + + + diff --git a/docs/html/class_individual_data.html b/docs/html/class_individual_data.html new file mode 100644 index 0000000..bc624f0 --- /dev/null +++ b/docs/html/class_individual_data.html @@ -0,0 +1,198 @@ + + + + + + + +HCA: IndividualData Class Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
IndividualData Class Reference
+
+
+ +

A class to represent data associated with a given individual. + More...

+ +

#include <IndividualData.h>

+
+Collaboration diagram for IndividualData:
+
+
Collaboration graph
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+std::vector< double > & getPed ()
 Returns PED data for this individual.
 
+std::vector< double > & getPhen ()
 Returns phenotypic data for this individual.
 
+std::vector< double > & getQCov ()
 Returns quantitative covariate data for this individual.
 
+std::vector< double > & getCCov ()
 Returns categorical covariate data for this individual.
 
+void setStrId (std::string strIdNew)
 Sets the string ID for this individual (i.e. the ID provided in input files).
 
+std::string getStrId () const
 Returns the string ID for this individual.
 
+void setPregivenGrmId (int idNew)
 Sets this individual's position in the pregiven GRM.
 
+int getPregivenGrmId () const
 Returns this individual's position in the pregiven GRM.
 
+void setNewGrmId (int idNew)
 Sets this individual's position in the final GRM.
 
+int getNewGrmId () const
 Returns this individual's position in the final GRM.
 
+void setPedId (int idNew)
 Sets this individual's position in the genotypic data matrix.
 
+int getPedId () const
 Returns this individual's position in the genotypic data matrix.
 
+void setNumMissingGenoValues (int numMissingGenoValuesNew)
 Sets the number of missing genotypic values for this individual.
 
+int getNumMissingGenoValues ()
 Returns the number of missing genotypic values for this individual.
 
+void addPedData (std::vector< double > &pedNew)
 Adds data from the PED file to this individual.
 
+void resetPhenData ()
 Deletes all phenotypic data on this individual.
 
+void addPhenData (std::vector< double > &phenNew)
 Adds phenotypic data to this individual.
 
+void addQCovData (std::vector< double > &qCovNew)
 Adds quantitative covariate data to this individual.
 
+void addCCovData (std::vector< double > &cCovNew)
 Adds categorical covariate data to this individual.
 
+

Detailed Description

+

A class to represent data associated with a given individual.

+

IndividualData objects are generally kept track of with a IndividualDataSet.

+

The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/html/class_individual_data.js b/docs/html/class_individual_data.js new file mode 100644 index 0000000..af632f0 --- /dev/null +++ b/docs/html/class_individual_data.js @@ -0,0 +1,22 @@ +var class_individual_data = +[ + [ "addCCovData", "class_individual_data.html#a8caf856e4f6c7d526743ff05b29c9661", null ], + [ "addPedData", "class_individual_data.html#a4ed3b9d923743e0b5b86cfbc4314d8f2", null ], + [ "addPhenData", "class_individual_data.html#a885711b2191a3181e8197769c77d85df", null ], + [ "addQCovData", "class_individual_data.html#a42fc4d5cdb994e5c8ef2877c68e23b6a", null ], + [ "getCCov", "class_individual_data.html#adf02b65cc7645640d64f2eae90e1e15b", null ], + [ "getNewGrmId", "class_individual_data.html#a15466375800cc1dd62b31f86e8f9190e", null ], + [ "getNumMissingGenoValues", "class_individual_data.html#a72c37be530afc78e506a19af418b5259", null ], + [ "getPed", "class_individual_data.html#a49a3e8d40b9eb8c8582d8efb4b0c1bb5", null ], + [ "getPedId", "class_individual_data.html#a62f9e329c479fdc35ebb57b0463b70df", null ], + [ "getPhen", "class_individual_data.html#aa25cd8a20812ec9533089b8301c0318d", null ], + [ "getPregivenGrmId", "class_individual_data.html#a8fec70aa6005b7d85ae9e8bb255e53fb", null ], + [ "getQCov", "class_individual_data.html#a137605ca9bb5f1b153d078e96fa00bb8", null ], + [ "getStrId", "class_individual_data.html#af6dde62326e0d3696b5456e472451ac0", null ], + [ "resetPhenData", "class_individual_data.html#abfc9899daaf19d3cf501247e791558dc", null ], + [ "setNewGrmId", "class_individual_data.html#a1a59a84bd7e1ff6652246c4c885cfa38", null ], + [ "setNumMissingGenoValues", "class_individual_data.html#aca3dac1ae763cc778313bca3ecac2fbc", null ], + [ "setPedId", "class_individual_data.html#a9c0690094ce9cab9eba2f6b352213ffe", null ], + [ "setPregivenGrmId", "class_individual_data.html#ae9c5fa72191ea89a63b16422256dd13c", null ], + [ "setStrId", "class_individual_data.html#a13f03a99eb8d93edbc2bee5d1d7e25b0", null ] +]; \ No newline at end of file diff --git a/docs/html/class_individual_data__coll__graph.map b/docs/html/class_individual_data__coll__graph.map new file mode 100644 index 0000000..00c9dcf --- /dev/null +++ b/docs/html/class_individual_data__coll__graph.map @@ -0,0 +1,2 @@ + + diff --git a/docs/html/class_individual_data__coll__graph.md5 b/docs/html/class_individual_data__coll__graph.md5 new file mode 100644 index 0000000..5b419a8 --- /dev/null +++ b/docs/html/class_individual_data__coll__graph.md5 @@ -0,0 +1 @@ +b18385fd3fc23f2f3db437fe1346c01c \ No newline at end of file diff --git a/docs/html/class_individual_data__coll__graph.png b/docs/html/class_individual_data__coll__graph.png new file mode 100644 index 0000000..0fa5dd2 Binary files /dev/null and b/docs/html/class_individual_data__coll__graph.png differ diff --git a/docs/html/class_individual_data_set-members.html b/docs/html/class_individual_data_set-members.html new file mode 100644 index 0000000..f00aa41 --- /dev/null +++ b/docs/html/class_individual_data_set-members.html @@ -0,0 +1,129 @@ + + + + + + + +HCA: Member List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
IndividualDataSet Member List
+
+
+ +

This is the complete list of members for IndividualDataSet, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addCCovData(std::string id, std::vector< double > &cCovData)IndividualDataSet
addingCCovData()IndividualDataSet
addingChrData()IndividualDataSet
addingPedData()IndividualDataSet
addingPhenData()IndividualDataSet
addingQCovData()IndividualDataSet
addPedData(std::string id, int pedId, std::vector< double > &pedData)IndividualDataSet
addPhenData(std::string id, std::vector< double > &phenData)IndividualDataSet
addQCovData(std::string id, std::vector< double > &qCovData)IndividualDataSet
getAN()IndividualDataSet
getChr()IndividualDataSet
getCov(int idx)IndividualDataSet
getCovAdded()IndividualDataSet
getCovWithoutSplit(int idx)IndividualDataSet
getGeno()IndividualDataSet
getGrm(int idx)IndividualDataSet
getGrmWithoutSplit(int idx)IndividualDataSet
getIndividualList()IndividualDataSet
getIndividualMap()IndividualDataSet
getNumSubjects()IndividualDataSet
getPed()IndividualDataSet
getPhen(int idx)IndividualDataSet
getPhenWithoutSplit(int idx)IndividualDataSet
getSplitPartIds()IndividualDataSet
reconcile()IndividualDataSet
setChrData(std::vector< int > &chrNew)IndividualDataSet
setGenoData(arma::mat &genoNew, std::vector< int > numMissingValues)IndividualDataSet
setOption(Option &optionNew)IndividualDataSet
settingGenoData()IndividualDataSet
+
+ + + + diff --git a/docs/html/class_individual_data_set.html b/docs/html/class_individual_data_set.html new file mode 100644 index 0000000..4f1cd8b --- /dev/null +++ b/docs/html/class_individual_data_set.html @@ -0,0 +1,281 @@ + + + + + + + +HCA: IndividualDataSet Class Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
IndividualDataSet Class Reference
+
+
+ +

A class to keep track of and reconcile IndividualData objects. + More...

+ +

#include <IndividualDataSet.h>

+
+Collaboration diagram for IndividualDataSet:
+
+
Collaboration graph
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+void addingPedData ()
 Indicate that PED data will be added to this IndividualDataSet.
 
+void addPedData (std::string id, int pedId, std::vector< double > &pedData)
 Add PED data to this IndividualDataSet, for the provided individual ID.
 
void addingPhenData ()
 Indicate that phenotypic data will be added to this IndividualDataSet. More...
 
+void addPhenData (std::string id, std::vector< double > &phenData)
 Add phenotypic data to this IndividualDataSet, for the provided individual ID.
 
+void addingQCovData ()
 Indicate that quantitative covariate data will be added to this IndividualDataSet.
 
+void addQCovData (std::string id, std::vector< double > &qCovData)
 Add quantitative covariate data to this IndividualDataSet, for the provided individual ID.
 
+void addingCCovData ()
 Indicate that categorical covariate data will be added to this IndividualDataSet.
 
+void addCCovData (std::string id, std::vector< double > &cCovData)
 Add categorical covariate data to this IndividualDataSet, for the provided individual ID.
 
+void addingChrData ()
 Indicate that chromsome data will be added to this IndividualDataSet.
 
+void setChrData (std::vector< int > &chrNew)
 Add chromosome data to this IndividualDataSet.
 
+void settingGenoData ()
 Indicate that genotypic data will be added to this IndividualDataSet.
 
+void setGenoData (arma::mat &genoNew, std::vector< int > numMissingValues)
 Add genotypic data to this IndividualDataSet.
 
+void setOption (Option &optionNew)
 Sets the Option object on this individualDataSet.
 
void reconcile ()
 Reconciles data by removing individuals with missing data. More...
 
+int getNumSubjects ()
 Returns the number of individuals currently being kept track of.
 
+bool getCovAdded ()
 Returns true if covariate data has been added.
 
+arma::mat & getGeno ()
 Returns the generated genotypic data matrix.
 
+std::vector< int > & getChr ()
 Returns the provided chromosome data.
 
+arma::mat & getAN ()
 Returns the AN matrix (only available if the matrix was generated from SNP data).
 
+arma::mat & getGrm (int idx)
 Returns the generated genetic relationship matrix.
 
+arma::mat & getCov (int idx)
 Returns the covariate data associated with the given index (based on split number).
 
+arma::mat & getPhen (int idx)
 Returns the phenotypic data associated with the given index (based on split number).
 
+arma::mat & getGrmWithoutSplit (int idx)
 Returns the GRM data with all individuals EXCEPT for those in the provided split number.
 
+arma::mat & getCovWithoutSplit (int idx)
 Returns the covariates with all individuals EXCEPT for those in the provided split number.
 
+arma::mat & getPhenWithoutSplit (int idx)
 Returns the phenotypic data with all individuals EXCEPT for those in the provided split number.
 
+arma::mat & getPed ()
 Returns the PED data associated with the given index (based on split number).
 
+std::vector< std::vector< std::string > > & getSplitPartIds ()
 Returns the IDs associated with each "split".
 
+std::list< std::reference_wrapper< IndividualData > > & getIndividualList ()
 Returns the IndividualData objects in a list data structure.
 
+std::map< std::string, IndividualData > & getIndividualMap ()
 Returns the IndividualData objects in a map data structure.
 
+

Detailed Description

+

A class to keep track of and reconcile IndividualData objects.

+

Member Function Documentation

+ +

◆ addingPhenData()

+ +
+
+ + + + + + + +
void IndividualDataSet::addingPhenData ()
+
+ +

Indicate that phenotypic data will be added to this IndividualDataSet.

+

Wipes any existing phenotypic data.

+ +
+
+ +

◆ reconcile()

+ +
+
+ + + + + + + +
void IndividualDataSet::reconcile ()
+
+ +

Reconciles data by removing individuals with missing data.

+

Once data is reconciled, also generates final matrices with all individuals that are still included.

+

Generates several matrix formats, including:

    +
  1. The "full" matrix, with all individuals included.
  2. +
  3. If splitting is enabled: one matrix for each split of the data
  4. +
  5. If splitting is enabled: one matrix with all information except for a single split of the data - this is run with respect to every split.
  6. +
+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/html/class_individual_data_set.js b/docs/html/class_individual_data_set.js new file mode 100644 index 0000000..46d3350 --- /dev/null +++ b/docs/html/class_individual_data_set.js @@ -0,0 +1,32 @@ +var class_individual_data_set = +[ + [ "addCCovData", "class_individual_data_set.html#a089c41e85d418bf14f31dd1330fea2f1", null ], + [ "addingCCovData", "class_individual_data_set.html#a610c3eb4f63aed39dc2c9e52e1b1b2e2", null ], + [ "addingChrData", "class_individual_data_set.html#a19e0b2d2bf86850b6c0af574df29b688", null ], + [ "addingPedData", "class_individual_data_set.html#a7ded1f43f59309e65612ba689480e088", null ], + [ "addingPhenData", "class_individual_data_set.html#ac3213f3016f5e404bda4235ed31caddf", null ], + [ "addingQCovData", "class_individual_data_set.html#aa7cfd9afb873abebe3d48a51f5388124", null ], + [ "addPedData", "class_individual_data_set.html#a7360d8dd1487fa64cc42c5deb979021d", null ], + [ "addPhenData", "class_individual_data_set.html#a86e72d91ce939e489687fd16666dd318", null ], + [ "addQCovData", "class_individual_data_set.html#a83c8392469827b88a276e748033af8ff", null ], + [ "getAN", "class_individual_data_set.html#a844822ee19700a1da8412961724d5d25", null ], + [ "getChr", "class_individual_data_set.html#a48b372129e0e5f5ee973f911c3f052a0", null ], + [ "getCov", "class_individual_data_set.html#a300ebab7735f66d7108763f18b371c24", null ], + [ "getCovAdded", "class_individual_data_set.html#a4c00be812a03b7c421b6b3581c50e9b0", null ], + [ "getCovWithoutSplit", "class_individual_data_set.html#a0b28fc2bfce2a0233bc52233cefb64ff", null ], + [ "getGeno", "class_individual_data_set.html#aa34ec55d33ad69b64630d71fc24b3138", null ], + [ "getGrm", "class_individual_data_set.html#a98000f81dcc25f6caa55060c0e84ebf7", null ], + [ "getGrmWithoutSplit", "class_individual_data_set.html#a944d5406ba3751566bb3c9259de72265", null ], + [ "getIndividualList", "class_individual_data_set.html#a10a84b55bc6c639052e27e449eec6df9", null ], + [ "getIndividualMap", "class_individual_data_set.html#ad41da35ffee7e2ad0dee54a7b89eaab0", null ], + [ "getNumSubjects", "class_individual_data_set.html#a54cdc9472ab575a3e66ba0dbfa03cb24", null ], + [ "getPed", "class_individual_data_set.html#a32f66ecb52e7b716b5c3155809fa706a", null ], + [ "getPhen", "class_individual_data_set.html#aab60162ef85cef800d9abb07f5835604", null ], + [ "getPhenWithoutSplit", "class_individual_data_set.html#a5aa39b3457d95d7f85824aa1761bfab9", null ], + [ "getSplitPartIds", "class_individual_data_set.html#a01d203698f124fc2d8358b014aff47b4", null ], + [ "reconcile", "class_individual_data_set.html#ab449377333865d812e1ebd37b7f845dc", null ], + [ "setChrData", "class_individual_data_set.html#a5b7b119dee43a383b1db402a134ac24f", null ], + [ "setGenoData", "class_individual_data_set.html#a92e85a50fe23ad05d4ffde3127091cd4", null ], + [ "setOption", "class_individual_data_set.html#aecc26260e462473c94288edfc5cdca20", null ], + [ "settingGenoData", "class_individual_data_set.html#aa77a30a3f5219bf47c585670e6bb7578", null ] +]; \ No newline at end of file diff --git a/docs/html/class_individual_data_set__coll__graph.map b/docs/html/class_individual_data_set__coll__graph.map new file mode 100644 index 0000000..16758e1 --- /dev/null +++ b/docs/html/class_individual_data_set__coll__graph.map @@ -0,0 +1,2 @@ + + diff --git a/docs/html/class_individual_data_set__coll__graph.md5 b/docs/html/class_individual_data_set__coll__graph.md5 new file mode 100644 index 0000000..9615c92 --- /dev/null +++ b/docs/html/class_individual_data_set__coll__graph.md5 @@ -0,0 +1 @@ +915089bdd45233035a1d4c14115038c5 \ No newline at end of file diff --git a/docs/html/class_individual_data_set__coll__graph.png b/docs/html/class_individual_data_set__coll__graph.png new file mode 100644 index 0000000..0f2f5cf Binary files /dev/null and b/docs/html/class_individual_data_set__coll__graph.png differ diff --git a/docs/html/class_kinship-members.html b/docs/html/class_kinship-members.html new file mode 100644 index 0000000..d91dfb6 --- /dev/null +++ b/docs/html/class_kinship-members.html @@ -0,0 +1,107 @@ + + + + + + + +HCA: Member List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Kinship Member List
+
+
+ +

This is the complete list of members for Kinship, including all inherited members.

+ + + + + + + + +
getGrm()Kinship
getIdVec()Kinship
idVec (defined in Kinship)Kinshipprotected
Kinship()Kinship
Kinship(arma::mat grm, std::map< std::string, int > ind, int nIndv, std::vector< std::string > idVec)Kinship
m_grm (defined in Kinship)Kinshipprotected
m_nIndv (defined in Kinship)Kinshipprotected
+
+ + + + diff --git a/docs/html/class_kinship.html b/docs/html/class_kinship.html new file mode 100644 index 0000000..a781a03 --- /dev/null +++ b/docs/html/class_kinship.html @@ -0,0 +1,179 @@ + + + + + + + +HCA: Kinship Class Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Kinship Class Reference
+
+
+ +

A class used to load or generate kinship data. This class must not be used directly; only subclasses should be used. + More...

+ +

#include <Kinship.h>

+
+Inheritance diagram for Kinship:
+
+
Inheritance graph
+ + + + +
+
+Collaboration diagram for Kinship:
+
+
Collaboration graph
+
+ + + + + + + + + + + + + + +

+Public Member Functions

Kinship ()
 Constructor.
 
Kinship (arma::mat grm, std::map< std::string, int > ind, int nIndv, std::vector< std::string > idVec)
 Constructor.
 
+arma::mat & getGrm ()
 Returns the generated or parsed Genetic Relationship Matrix (GRM).
 
std::vector< std::string > & getIdVec ()
 Returns the generated or parsed individual id vector. More...
 
+ + + + + + + +

+Protected Attributes

+arma::mat m_grm
 
+uint32_t m_nIndv
 
+std::vector< std::string > idVec
 
+

Detailed Description

+

A class used to load or generate kinship data. This class must not be used directly; only subclasses should be used.

+

Member Function Documentation

+ +

◆ getIdVec()

+ +
+
+ + + + + + + +
std::vector< std::string > & Kinship::getIdVec ()
+
+ +

Returns the generated or parsed individual id vector.

+

Maintains insertion order. The first individual in idVec represents the first individual in the GRM.

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/html/class_kinship.js b/docs/html/class_kinship.js new file mode 100644 index 0000000..820787b --- /dev/null +++ b/docs/html/class_kinship.js @@ -0,0 +1,10 @@ +var class_kinship = +[ + [ "Kinship", "class_kinship.html#a18adfc9f2a31d9205628e921ca75fa02", null ], + [ "Kinship", "class_kinship.html#a0f1616e77644d6a7a87db8aeb095b107", null ], + [ "getGrm", "class_kinship.html#ad3e479dec51c13a2e1c70c99f0acc2c4", null ], + [ "getIdVec", "class_kinship.html#add845b5932eae549de8367e00b86fa8c", null ], + [ "idVec", "class_kinship.html#ab2526834b58e785a5c05069e346cfaf8", null ], + [ "m_grm", "class_kinship.html#a9d27e5b9fb058d4e0ce844fbb0508bc3", null ], + [ "m_nIndv", "class_kinship.html#a8e0bb309d82f1b720b995abbae65158a", null ] +]; \ No newline at end of file diff --git a/docs/html/class_kinship__coll__graph.map b/docs/html/class_kinship__coll__graph.map new file mode 100644 index 0000000..2d6dc0b --- /dev/null +++ b/docs/html/class_kinship__coll__graph.map @@ -0,0 +1,2 @@ + + diff --git a/docs/html/class_kinship__coll__graph.md5 b/docs/html/class_kinship__coll__graph.md5 new file mode 100644 index 0000000..6736837 --- /dev/null +++ b/docs/html/class_kinship__coll__graph.md5 @@ -0,0 +1 @@ +a9927ee3a8b654275c2bb095f399f235 \ No newline at end of file diff --git a/docs/html/class_kinship__coll__graph.png b/docs/html/class_kinship__coll__graph.png new file mode 100644 index 0000000..b966e0a Binary files /dev/null and b/docs/html/class_kinship__coll__graph.png differ diff --git a/docs/html/class_kinship__inherit__graph.map b/docs/html/class_kinship__inherit__graph.map new file mode 100644 index 0000000..1dbf477 --- /dev/null +++ b/docs/html/class_kinship__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/html/class_kinship__inherit__graph.md5 b/docs/html/class_kinship__inherit__graph.md5 new file mode 100644 index 0000000..301c3e1 --- /dev/null +++ b/docs/html/class_kinship__inherit__graph.md5 @@ -0,0 +1 @@ +622046f834ad07be85f98e061e7c1cf7 \ No newline at end of file diff --git a/docs/html/class_kinship__inherit__graph.png b/docs/html/class_kinship__inherit__graph.png new file mode 100644 index 0000000..c1430d1 Binary files /dev/null and b/docs/html/class_kinship__inherit__graph.png differ diff --git a/docs/html/class_option-members.html b/docs/html/class_option-members.html new file mode 100644 index 0000000..68ccaba --- /dev/null +++ b/docs/html/class_option-members.html @@ -0,0 +1,118 @@ + + + + + + + +HCA: Member List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Option Member List
+
+
+ +

This is the complete list of members for Option, including all inherited members.

+ + + + + + + + + + + + + + + + + + + +
getBFilePrefix() constOption
getCCovFile() constOption
getCmmd() constOption
getKinshipFile() constOption
getKinshipIDFile() constOption
getKinshipSrc() constOption
getLambdaVecFile() constOption
getMafCutoff() constOption
getMaxIterH2r() constOption
getMaxIterHca() constOption
getMissingGenoCutoff() constOption
getNumSplits() constOption
getNumThreads() constOption
getOutDir() constOption
getPhenFile() constOption
getQCovFile() constOption
getTraitFile() constOption
parse(int argc, char **argv)Option
+
+ + + + diff --git a/docs/html/class_option.html b/docs/html/class_option.html new file mode 100644 index 0000000..4c9280a --- /dev/null +++ b/docs/html/class_option.html @@ -0,0 +1,194 @@ + + + + + + + +HCA: Option Class Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Option Class Reference
+
+
+ +

A class to load all user options. + More...

+ +

#include <Option.h>

+
+Collaboration diagram for Option:
+
+
Collaboration graph
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+void parse (int argc, char **argv)
 Parses all CLI options.
 
+uint16_t getCmmd () const
 Returns the command the user specified; i.e., the analysis to run.
 
+std::string getBFilePrefix () const
 Returns the prefix for the binary data filenames.
 
+std::string getQCovFile () const
 Returns the quantitative covariate filename.
 
+std::string getCCovFile () const
 Returns the categorical covariate filename.
 
+std::string getKinshipFile () const
 Returns the kinship filename.
 
+std::string getKinshipIDFile () const
 Returns the kinship ID filename.
 
+std::string getPhenFile () const
 Returns the phenotype filename.
 
+std::string getTraitFile () const
 Returns the trait filename.
 
+int getKinshipSrc () const
 Returns the kinship source to use.
 
+double getMafCutoff () const
 Returns the Minor Allele Frequency cutoff for GRM generation.
 
+double getMissingGenoCutoff () const
 Returns the missing genotypic data cutoff for GRM generation.
 
+std::string getOutDir () const
 Returns the directory for output files.
 
+int getNumThreads () const
 Returns the number of threads to use.
 
+std::string getLambdaVecFile () const
 Returns the lambda vector filename.
 
+int getNumSplits () const
 Returns the number of splits to use during the cross-validation and lambda-tuning process.
 
+int getMaxIterHca () const
 Returns the maximum number of iterations for HCA analysis (default: 200).
 
+int getMaxIterH2r () const
 Returns the maximum number of iterations for heritability analysis (default: 200).
 
+

Detailed Description

+

A class to load all user options.

+

Note that this class does not load data: only options. The Data class is responsible for actually loading data.

+

The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/html/class_option.js b/docs/html/class_option.js new file mode 100644 index 0000000..9315515 --- /dev/null +++ b/docs/html/class_option.js @@ -0,0 +1,21 @@ +var class_option = +[ + [ "getBFilePrefix", "class_option.html#a2b486563be1622e1da31fb43cc717114", null ], + [ "getCCovFile", "class_option.html#a6baf76ce89274582327e1616862b392f", null ], + [ "getCmmd", "class_option.html#a4f4b55fb5a3a18985537543a168b252d", null ], + [ "getKinshipFile", "class_option.html#abfd74209edc1c9115631527a5f387519", null ], + [ "getKinshipIDFile", "class_option.html#ae8f91cf9f70f2c855671555f2ec390f6", null ], + [ "getKinshipSrc", "class_option.html#a1cb61e972dd463a7da63ea3d9da938ff", null ], + [ "getLambdaVecFile", "class_option.html#ab34e7fd7261a3428e3f1b035ca647abc", null ], + [ "getMafCutoff", "class_option.html#a222db1bc9da3a5aede4d6401f16c86ed", null ], + [ "getMaxIterH2r", "class_option.html#a91ac7dfa8ab9e6141a5a775fb983ff27", null ], + [ "getMaxIterHca", "class_option.html#a347f3442cb7363f210524ad88cb79bcf", null ], + [ "getMissingGenoCutoff", "class_option.html#a0b4c58774305589ad64aba3deb9d6955", null ], + [ "getNumSplits", "class_option.html#ab68ec2e2f08b8ac1a8af85ba48cc43fb", null ], + [ "getNumThreads", "class_option.html#ab0cf3c45795ecd3369a7a731072d4291", null ], + [ "getOutDir", "class_option.html#af51898df742daabd8d31d62923bbf36e", null ], + [ "getPhenFile", "class_option.html#ae74b18e7aafba83cebfeb6f484c42ac8", null ], + [ "getQCovFile", "class_option.html#ae0a5a49e1598747348581bf74198f3d1", null ], + [ "getTraitFile", "class_option.html#a83b4a81a0f2876b192f47bfbfbfbb3fa", null ], + [ "parse", "class_option.html#abf3b886d905c18554337c27c2d8043b4", null ] +]; \ No newline at end of file diff --git a/docs/html/class_option__coll__graph.map b/docs/html/class_option__coll__graph.map new file mode 100644 index 0000000..6c49131 --- /dev/null +++ b/docs/html/class_option__coll__graph.map @@ -0,0 +1,2 @@ + + diff --git a/docs/html/class_option__coll__graph.md5 b/docs/html/class_option__coll__graph.md5 new file mode 100644 index 0000000..b6d51e7 --- /dev/null +++ b/docs/html/class_option__coll__graph.md5 @@ -0,0 +1 @@ +fb3b6e22038739488303dd8f858eb15b \ No newline at end of file diff --git a/docs/html/class_option__coll__graph.png b/docs/html/class_option__coll__graph.png new file mode 100644 index 0000000..a2142ce Binary files /dev/null and b/docs/html/class_option__coll__graph.png differ diff --git a/docs/html/class_reml_h2r_est-members.html b/docs/html/class_reml_h2r_est-members.html new file mode 100644 index 0000000..1237ac3 --- /dev/null +++ b/docs/html/class_reml_h2r_est-members.html @@ -0,0 +1,104 @@ + + + + + + + +HCA: Member List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
RemlH2rEst Member List
+
+
+ +

This is the complete list of members for RemlH2rEst, including all inherited members.

+ + + + + +
calcH2r()RemlH2rEst
getFinalStats()RemlH2rEst
RemlH2rEst(Option &newOption, arma::mat &newPhen, arma::mat &newGrm, arma::mat &newCov)RemlH2rEst
saveOutput()RemlH2rEst
+
+ + + + diff --git a/docs/html/class_reml_h2r_est.html b/docs/html/class_reml_h2r_est.html new file mode 100644 index 0000000..c30df69 --- /dev/null +++ b/docs/html/class_reml_h2r_est.html @@ -0,0 +1,192 @@ + + + + + + + +HCA: RemlH2rEst Class Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
RemlH2rEst Class Reference
+
+
+ +

A class to perform heritability analysis on a given dataset. + More...

+ +

#include <RemlH2rEst.h>

+
+Inheritance diagram for RemlH2rEst:
+
+
Inheritance graph
+ + + +
+
+Collaboration diagram for RemlH2rEst:
+
+
Collaboration graph
+ + + +
+ + + + + + + + + + + + + + +

+Public Member Functions

 RemlH2rEst (Option &newOption, arma::mat &newPhen, arma::mat &newGrm, arma::mat &newCov)
 Constructor. More...
 
+void calcH2r ()
 Runs heritability analysis on the data.
 
+void saveOutput ()
 Saves output to a file.
 
+std::vector< std::vector< double > > & getFinalStats ()
 Returns the final stats from the REML analysis.
 
+

Detailed Description

+

A class to perform heritability analysis on a given dataset.

+

Uses the REML algorithm.

+

Constructor & Destructor Documentation

+ +

◆ RemlH2rEst()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RemlH2rEst::RemlH2rEst (OptionnewOption,
arma::mat & newPhen,
arma::mat & newGrm,
arma::mat & newCov 
)
+
+ +

Constructor.

+

Raises an error if the provided phenotypic data has more than one column.

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/html/class_reml_h2r_est.js b/docs/html/class_reml_h2r_est.js new file mode 100644 index 0000000..4c13b70 --- /dev/null +++ b/docs/html/class_reml_h2r_est.js @@ -0,0 +1,7 @@ +var class_reml_h2r_est = +[ + [ "RemlH2rEst", "class_reml_h2r_est.html#a8dd6ffa90845f14ef01e7f03a776e21f", null ], + [ "calcH2r", "class_reml_h2r_est.html#a46ae48fb9ddd0b293fa9eeafbef23c38", null ], + [ "getFinalStats", "class_reml_h2r_est.html#a6d785889bcf66cf889d523e41d25c118", null ], + [ "saveOutput", "class_reml_h2r_est.html#a72101a685633ac93f0e3d1159a058c06", null ] +]; \ No newline at end of file diff --git a/docs/html/class_reml_h2r_est__coll__graph.map b/docs/html/class_reml_h2r_est__coll__graph.map new file mode 100644 index 0000000..cd5143d --- /dev/null +++ b/docs/html/class_reml_h2r_est__coll__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/class_reml_h2r_est__coll__graph.md5 b/docs/html/class_reml_h2r_est__coll__graph.md5 new file mode 100644 index 0000000..3b8549a --- /dev/null +++ b/docs/html/class_reml_h2r_est__coll__graph.md5 @@ -0,0 +1 @@ +e260059f6ad9bc48ae6297e01eb8e3e1 \ No newline at end of file diff --git a/docs/html/class_reml_h2r_est__coll__graph.png b/docs/html/class_reml_h2r_est__coll__graph.png new file mode 100644 index 0000000..db0b271 Binary files /dev/null and b/docs/html/class_reml_h2r_est__coll__graph.png differ diff --git a/docs/html/class_reml_h2r_est__inherit__graph.map b/docs/html/class_reml_h2r_est__inherit__graph.map new file mode 100644 index 0000000..cd5143d --- /dev/null +++ b/docs/html/class_reml_h2r_est__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/class_reml_h2r_est__inherit__graph.md5 b/docs/html/class_reml_h2r_est__inherit__graph.md5 new file mode 100644 index 0000000..74a52f8 --- /dev/null +++ b/docs/html/class_reml_h2r_est__inherit__graph.md5 @@ -0,0 +1 @@ +519236ee7eabb49a732aade26a7025a7 \ No newline at end of file diff --git a/docs/html/class_reml_h2r_est__inherit__graph.png b/docs/html/class_reml_h2r_est__inherit__graph.png new file mode 100644 index 0000000..db0b271 Binary files /dev/null and b/docs/html/class_reml_h2r_est__inherit__graph.png differ diff --git a/docs/html/class_reml_hca-members.html b/docs/html/class_reml_hca-members.html new file mode 100644 index 0000000..4d1bf91 --- /dev/null +++ b/docs/html/class_reml_hca-members.html @@ -0,0 +1,107 @@ + + + + + + + +HCA: Member List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
RemlHca Member List
+
+
+ +

This is the complete list of members for RemlHca, including all inherited members.

+ + + + + + + + +
constraintFunction(const std::vector< double > &x, std::vector< double > &grad, void *data)RemlHcastatic
getBestLambdaVal()RemlHca
getBestTrainedW()RemlHca
objectiveFunction(const std::vector< double > &x, std::vector< double > &grad, void *my_func_data)RemlHcastatic
RemlHca(Option &newOption, Data &newData)RemlHca
saveOutput()RemlHca
train()RemlHca
+
+ + + + diff --git a/docs/html/class_reml_hca.html b/docs/html/class_reml_hca.html new file mode 100644 index 0000000..e145d1f --- /dev/null +++ b/docs/html/class_reml_hca.html @@ -0,0 +1,210 @@ + + + + + + + +HCA: RemlHca Class Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
RemlHca Class Reference
+
+
+ +

A class to perform heritable component analysis on a given dataset. + More...

+ +

#include <RemlHca.h>

+
+Inheritance diagram for RemlHca:
+
+
Inheritance graph
+ + + +
+
+Collaboration diagram for RemlHca:
+
+
Collaboration graph
+ + + +
+ + + + + + + + + + + + + + + + + +

+Public Member Functions

RemlHca (Option &newOption, Data &newData)
 Constructor.
 
+void train ()
 Runs the REML algorithm to obtain highly-heritable traits.
 
+void saveOutput ()
 Saves output to a file.
 
+double getBestLambdaVal ()
 Return the best lambda value, found by the train function.
 
+arma::mat & getBestTrainedW ()
 Returns the weights generated by the train function.
 
+ + + + + + + +

+Static Public Member Functions

+static double objectiveFunction (const std::vector< double > &x, std::vector< double > &grad, void *my_func_data)
 Objective function for the HCA minimization process.
 
static double constraintFunction (const std::vector< double > &x, std::vector< double > &grad, void *data)
 Constraint function for the HCA minimization process. More...
 
+

Detailed Description

+

A class to perform heritable component analysis on a given dataset.

+

Uses the REML algorithm.

+

Member Function Documentation

+ +

◆ constraintFunction()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
double RemlHca::constraintFunction (const std::vector< double > & x,
std::vector< double > & grad,
void * funcData 
)
+
+static
+
+ +

Constraint function for the HCA minimization process.

+

Constrained to be equal to zero.

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/html/class_reml_hca.js b/docs/html/class_reml_hca.js new file mode 100644 index 0000000..aa6eef7 --- /dev/null +++ b/docs/html/class_reml_hca.js @@ -0,0 +1,8 @@ +var class_reml_hca = +[ + [ "RemlHca", "class_reml_hca.html#ad08b49fa08b8c0eecc15ad1e95a72451", null ], + [ "getBestLambdaVal", "class_reml_hca.html#a3c2580e064bafdf5cb5eb2f052ce02c3", null ], + [ "getBestTrainedW", "class_reml_hca.html#af5ea62f862aba373ce20c292424f64fc", null ], + [ "saveOutput", "class_reml_hca.html#a95de049dd906fbff1dc4632bdd426dd4", null ], + [ "train", "class_reml_hca.html#a64810b4549d0f9086a168d4c26160a2f", null ] +]; \ No newline at end of file diff --git a/docs/html/class_reml_hca__coll__graph.map b/docs/html/class_reml_hca__coll__graph.map new file mode 100644 index 0000000..592a475 --- /dev/null +++ b/docs/html/class_reml_hca__coll__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/class_reml_hca__coll__graph.md5 b/docs/html/class_reml_hca__coll__graph.md5 new file mode 100644 index 0000000..472a819 --- /dev/null +++ b/docs/html/class_reml_hca__coll__graph.md5 @@ -0,0 +1 @@ +2a625a01cc8b60ca69288fe06e9937d9 \ No newline at end of file diff --git a/docs/html/class_reml_hca__coll__graph.png b/docs/html/class_reml_hca__coll__graph.png new file mode 100644 index 0000000..e7b4a9a Binary files /dev/null and b/docs/html/class_reml_hca__coll__graph.png differ diff --git a/docs/html/class_reml_hca__inherit__graph.map b/docs/html/class_reml_hca__inherit__graph.map new file mode 100644 index 0000000..592a475 --- /dev/null +++ b/docs/html/class_reml_hca__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/class_reml_hca__inherit__graph.md5 b/docs/html/class_reml_hca__inherit__graph.md5 new file mode 100644 index 0000000..e51f867 --- /dev/null +++ b/docs/html/class_reml_hca__inherit__graph.md5 @@ -0,0 +1 @@ +755f41ed9c1036d25f52741964bce3f5 \ No newline at end of file diff --git a/docs/html/class_reml_hca__inherit__graph.png b/docs/html/class_reml_hca__inherit__graph.png new file mode 100644 index 0000000..e7b4a9a Binary files /dev/null and b/docs/html/class_reml_hca__inherit__graph.png differ diff --git a/docs/html/class_scorer-members.html b/docs/html/class_scorer-members.html new file mode 100644 index 0000000..137fb2a --- /dev/null +++ b/docs/html/class_scorer-members.html @@ -0,0 +1,103 @@ + + + + + + + +HCA: Member List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Scorer Member List
+
+
+ +

This is the complete list of members for Scorer, including all inherited members.

+ + + + +
getScore()Scorer
saveOutput(IndividualDataSet &individualDataSet)Scorer
Scorer(Option &newOption, arma::mat &phen, arma::mat &trait)Scorer
+
+ + + + diff --git a/docs/html/class_scorer.html b/docs/html/class_scorer.html new file mode 100644 index 0000000..c684236 --- /dev/null +++ b/docs/html/class_scorer.html @@ -0,0 +1,171 @@ + + + + + + + +HCA: Scorer Class Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Scorer Class Reference
+
+
+ +

A class to score users based on their phenotypes and a generated weight. + More...

+ +

#include <Scorer.h>

+
+Collaboration diagram for Scorer:
+
+
Collaboration graph
+
+ + + + + + + + + + + +

+Public Member Functions

 Scorer (Option &newOption, arma::mat &phen, arma::mat &trait)
 Constructor. More...
 
+arma::mat & getScore ()
 Returns the generated scores.
 
+void saveOutput (IndividualDataSet &individualDataSet)
 Saves output to a file.
 
+

Detailed Description

+

A class to score users based on their phenotypes and a generated weight.

+

Weights are typically generated via the HCA process.

+

Constructor & Destructor Documentation

+ +

◆ Scorer()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Scorer::Scorer (OptionnewOption,
arma::mat & phen,
arma::mat & trait 
)
+
+ +

Constructor.

+

Also generates scores inline.

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/html/class_scorer.js b/docs/html/class_scorer.js new file mode 100644 index 0000000..24d19e0 --- /dev/null +++ b/docs/html/class_scorer.js @@ -0,0 +1,6 @@ +var class_scorer = +[ + [ "Scorer", "class_scorer.html#a984c76c1948b49e8d347af14db720c17", null ], + [ "getScore", "class_scorer.html#aa687ed263a90fbc9e15102402a8ed5ef", null ], + [ "saveOutput", "class_scorer.html#a551bc3435903f7466f352488ad82252b", null ] +]; \ No newline at end of file diff --git a/docs/html/class_scorer__coll__graph.map b/docs/html/class_scorer__coll__graph.map new file mode 100644 index 0000000..37d75ed --- /dev/null +++ b/docs/html/class_scorer__coll__graph.map @@ -0,0 +1,2 @@ + + diff --git a/docs/html/class_scorer__coll__graph.md5 b/docs/html/class_scorer__coll__graph.md5 new file mode 100644 index 0000000..cbbb579 --- /dev/null +++ b/docs/html/class_scorer__coll__graph.md5 @@ -0,0 +1 @@ +dbe1aef189c84e43e2c62c700f773f03 \ No newline at end of file diff --git a/docs/html/class_scorer__coll__graph.png b/docs/html/class_scorer__coll__graph.png new file mode 100644 index 0000000..a7e9c8b Binary files /dev/null and b/docs/html/class_scorer__coll__graph.png differ diff --git a/docs/html/class_snp_kinship-members.html b/docs/html/class_snp_kinship-members.html new file mode 100644 index 0000000..dabff97 --- /dev/null +++ b/docs/html/class_snp_kinship-members.html @@ -0,0 +1,109 @@ + + + + + + + +HCA: Member List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
SnpKinship Member List
+
+
+ +

This is the complete list of members for SnpKinship, including all inherited members.

+ + + + + + + + + + +
construct(Option &option, arma::mat &ped, std::vector< int > &chr, arma::mat &newGeno)SnpKinship
getAN()SnpKinship
getGrm()Kinship
getIdVec()Kinship
idVec (defined in Kinship)Kinshipprotected
Kinship()Kinship
Kinship(arma::mat grm, std::map< std::string, int > ind, int nIndv, std::vector< std::string > idVec)Kinship
m_grm (defined in Kinship)Kinshipprotected
m_nIndv (defined in Kinship)Kinshipprotected
+
+ + + + diff --git a/docs/html/class_snp_kinship.html b/docs/html/class_snp_kinship.html new file mode 100644 index 0000000..b4b2155 --- /dev/null +++ b/docs/html/class_snp_kinship.html @@ -0,0 +1,212 @@ + + + + + + + +HCA: SnpKinship Class Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
SnpKinship Class Reference
+
+
+ +

A class to generate a kinship matrix from SNP data. + More...

+ +

#include <SnpKinship.h>

+
+Inheritance diagram for SnpKinship:
+
+
Inheritance graph
+ + + +
+
+Collaboration diagram for SnpKinship:
+
+
Collaboration graph
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

void construct (Option &option, arma::mat &ped, std::vector< int > &chr, arma::mat &newGeno)
 Constructor. More...
 
+arma::mat & getAN ()
 Returns AN matrix, which represents the number of SNPs that were used to calculate the GRM (on a per-individual basis).
 
- Public Member Functions inherited from Kinship
Kinship ()
 Constructor.
 
Kinship (arma::mat grm, std::map< std::string, int > ind, int nIndv, std::vector< std::string > idVec)
 Constructor.
 
+arma::mat & getGrm ()
 Returns the generated or parsed Genetic Relationship Matrix (GRM).
 
std::vector< std::string > & getIdVec ()
 Returns the generated or parsed individual id vector. More...
 
+ + + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from Kinship
+arma::mat m_grm
 
+uint32_t m_nIndv
 
+std::vector< std::string > idVec
 
+

Detailed Description

+

A class to generate a kinship matrix from SNP data.

+

Member Function Documentation

+ +

◆ construct()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void SnpKinship::construct (Optionoption,
arma::mat & ped,
std::vector< int > & chr,
arma::mat & newGeno 
)
+
+ +

Constructor.

+

Also generates GRM inline.

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/html/class_snp_kinship.js b/docs/html/class_snp_kinship.js new file mode 100644 index 0000000..a852ca1 --- /dev/null +++ b/docs/html/class_snp_kinship.js @@ -0,0 +1,5 @@ +var class_snp_kinship = +[ + [ "construct", "class_snp_kinship.html#a8317540d3eaac3cc2d21f2db47306649", null ], + [ "getAN", "class_snp_kinship.html#aed018b6a8b40696d6124edef49732b58", null ] +]; \ No newline at end of file diff --git a/docs/html/class_snp_kinship__coll__graph.map b/docs/html/class_snp_kinship__coll__graph.map new file mode 100644 index 0000000..fe745c5 --- /dev/null +++ b/docs/html/class_snp_kinship__coll__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/class_snp_kinship__coll__graph.md5 b/docs/html/class_snp_kinship__coll__graph.md5 new file mode 100644 index 0000000..d45e872 --- /dev/null +++ b/docs/html/class_snp_kinship__coll__graph.md5 @@ -0,0 +1 @@ +2f95f5fb52f28475c12c58250a862b89 \ No newline at end of file diff --git a/docs/html/class_snp_kinship__coll__graph.png b/docs/html/class_snp_kinship__coll__graph.png new file mode 100644 index 0000000..d08d3fa Binary files /dev/null and b/docs/html/class_snp_kinship__coll__graph.png differ diff --git a/docs/html/class_snp_kinship__inherit__graph.map b/docs/html/class_snp_kinship__inherit__graph.map new file mode 100644 index 0000000..fe745c5 --- /dev/null +++ b/docs/html/class_snp_kinship__inherit__graph.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/class_snp_kinship__inherit__graph.md5 b/docs/html/class_snp_kinship__inherit__graph.md5 new file mode 100644 index 0000000..b1877c1 --- /dev/null +++ b/docs/html/class_snp_kinship__inherit__graph.md5 @@ -0,0 +1 @@ +79a6239e1298f95fd351039166dc0517 \ No newline at end of file diff --git a/docs/html/class_snp_kinship__inherit__graph.png b/docs/html/class_snp_kinship__inherit__graph.png new file mode 100644 index 0000000..d08d3fa Binary files /dev/null and b/docs/html/class_snp_kinship__inherit__graph.png differ diff --git a/docs/html/class_util-members.html b/docs/html/class_util-members.html new file mode 100644 index 0000000..0188da9 --- /dev/null +++ b/docs/html/class_util-members.html @@ -0,0 +1,105 @@ + + + + + + + +HCA: Member List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Util Member List
+
+
+ +

This is the complete list of members for Util, including all inherited members.

+ + + + + + +
invertMatrix(arma::mat &m, std::string name, bool alreadyAdded=false)Utilstatic
invertMatrixSympd(arma::mat &m, std::string name, bool alreadyAdded=false)Utilstatic
parseToDouble(std::string data)Utilstatic
parseToInt(std::string data)Utilstatic
splitByDelimeter(std::string data, std::string delim)Utilstatic
+
+ + + + diff --git a/docs/html/class_util.html b/docs/html/class_util.html new file mode 100644 index 0000000..fbe867a --- /dev/null +++ b/docs/html/class_util.html @@ -0,0 +1,134 @@ + + + + + + + +HCA: Util Class Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Util Class Reference
+
+
+
+Collaboration diagram for Util:
+
+
Collaboration graph
+
+ + + + + + + + + + + + + + + + + +

+Static Public Member Functions

+static std::vector< std::string > splitByDelimeter (std::string data, std::string delim)
 Splits a string by delimiter, and returns a vector swith the result.
 
+static double parseToDouble (std::string data)
 Parses a string to a double, raising an error if the data is invalid.
 
+static int parseToInt (std::string data)
 Parses a string to an integer, raising an error if the data is invalid.
 
+static arma::mat invertMatrix (arma::mat &m, std::string name, bool alreadyAdded=false)
 Inverts the matrix via arma::inv, adding values to diagonals should inversion fail. If values are added to diagonals, outputs a warning with the "name" variable.
 
+static arma::mat invertMatrixSympd (arma::mat &m, std::string name, bool alreadyAdded=false)
 Inverts the matrix via arma::inv_sympd, adding values to diagonals should inversion fail. If values are added to diagonals, outputs a warning with the "name" variable.
 
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/docs/html/class_util__coll__graph.map b/docs/html/class_util__coll__graph.map new file mode 100644 index 0000000..19415a9 --- /dev/null +++ b/docs/html/class_util__coll__graph.map @@ -0,0 +1,2 @@ + + diff --git a/docs/html/class_util__coll__graph.md5 b/docs/html/class_util__coll__graph.md5 new file mode 100644 index 0000000..c5daf41 --- /dev/null +++ b/docs/html/class_util__coll__graph.md5 @@ -0,0 +1 @@ +f2fd165933f58b02852619851e1e87a9 \ No newline at end of file diff --git a/docs/html/class_util__coll__graph.png b/docs/html/class_util__coll__graph.png new file mode 100644 index 0000000..3d4c4bd Binary files /dev/null and b/docs/html/class_util__coll__graph.png differ diff --git a/docs/html/classes.html b/docs/html/classes.html new file mode 100644 index 0000000..3dcfdf2 --- /dev/null +++ b/docs/html/classes.html @@ -0,0 +1,120 @@ + + + + + + + +HCA: Class Index + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Class Index
+
+
+
d | g | h | i | k | o | r | s | u
+ + + + + + + + + + + +
  d  
+
Hca   
  o  
+
  s  
+
  i  
+
Data   Option   Scorer   
  g  
+
IndividualData   
  r  
+
SnpKinship   
IndividualDataSet   
  u  
+
GivenKinship   
  k  
+
RemlH2rEst   
  h  
+
RemlHca   Util   
Kinship   
H2rEst   
+
d | g | h | i | k | o | r | s | u
+
+
+ + + + diff --git a/docs/html/closed.png b/docs/html/closed.png new file mode 100644 index 0000000..98cc2c9 Binary files /dev/null and b/docs/html/closed.png differ diff --git a/docs/html/dir_5a38eadd9c55c6fb727a5803bb09c43f.html b/docs/html/dir_5a38eadd9c55c6fb727a5803bb09c43f.html new file mode 100644 index 0000000..27a20ae --- /dev/null +++ b/docs/html/dir_5a38eadd9c55c6fb727a5803bb09c43f.html @@ -0,0 +1,102 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev Directory Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
hca-dev Directory Reference
+
+
+ + +

+Directories

+
+
+ + + + diff --git a/docs/html/dir_5a38eadd9c55c6fb727a5803bb09c43f.js b/docs/html/dir_5a38eadd9c55c6fb727a5803bb09c43f.js new file mode 100644 index 0000000..8df9809 --- /dev/null +++ b/docs/html/dir_5a38eadd9c55c6fb727a5803bb09c43f.js @@ -0,0 +1,4 @@ +var dir_5a38eadd9c55c6fb727a5803bb09c43f = +[ + [ "src", "dir_95cb54157f2bc20483fe55d9ab58fd27.html", "dir_95cb54157f2bc20483fe55d9ab58fd27" ] +]; \ No newline at end of file diff --git a/docs/html/dir_60a4da173fca05b90d61823adfb03c66.html b/docs/html/dir_60a4da173fca05b90d61823adfb03c66.html new file mode 100644 index 0000000..62d9d5e --- /dev/null +++ b/docs/html/dir_60a4da173fca05b90d61823adfb03c66.html @@ -0,0 +1,98 @@ + + + + + + + +HCA: /Users/danielruskin Directory Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
danielruskin Directory Reference
+
+
+
+
+ + + + diff --git a/docs/html/dir_60a4da173fca05b90d61823adfb03c66.js b/docs/html/dir_60a4da173fca05b90d61823adfb03c66.js new file mode 100644 index 0000000..5c00015 --- /dev/null +++ b/docs/html/dir_60a4da173fca05b90d61823adfb03c66.js @@ -0,0 +1,4 @@ +var dir_60a4da173fca05b90d61823adfb03c66 = +[ + [ "src", "dir_df4e26f2ffd11e56f607d6303fce6b11.html", "dir_df4e26f2ffd11e56f607d6303fce6b11" ] +]; \ No newline at end of file diff --git a/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html new file mode 100644 index 0000000..8c9b54d --- /dev/null +++ b/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -0,0 +1,98 @@ + + + + + + + +HCA: /Users/danielruskin/src Directory Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
src Directory Reference
+
+
+
+
+ + + + diff --git a/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.js b/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.js new file mode 100644 index 0000000..4053b0e --- /dev/null +++ b/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.js @@ -0,0 +1,4 @@ +var dir_68267d1309a1af8e8297ef4c3efbcdba = +[ + [ "hca-dev", "dir_5a38eadd9c55c6fb727a5803bb09c43f.html", "dir_5a38eadd9c55c6fb727a5803bb09c43f" ] +]; \ No newline at end of file diff --git a/docs/html/dir_8a990246551b69b640aea526aed19dbb.html b/docs/html/dir_8a990246551b69b640aea526aed19dbb.html new file mode 100644 index 0000000..66037db --- /dev/null +++ b/docs/html/dir_8a990246551b69b640aea526aed19dbb.html @@ -0,0 +1,98 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src Directory Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
src Directory Reference
+
+
+
+
+ + + + diff --git a/docs/html/dir_8a990246551b69b640aea526aed19dbb.js b/docs/html/dir_8a990246551b69b640aea526aed19dbb.js new file mode 100644 index 0000000..709e697 --- /dev/null +++ b/docs/html/dir_8a990246551b69b640aea526aed19dbb.js @@ -0,0 +1,16 @@ +var dir_8a990246551b69b640aea526aed19dbb = +[ + [ "Data.h", "_data_8h_source.html", null ], + [ "GivenKinship.h", "_given_kinship_8h_source.html", null ], + [ "H2rEst.h", "_h2r_est_8h_source.html", null ], + [ "Hca.h", "_hca_8h_source.html", null ], + [ "IndividualData.h", "_individual_data_8h_source.html", null ], + [ "IndividualDataSet.h", "_individual_data_set_8h_source.html", null ], + [ "Kinship.h", "_kinship_8h_source.html", null ], + [ "Option.h", "_option_8h_source.html", null ], + [ "RemlH2rEst.h", "_reml_h2r_est_8h_source.html", null ], + [ "RemlHca.h", "_reml_hca_8h_source.html", null ], + [ "Scorer.h", "_scorer_8h_source.html", null ], + [ "SnpKinship.h", "_snp_kinship_8h_source.html", null ], + [ "util.h", "util_8h_source.html", null ] +]; \ No newline at end of file diff --git a/docs/html/dir_95cb54157f2bc20483fe55d9ab58fd27.html b/docs/html/dir_95cb54157f2bc20483fe55d9ab58fd27.html new file mode 100644 index 0000000..3d4e942 --- /dev/null +++ b/docs/html/dir_95cb54157f2bc20483fe55d9ab58fd27.html @@ -0,0 +1,98 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src Directory Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
src Directory Reference
+
+
+
+
+ + + + diff --git a/docs/html/dir_95cb54157f2bc20483fe55d9ab58fd27.js b/docs/html/dir_95cb54157f2bc20483fe55d9ab58fd27.js new file mode 100644 index 0000000..d9095d3 --- /dev/null +++ b/docs/html/dir_95cb54157f2bc20483fe55d9ab58fd27.js @@ -0,0 +1,16 @@ +var dir_95cb54157f2bc20483fe55d9ab58fd27 = +[ + [ "Data.h", "_data_8h_source.html", null ], + [ "GivenKinship.h", "_given_kinship_8h_source.html", null ], + [ "H2rEst.h", "_h2r_est_8h_source.html", null ], + [ "Hca.h", "_hca_8h_source.html", null ], + [ "IndividualData.h", "_individual_data_8h_source.html", null ], + [ "IndividualDataSet.h", "_individual_data_set_8h_source.html", null ], + [ "Kinship.h", "_kinship_8h_source.html", null ], + [ "Option.h", "_option_8h_source.html", null ], + [ "RemlH2rEst.h", "_reml_h2r_est_8h_source.html", null ], + [ "RemlHca.h", "_reml_hca_8h_source.html", null ], + [ "Scorer.h", "_scorer_8h_source.html", null ], + [ "SnpKinship.h", "_snp_kinship_8h_source.html", null ], + [ "Util.h", "_util_8h_source.html", null ] +]; \ No newline at end of file diff --git a/docs/html/dir_b41b214f44b1d1e2573f3fffd563b69b.html b/docs/html/dir_b41b214f44b1d1e2573f3fffd563b69b.html new file mode 100644 index 0000000..6886d8b --- /dev/null +++ b/docs/html/dir_b41b214f44b1d1e2573f3fffd563b69b.html @@ -0,0 +1,102 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev Directory Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
hca-dev Directory Reference
+
+
+ + +

+Directories

+
+
+ + + + diff --git a/docs/html/dir_b41b214f44b1d1e2573f3fffd563b69b.js b/docs/html/dir_b41b214f44b1d1e2573f3fffd563b69b.js new file mode 100644 index 0000000..4c8794b --- /dev/null +++ b/docs/html/dir_b41b214f44b1d1e2573f3fffd563b69b.js @@ -0,0 +1,4 @@ +var dir_b41b214f44b1d1e2573f3fffd563b69b = +[ + [ "src", "dir_8a990246551b69b640aea526aed19dbb.html", "dir_8a990246551b69b640aea526aed19dbb" ] +]; \ No newline at end of file diff --git a/docs/html/dir_d522931ffa1371640980b621734a4381.html b/docs/html/dir_d522931ffa1371640980b621734a4381.html new file mode 100644 index 0000000..dca9623 --- /dev/null +++ b/docs/html/dir_d522931ffa1371640980b621734a4381.html @@ -0,0 +1,98 @@ + + + + + + + +HCA: /Users Directory Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Users Directory Reference
+
+
+
+
+ + + + diff --git a/docs/html/dir_d522931ffa1371640980b621734a4381.js b/docs/html/dir_d522931ffa1371640980b621734a4381.js new file mode 100644 index 0000000..8369ae0 --- /dev/null +++ b/docs/html/dir_d522931ffa1371640980b621734a4381.js @@ -0,0 +1,4 @@ +var dir_d522931ffa1371640980b621734a4381 = +[ + [ "danielruskin", "dir_60a4da173fca05b90d61823adfb03c66.html", "dir_60a4da173fca05b90d61823adfb03c66" ] +]; \ No newline at end of file diff --git a/docs/html/dir_df4e26f2ffd11e56f607d6303fce6b11.html b/docs/html/dir_df4e26f2ffd11e56f607d6303fce6b11.html new file mode 100644 index 0000000..67f8103 --- /dev/null +++ b/docs/html/dir_df4e26f2ffd11e56f607d6303fce6b11.html @@ -0,0 +1,98 @@ + + + + + + + +HCA: /Users/danielruskin/src Directory Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
src Directory Reference
+
+
+
+
+ + + + diff --git a/docs/html/dir_df4e26f2ffd11e56f607d6303fce6b11.js b/docs/html/dir_df4e26f2ffd11e56f607d6303fce6b11.js new file mode 100644 index 0000000..f38414d --- /dev/null +++ b/docs/html/dir_df4e26f2ffd11e56f607d6303fce6b11.js @@ -0,0 +1,4 @@ +var dir_df4e26f2ffd11e56f607d6303fce6b11 = +[ + [ "hca-dev", "dir_b41b214f44b1d1e2573f3fffd563b69b.html", "dir_b41b214f44b1d1e2573f3fffd563b69b" ] +]; \ No newline at end of file diff --git a/docs/html/doc.png b/docs/html/doc.png new file mode 100644 index 0000000..17edabf Binary files /dev/null and b/docs/html/doc.png differ diff --git a/docs/html/doxygen.css b/docs/html/doxygen.css new file mode 100644 index 0000000..4f1ab91 --- /dev/null +++ b/docs/html/doxygen.css @@ -0,0 +1,1596 @@ +/* The standard CSS for doxygen 1.8.13 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +p.reference, p.definition { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.ah, span.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: url('nav_f.png'); + background-repeat: repeat-x; + background-color: #E2E8F2; + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-color: #DFE5F1; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + +} + +.overload { + font-family: "courier new",courier,monospace; + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #9CAFD4; + border-bottom: 1px solid #9CAFD4; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +.arrow { + color: #9CAFD4; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #728DC1; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + margin-left: 0px; + padding-left: 0px; +} + +dl.note +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00D000; +} + +dl.deprecated +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #505050; +} + +dl.todo +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00C0E0; +} + +dl.test +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #3030E0; +} + +dl.bug +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + +/* @group Markdown */ + +/* +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.markdownTableHead tr { +} + +table.markdownTableBodyLeft td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +th.markdownTableHeadLeft th.markdownTableHeadRight th.markdownTableHeadCenter th.markdownTableHeadNone { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft { + text-align: left +} + +th.markdownTableHeadRight { + text-align: right +} + +th.markdownTableHeadCenter { + text-align: center +} +*/ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + + +/* @end */ diff --git a/docs/html/doxygen.png b/docs/html/doxygen.png new file mode 100644 index 0000000..3ff17d8 Binary files /dev/null and b/docs/html/doxygen.png differ diff --git a/docs/html/dynsections.js b/docs/html/dynsections.js new file mode 100644 index 0000000..85e1836 --- /dev/null +++ b/docs/html/dynsections.js @@ -0,0 +1,97 @@ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} + +function toggleLevel(level) +{ + $('table.directory tr').each(function() { + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l + + + + + + +HCA: File List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
File List
+
+
+
Here is a list of all documented files with brief descriptions:
+
[detail level 1234]
+ + + + + + + + + + + + + + + + +
  src
  hca-dev
  src
 Data.h
 GivenKinship.h
 H2rEst.h
 Hca.h
 IndividualData.h
 IndividualDataSet.h
 Kinship.h
 Option.h
 RemlH2rEst.h
 RemlHca.h
 Scorer.h
 SnpKinship.h
 Util.h
+
+
+
+ + + + diff --git a/docs/html/files.js b/docs/html/files.js new file mode 100644 index 0000000..04b0a8e --- /dev/null +++ b/docs/html/files.js @@ -0,0 +1,4 @@ +var files = +[ + [ "src", "dir_68267d1309a1af8e8297ef4c3efbcdba.html", "dir_68267d1309a1af8e8297ef4c3efbcdba" ] +]; \ No newline at end of file diff --git a/docs/html/folderclosed.png b/docs/html/folderclosed.png new file mode 100644 index 0000000..bb8ab35 Binary files /dev/null and b/docs/html/folderclosed.png differ diff --git a/docs/html/folderopen.png b/docs/html/folderopen.png new file mode 100644 index 0000000..d6c7f67 Binary files /dev/null and b/docs/html/folderopen.png differ diff --git a/docs/html/functions.html b/docs/html/functions.html new file mode 100644 index 0000000..ffa43df --- /dev/null +++ b/docs/html/functions.html @@ -0,0 +1,405 @@ + + + + + + + +HCA: Class Members + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- a -

+ + +

- c -

+ + +

- d -

    +
  • Data() +: Data +
  • +
+ + +

- g -

+ + +

- i -

    +
  • invertMatrix() +: Util +
  • +
  • invertMatrixSympd() +: Util +
  • +
+ + +

- k -

+ + +

- l -

    +
  • load() +: Data +
  • +
+ + +

- o -

    +
  • objectiveFunction() +: RemlHca +
  • +
+ + +

- p -

    +
  • parse() +: Option +
  • +
  • parseToDouble() +: Util +
  • +
  • parseToInt() +: Util +
  • +
+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- w -

    +
  • writeKinship() +: Data +
  • +
+
+
+ + + + diff --git a/docs/html/functions_func.html b/docs/html/functions_func.html new file mode 100644 index 0000000..0e6e9d3 --- /dev/null +++ b/docs/html/functions_func.html @@ -0,0 +1,405 @@ + + + + + + + +HCA: Class Members - Functions + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- a -

+ + +

- c -

+ + +

- d -

    +
  • Data() +: Data +
  • +
+ + +

- g -

+ + +

- i -

    +
  • invertMatrix() +: Util +
  • +
  • invertMatrixSympd() +: Util +
  • +
+ + +

- k -

+ + +

- l -

    +
  • load() +: Data +
  • +
+ + +

- o -

    +
  • objectiveFunction() +: RemlHca +
  • +
+ + +

- p -

    +
  • parse() +: Option +
  • +
  • parseToDouble() +: Util +
  • +
  • parseToInt() +: Util +
  • +
+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- w -

    +
  • writeKinship() +: Data +
  • +
+
+
+ + + + diff --git a/docs/html/functions_vars.html b/docs/html/functions_vars.html new file mode 100644 index 0000000..09c674f --- /dev/null +++ b/docs/html/functions_vars.html @@ -0,0 +1,116 @@ + + + + + + + +HCA: Class Members - Variables + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
+ + + + diff --git a/docs/html/globals.html b/docs/html/globals.html new file mode 100644 index 0000000..b176eef --- /dev/null +++ b/docs/html/globals.html @@ -0,0 +1,98 @@ + + + + + + + +HCA: File Members + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all file members with links to the files they belong to:
+
+
+ + + + diff --git a/docs/html/globals_func.html b/docs/html/globals_func.html new file mode 100644 index 0000000..1946200 --- /dev/null +++ b/docs/html/globals_func.html @@ -0,0 +1,98 @@ + + + + + + + +HCA: File Members + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
+ + + + diff --git a/docs/html/graph_legend.html b/docs/html/graph_legend.html new file mode 100644 index 0000000..314a717 --- /dev/null +++ b/docs/html/graph_legend.html @@ -0,0 +1,126 @@ + + + + + + + +HCA: Graph Legend + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Graph Legend
+
+
+

This page explains how to interpret the graphs that are generated by doxygen.

+

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };
/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };
/* Class not documented with doxygen comments */
class Undocumented { };
/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };
/*! A template class */
template<class T> class Templ { };
/*! Class that is inherited using protected inheritance */
class ProtectedBase { };
/*! Class that is inherited using private inheritance */
class PrivateBase { };
/*! Class that is used by the Inherited class */
class Used { };
/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
protected ProtectedBase,
private PrivateBase,
public Undocumented,
public Templ<int>
{
private:
Used *m_usedClass;
};

This will result in the following graph:

+
+ +
+

The boxes in the above graph have the following meaning:

+
    +
  • +A filled gray box represents the struct or class for which the graph is generated.
  • +
  • +A box with a black border denotes a documented struct or class.
  • +
  • +A box with a gray border denotes an undocumented struct or class.
  • +
  • +A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • +
+

The arrows have the following meaning:

+
    +
  • +A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • +
  • +A dark green arrow is used for protected inheritance.
  • +
  • +A dark red arrow is used for private inheritance.
  • +
  • +A purple dashed arrow is used if a class is contained or used by another class. The arrow is labelled with the variable(s) through which the pointed class or struct is accessible.
  • +
  • +A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labelled with the template parameters of the instance.
  • +
+
+
+ + + + diff --git a/docs/html/graph_legend.md5 b/docs/html/graph_legend.md5 new file mode 100644 index 0000000..a06ed05 --- /dev/null +++ b/docs/html/graph_legend.md5 @@ -0,0 +1 @@ +387ff8eb65306fa251338d3c9bd7bfff \ No newline at end of file diff --git a/docs/html/graph_legend.png b/docs/html/graph_legend.png new file mode 100644 index 0000000..961becb Binary files /dev/null and b/docs/html/graph_legend.png differ diff --git a/docs/html/hierarchy.html b/docs/html/hierarchy.html new file mode 100644 index 0000000..ec2d562 --- /dev/null +++ b/docs/html/hierarchy.html @@ -0,0 +1,116 @@ + + + + + + + +HCA: Class Hierarchy + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Class Hierarchy
+
+
+
+

Go to the graphical class hierarchy

+This inheritance list is sorted roughly, but not completely, alphabetically:
+
[detail level 12]
+ + + + + + + + + + + + + +
 CDataA class to load all relevant data. Responsible solely for loading data - not for reconciling missing individuals
 CH2rEstA class used to perform heritability analysis
 CRemlH2rEstA class to perform heritability analysis on a given dataset
 CHcaA class used to perform heritable component analysis
 CRemlHcaA class to perform heritable component analysis on a given dataset
 CIndividualDataA class to represent data associated with a given individual
 CIndividualDataSetA class to keep track of and reconcile IndividualData objects
 CKinshipA class used to load or generate kinship data. This class must not be used directly; only subclasses should be used
 CGivenKinshipA class to load a pregiven kinship matrix
 CSnpKinshipA class to generate a kinship matrix from SNP data
 COptionA class to load all user options
 CScorerA class to score users based on their phenotypes and a generated weight
 CUtil
+
+
+
+ + + + diff --git a/docs/html/hierarchy.js b/docs/html/hierarchy.js new file mode 100644 index 0000000..5c71c9c --- /dev/null +++ b/docs/html/hierarchy.js @@ -0,0 +1,19 @@ +var hierarchy = +[ + [ "Data", "class_data.html", null ], + [ "H2rEst", "class_h2r_est.html", [ + [ "RemlH2rEst", "class_reml_h2r_est.html", null ] + ] ], + [ "Hca", "class_hca.html", [ + [ "RemlHca", "class_reml_hca.html", null ] + ] ], + [ "IndividualData", "class_individual_data.html", null ], + [ "IndividualDataSet", "class_individual_data_set.html", null ], + [ "Kinship", "class_kinship.html", [ + [ "GivenKinship", "class_given_kinship.html", null ], + [ "SnpKinship", "class_snp_kinship.html", null ] + ] ], + [ "Option", "class_option.html", null ], + [ "Scorer", "class_scorer.html", null ], + [ "Util", "class_util.html", null ] +]; \ No newline at end of file diff --git a/docs/html/index.html b/docs/html/index.html new file mode 100644 index 0000000..343f900 --- /dev/null +++ b/docs/html/index.html @@ -0,0 +1,155 @@ + + + + + + + +HCA: Heritable Component Analysis Pipeline + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Heritable Component Analysis Pipeline
+
+
+

This repository represents a pipeline that performs three primary functions:

+
    +
  1. Heritable Component Analysis
  2. +
  3. Heritability Estimation
  4. +
  5. Kinship Matrix Generation
  6. +
+

The pipeline accepts genotypic and phenotypic data, as well as covariates, and generates a highly-heritable trait. It can then estimate the heritability of that trait via the second function above. If the user already has a kinship matrix available (i.e. from GCTA), the program can accept this matrix. Alternatively, it can use genotypic data to generate the kinship matrix.

+

Usage

+

Running the program without any options will trigger the help function, which will show all options that are available. The program takes a command (kinship, h2r, hca, or score), as well as a set of options for each command.

+

Generally speaking, one can follow the below guidelines when using this program:

+
    +
  1. Obtain the following data: phenotypic data, quantitative and discrete covariates (optional), kinship file (optional), genotypic data (required if kinship data is not present). Ensure that individual IDs are present in all of these files, and are common across each file. If an individual ID is missing from one file but present in another, it will not be included in analysis.
  2. +
  3. Determine the parameters for your analysis. These are specified in the “heritable component analysis” help section. There are a few options that you must consider: “numSplits” and “lambdaVecFile”. “numSplits” controls the cross-validation functionality; if this is set to 1 (default), cross-validation will not be performed. If this is set to a value of 2 or more, cross-validation will be performed (see the cross-validation section). “lambdaVecFile” must point to a file with lambda values to use during the HCA process; each line must represent one lambda value.
  4. +
  5. Determine if you would like to save output data to disk; if so, specify the “outDir” parameter (set this to “.” to save to the current directory). In addition, specify the “numThreads” option (default 2) to enable multi-thread functionality.
  6. +
  7. Run HCA with the parameters chosen, and observe the output. Analysis may take a long time depending on the size of your dataset.
  8. +
+

Additional options are present, but are not required. Review the documentation and help output for more details.

+

HCA Cross-Validation and Lambda Tuning

+

If “numSplits” is equal to one, the following process will be used for lambda tuning:

+
    +
  1. HCA will be run with each lambda value.
  2. +
  3. For each Lambda value, Heritability analysis will be run with the generated trait.
  4. +
  5. The Lambda value that generates the most heritable trait trait will be saved as a result of the analysis.
  6. +
+

If the “numSplits” option is greater than one, the dataset will be split randomly into “numSplits” splits. The following process will then occur:

+
    +
  1. The code will iterate through each lambda value.
  2. +
  3. For each lambda value, the code will iterate through each split. On each iteration, the chosen split will be used as cross-validation data; all other data will be marked as training data. HCA will be run with the training data and the current lambda value. Once HCA has been run with all splits, the average heritability score for the current lambda value will be calculated.
  4. +
  5. The lambda with the highest average heritability score will be considered the best. HCA and heritability estimation will be re-performed with this lambda value, on the full data set. This will be considered the final result set.
  6. +
+

Outputs

+

In addition to outputting data to the CLI, if an outDir parameter is specified, some data will also be saved. For all analysis, if a GRM was generated (non-pregiven), that GRM will be saved to "kinship.csv". The following analysis-specific data will also be saved:

+

HCA

+

When HCA is run, the final weights will be saved to "trait_hca.csv". Indiviudals will be scored with these weights, and the output from the "Scoring" section will be saved. In addition, the output from the "Heritability Analysis" section will be saved for the final weights.

+

Heritability Analysis

+

When heritability analysis is run, statistics regarding the analysis will be saved to "h2r_est.txt".

+

Scoring

+

When scoring is run, the calculated scores will be saved to "scores.txt".

+

Kinship Generation

+

When kinship generation is run, the kinship file will be saved to "kinship.txt".

+

Special Note on Heritability Estimation

+

In the event that the variance-covariance matrix is non-invertible during heritability estimation, small values will be added to the matrix diagonals. This will generally resolve the invertibility error, but may adversely affect the results. A warning will be outputted in the event that the add-to-diagonals approach is used.

+

Documentation

+

Further documentation is available in the docs folder.

+

Dependencies

+

The Linux binary should work automatically on most Linux distributions. If not, compile it for your architecture.

+

The OSX binary requires GCC version 6. Install it by running brew install gcc6 --without-multilib on your machine.

+

Compiling

+

To compile on most Linux distributions and OSX, follow these steps:

+
    +
  1. Install the Armadillo matrix library (download here and run cmake . && make && sudo make install)
  2. +
  3. Install the NLOpt optimization library (download here and run ./configure && make && sudo make install)
  4. +
  5. Install the OpenBLAS library from source. Make sure to specify DYNAMIC_ARCH=1 when running make and make install, if you plan on using the binary across multiple architectures.
  6. +
  7. If on Linux, run (i.e. sudo apt-get install liblapack-dev). If on Mac, run brew install gcc6 --without-multilib and brew install lapack.
  8. +
  9. Run make --file Makefile_osx or make --file Makefile_linux, depending on your platform.
  10. +
+

References

+

The following references were used while preparing this program:

+
Sun J, Kranzler HR, Bi J. Refining multivariate disease phenotypes for high chip heritability. BMC Medical Genomics. 2015;8(Suppl 3):S3. doi:10.1186/1755-8794-8-S3-S3.
Yang J, Lee SH, Goddard ME, Visscher PM. GCTA: A Tool for Genome-wide Complex Trait Analysis. American Journal of Human Genetics. 2011;88(1):76-82. doi:10.1016/j.ajhg.2010.11.011.
Yang J, Benyamin B, McEvoy BP, et al. Common SNPs explain a large proportion of heritability for human height. Nature genetics. 2010;42(7):565-569. doi:10.1038/ng.608.
+
+ + + + diff --git a/docs/html/inherit_graph_0.map b/docs/html/inherit_graph_0.map new file mode 100644 index 0000000..4ec1617 --- /dev/null +++ b/docs/html/inherit_graph_0.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/inherit_graph_0.md5 b/docs/html/inherit_graph_0.md5 new file mode 100644 index 0000000..eeaa2fb --- /dev/null +++ b/docs/html/inherit_graph_0.md5 @@ -0,0 +1 @@ +be93114714ba50836f8cb458dd526b9c \ No newline at end of file diff --git a/docs/html/inherit_graph_0.png b/docs/html/inherit_graph_0.png new file mode 100644 index 0000000..389d1a5 Binary files /dev/null and b/docs/html/inherit_graph_0.png differ diff --git a/docs/html/inherit_graph_1.map b/docs/html/inherit_graph_1.map new file mode 100644 index 0000000..edfbb48 --- /dev/null +++ b/docs/html/inherit_graph_1.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/html/inherit_graph_1.md5 b/docs/html/inherit_graph_1.md5 new file mode 100644 index 0000000..7411c22 --- /dev/null +++ b/docs/html/inherit_graph_1.md5 @@ -0,0 +1 @@ +5edee1f3edeb2854741f7703ea6e4ac4 \ No newline at end of file diff --git a/docs/html/inherit_graph_1.png b/docs/html/inherit_graph_1.png new file mode 100644 index 0000000..af06dbb Binary files /dev/null and b/docs/html/inherit_graph_1.png differ diff --git a/docs/html/inherit_graph_2.map b/docs/html/inherit_graph_2.map new file mode 100644 index 0000000..7abb7b5 --- /dev/null +++ b/docs/html/inherit_graph_2.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/html/inherit_graph_2.md5 b/docs/html/inherit_graph_2.md5 new file mode 100644 index 0000000..c5717e6 --- /dev/null +++ b/docs/html/inherit_graph_2.md5 @@ -0,0 +1 @@ +3b99b712cb6795bc95012cb8e95316f6 \ No newline at end of file diff --git a/docs/html/inherit_graph_2.png b/docs/html/inherit_graph_2.png new file mode 100644 index 0000000..e94fe59 Binary files /dev/null and b/docs/html/inherit_graph_2.png differ diff --git a/docs/html/inherit_graph_3.map b/docs/html/inherit_graph_3.map new file mode 100644 index 0000000..332e627 --- /dev/null +++ b/docs/html/inherit_graph_3.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/inherit_graph_3.md5 b/docs/html/inherit_graph_3.md5 new file mode 100644 index 0000000..f7b6e09 --- /dev/null +++ b/docs/html/inherit_graph_3.md5 @@ -0,0 +1 @@ +3895cc40c7d113606add205f81ae4132 \ No newline at end of file diff --git a/docs/html/inherit_graph_3.png b/docs/html/inherit_graph_3.png new file mode 100644 index 0000000..1161168 Binary files /dev/null and b/docs/html/inherit_graph_3.png differ diff --git a/docs/html/inherit_graph_4.map b/docs/html/inherit_graph_4.map new file mode 100644 index 0000000..5aa5ee8 --- /dev/null +++ b/docs/html/inherit_graph_4.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/inherit_graph_4.md5 b/docs/html/inherit_graph_4.md5 new file mode 100644 index 0000000..b25537e --- /dev/null +++ b/docs/html/inherit_graph_4.md5 @@ -0,0 +1 @@ +465120da869fcdb363f299aef8a5cb74 \ No newline at end of file diff --git a/docs/html/inherit_graph_4.png b/docs/html/inherit_graph_4.png new file mode 100644 index 0000000..ba7408b Binary files /dev/null and b/docs/html/inherit_graph_4.png differ diff --git a/docs/html/inherit_graph_5.map b/docs/html/inherit_graph_5.map new file mode 100644 index 0000000..51a6e77 --- /dev/null +++ b/docs/html/inherit_graph_5.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/html/inherit_graph_5.md5 b/docs/html/inherit_graph_5.md5 new file mode 100644 index 0000000..a3bdfc0 --- /dev/null +++ b/docs/html/inherit_graph_5.md5 @@ -0,0 +1 @@ +12c10b3fe03f6c93869ee6cb9b77e8f0 \ No newline at end of file diff --git a/docs/html/inherit_graph_5.png b/docs/html/inherit_graph_5.png new file mode 100644 index 0000000..0e7d521 Binary files /dev/null and b/docs/html/inherit_graph_5.png differ diff --git a/docs/html/inherit_graph_6.map b/docs/html/inherit_graph_6.map new file mode 100644 index 0000000..ed71bbc --- /dev/null +++ b/docs/html/inherit_graph_6.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/inherit_graph_6.md5 b/docs/html/inherit_graph_6.md5 new file mode 100644 index 0000000..71565e4 --- /dev/null +++ b/docs/html/inherit_graph_6.md5 @@ -0,0 +1 @@ +864eabf910c199ad9ffba784423d81d9 \ No newline at end of file diff --git a/docs/html/inherit_graph_6.png b/docs/html/inherit_graph_6.png new file mode 100644 index 0000000..260a8dc Binary files /dev/null and b/docs/html/inherit_graph_6.png differ diff --git a/docs/html/inherit_graph_7.map b/docs/html/inherit_graph_7.map new file mode 100644 index 0000000..da3c614 --- /dev/null +++ b/docs/html/inherit_graph_7.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/inherit_graph_7.md5 b/docs/html/inherit_graph_7.md5 new file mode 100644 index 0000000..d223e3b --- /dev/null +++ b/docs/html/inherit_graph_7.md5 @@ -0,0 +1 @@ +f97a1339ff3cacabb775ac7166adbd24 \ No newline at end of file diff --git a/docs/html/inherit_graph_7.png b/docs/html/inherit_graph_7.png new file mode 100644 index 0000000..c0588e1 Binary files /dev/null and b/docs/html/inherit_graph_7.png differ diff --git a/docs/html/inherit_graph_8.map b/docs/html/inherit_graph_8.map new file mode 100644 index 0000000..796adff --- /dev/null +++ b/docs/html/inherit_graph_8.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/inherit_graph_8.md5 b/docs/html/inherit_graph_8.md5 new file mode 100644 index 0000000..e820ef7 --- /dev/null +++ b/docs/html/inherit_graph_8.md5 @@ -0,0 +1 @@ +dc6e4346aad89201737e7898b7774ea5 \ No newline at end of file diff --git a/docs/html/inherit_graph_8.png b/docs/html/inherit_graph_8.png new file mode 100644 index 0000000..dd5c0e5 Binary files /dev/null and b/docs/html/inherit_graph_8.png differ diff --git a/docs/html/inherits.html b/docs/html/inherits.html new file mode 100644 index 0000000..b702d0c --- /dev/null +++ b/docs/html/inherits.html @@ -0,0 +1,150 @@ + + + + + + + +HCA: Class Hierarchy + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Class Hierarchy
+
+
+ + + + + + + + + + +
+ + + +
+ + + + +
+ + + + +
+ + + +
+ + + +
+ + + + + +
+ + + +
+ + + +
+ + + +
+
+
+ + + + diff --git a/docs/html/jquery.js b/docs/html/jquery.js new file mode 100644 index 0000000..f5343ed --- /dev/null +++ b/docs/html/jquery.js @@ -0,0 +1,87 @@ +/*! + * jQuery JavaScript Library v1.7.1 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Nov 21 21:11:03 2011 -0500 + */ +(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
t
";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},ac=a(av);ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
","
"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length;if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b})}})(window);/*! + * jQuery UI 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/*! + * jQuery UI Widget 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Widget + */ +(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/*! + * jQuery UI Mouse 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Mouse + * + * Depends: + * jquery.ui.widget.js + */ +(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('
').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g
');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(hl.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*! + * jQuery hashchange event - v1.3 - 7/21/2010 + * http://benalman.com/projects/jquery-hashchange-plugin/ + * + * Copyright (c) 2010 "Cowboy" Ben Alman + * Dual licensed under the MIT and GPL licenses. + * http://benalman.com/about/license/ + */ +(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$(' + + +
+ +
+
main.cpp File Reference
+
+
+
#include "Option.h"
+#include "Data.h"
+#include "RemlH2rEst.h"
+#include "RemlHca.h"
+#include <cblas.h>
+
+Include dependency graph for main.cpp:
+
+
+ + + + + + + + + + + + + +
+
+ + + + +

+Functions

int main (int argc, char **argv)
 Main method. Runs all analysis. More...
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + + + + + + + + + + + +
int main (int argc,
char ** argv 
)
+
+ +

Main method. Runs all analysis.

+ +
+
+ + + + + + diff --git a/docs/html/main_8cpp.js b/docs/html/main_8cpp.js new file mode 100644 index 0000000..89e321a --- /dev/null +++ b/docs/html/main_8cpp.js @@ -0,0 +1,4 @@ +var main_8cpp = +[ + [ "main", "main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627", null ] +]; \ No newline at end of file diff --git a/docs/html/main_8cpp__incl.map b/docs/html/main_8cpp__incl.map new file mode 100644 index 0000000..3e4e884 --- /dev/null +++ b/docs/html/main_8cpp__incl.map @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/docs/html/main_8cpp__incl.md5 b/docs/html/main_8cpp__incl.md5 new file mode 100644 index 0000000..f5e00b2 --- /dev/null +++ b/docs/html/main_8cpp__incl.md5 @@ -0,0 +1 @@ +d074496a104bcb33b4d2ccf8f60b1369 \ No newline at end of file diff --git a/docs/html/main_8cpp__incl.png b/docs/html/main_8cpp__incl.png new file mode 100644 index 0000000..a8da070 Binary files /dev/null and b/docs/html/main_8cpp__incl.png differ diff --git a/docs/html/md___users_danielruskin_src_hca-dev__r_e_a_d_m_e.html b/docs/html/md___users_danielruskin_src_hca-dev__r_e_a_d_m_e.html new file mode 100644 index 0000000..79edf58 --- /dev/null +++ b/docs/html/md___users_danielruskin_src_hca-dev__r_e_a_d_m_e.html @@ -0,0 +1,155 @@ + + + + + + + +HCA: Heritable Component Analysis Pipeline + + + + + + + + + + + + + + +
+
+ + + + + + +
+
HCA +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Heritable Component Analysis Pipeline
+
+
+

This repository represents a pipeline that performs three primary functions:

+
    +
  1. Heritable Component Analysis
  2. +
  3. Heritability Estimation
  4. +
  5. Kinship Matrix Generation
  6. +
+

The pipeline accepts genotypic and phenotypic data, as well as covariates, and generates a highly-heritable trait. It can then estimate the heritability of that trait via the second function above. If the user already has a kinship matrix available (i.e. from GCTA), the program can accept this matrix. Alternatively, it can use genotypic data to generate the kinship matrix.

+

Usage

+

Running the program without any options will trigger the help function, which will show all options that are available. The program takes a command (kinship, h2r, hca, or score), as well as a set of options for each command.

+

Generally speaking, one can follow the below guidelines when using this program:

+
    +
  1. Obtain the following data: phenotypic data, quantitative and discrete covariates (optional), kinship file (optional), genotypic data (required if kinship data is not present). Ensure that individual IDs are present in all of these files, and are common across each file. If an individual ID is missing from one file but present in another, it will not be included in analysis.
  2. +
  3. Determine the parameters for your analysis. These are specified in the “heritable component analysis” help section. There are a few options that you must consider: “numSplits” and “lambdaVecFile”. “numSplits” controls the cross-validation functionality; if this is set to 1 (default), cross-validation will not be performed. If this is set to a value of 2 or more, cross-validation will be performed (see the cross-validation section). “lambdaVecFile” must point to a file with lambda values to use during the HCA process; each line must represent one lambda value.
  4. +
  5. Determine if you would like to save output data to disk; if so, specify the “outDir” parameter (set this to “.” to save to the current directory). In addition, specify the “numThreads” option (default 2) to enable multi-thread functionality.
  6. +
  7. Run HCA with the parameters chosen, and observe the output. Analysis may take a long time depending on the size of your dataset.
  8. +
+

Additional options are present, but are not required. Review the documentation and help output for more details.

+

HCA Cross-Validation and Lambda Tuning

+

If “numSplits” is equal to one, the following process will be used for lambda tuning:

+
    +
  1. HCA will be run with each lambda value.
  2. +
  3. For each Lambda value, Heritability analysis will be run with the generated trait.
  4. +
  5. The Lambda value that generates the most heritable trait trait will be saved as a result of the analysis.
  6. +
+

If the “numSplits” option is greater than one, the dataset will be split randomly into “numSplits” splits. The following process will then occur:

+
    +
  1. The code will iterate through each lambda value.
  2. +
  3. For each lambda value, the code will iterate through each split. On each iteration, the chosen split will be used as cross-validation data; all other data will be marked as training data. HCA will be run with the training data and the current lambda value. Once HCA has been run with all splits, the average heritability score for the current lambda value will be calculated.
  4. +
  5. The lambda with the highest average heritability score will be considered the best. HCA and heritability estimation will be re-performed with this lambda value, on the full data set. This will be considered the final result set.
  6. +
+

Outputs

+

In addition to outputting data to the CLI, if an outDir parameter is specified, some data will also be saved. For all analysis, if a GRM was generated (non-pregiven), that GRM will be saved to "kinship.csv". The following analysis-specific data will also be saved:

+

HCA

+

When HCA is run, the final weights will be saved to "trait_hca.csv". Indiviudals will be scored with these weights, and the output from the "Scoring" section will be saved. In addition, the output from the "Heritability Analysis" section will be saved for the final weights.

+

Heritability Analysis

+

When heritability analysis is run, statistics regarding the analysis will be saved to "h2r_est.txt".

+

Scoring

+

When scoring is run, the calculated scores will be saved to "scores.txt".

+

Kinship Generation

+

When kinship generation is run, the kinship file will be saved to "kinship.txt".

+

Special Note on Heritability Estimation

+

In the event that the variance-covariance matrix is non-invertible during heritability estimation, small values will be added to the matrix diagonals. This will generally resolve the invertibility error, but may adversely affect the results. A warning will be outputted in the event that the add-to-diagonals approach is used.

+

Documentation

+

Further documentation is available in the docs folder.

+

Dependencies

+

The Linux binary should work automatically on most Linux distributions. If not, compile it for your architecture.

+

The OSX binary requires GCC version 6. Install it by running brew install gcc6 --without-multilib on your machine.

+

Compiling

+

To compile on most Linux distributions and OSX, follow these steps:

+
    +
  1. Install the Armadillo matrix library (download here and run cmake . && make && sudo make install)
  2. +
  3. Install the NLOpt optimization library (download here and run ./configure && make && sudo make install)
  4. +
  5. Install the OpenBLAS library from source. Make sure to specify DYNAMIC_ARCH=1 when running make and make install, if you plan on using the binary across multiple architectures.
  6. +
  7. If on Linux, run (i.e. sudo apt-get install liblapack-dev). If on Mac, run brew install gcc6 --without-multilib and brew install lapack.
  8. +
  9. Run make --file Makefile_osx or make --file Makefile_linux, depending on your platform.
  10. +
+

References

+

The following references were used while preparing this program:

+
Sun J, Kranzler HR, Bi J. Refining multivariate disease phenotypes for high chip heritability. BMC Medical Genomics. 2015;8(Suppl 3):S3. doi:10.1186/1755-8794-8-S3-S3.
Yang J, Lee SH, Goddard ME, Visscher PM. GCTA: A Tool for Genome-wide Complex Trait Analysis. American Journal of Human Genetics. 2011;88(1):76-82. doi:10.1016/j.ajhg.2010.11.011.
Yang J, Benyamin B, McEvoy BP, et al. Common SNPs explain a large proportion of heritability for human height. Nature genetics. 2010;42(7):565-569. doi:10.1038/ng.608.
+
+ + + + diff --git a/docs/html/menu.js b/docs/html/menu.js new file mode 100644 index 0000000..97db4c2 --- /dev/null +++ b/docs/html/menu.js @@ -0,0 +1,26 @@ +function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { + function makeTree(data,relPath) { + var result=''; + if ('children' in data) { + result+=''; + } + return result; + } + + $('#main-nav').append(makeTree(menudata,relPath)); + $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); + if (searchEnabled) { + if (serverSide) { + $('#main-menu').append('
  • '); + } else { + $('#main-menu').append('
  • '); + } + } + $('#main-menu').smartmenus(); +} diff --git a/docs/html/menudata.js b/docs/html/menudata.js new file mode 100644 index 0000000..43d7624 --- /dev/null +++ b/docs/html/menudata.js @@ -0,0 +1,37 @@ +var menudata={children:[ +{text:"Main Page",url:"index.html"}, +{text:"Classes",url:"annotated.html",children:[ +{text:"Class List",url:"annotated.html"}, +{text:"Class Index",url:"classes.html"}, +{text:"Class Hierarchy",url:"inherits.html"}, +{text:"Class Members",url:"functions.html",children:[ +{text:"All",url:"functions.html",children:[ +{text:"a",url:"functions.html#index_a"}, +{text:"c",url:"functions.html#index_c"}, +{text:"d",url:"functions.html#index_d"}, +{text:"g",url:"functions.html#index_g"}, +{text:"i",url:"functions.html#index_i"}, +{text:"k",url:"functions.html#index_k"}, +{text:"l",url:"functions.html#index_l"}, +{text:"o",url:"functions.html#index_o"}, +{text:"p",url:"functions.html#index_p"}, +{text:"r",url:"functions.html#index_r"}, +{text:"s",url:"functions.html#index_s"}, +{text:"t",url:"functions.html#index_t"}, +{text:"w",url:"functions.html#index_w"}]}, +{text:"Functions",url:"functions_func.html",children:[ +{text:"a",url:"functions_func.html#index_a"}, +{text:"c",url:"functions_func.html#index_c"}, +{text:"d",url:"functions_func.html#index_d"}, +{text:"g",url:"functions_func.html#index_g"}, +{text:"i",url:"functions_func.html#index_i"}, +{text:"k",url:"functions_func.html#index_k"}, +{text:"l",url:"functions_func.html#index_l"}, +{text:"o",url:"functions_func.html#index_o"}, +{text:"p",url:"functions_func.html#index_p"}, +{text:"r",url:"functions_func.html#index_r"}, +{text:"s",url:"functions_func.html#index_s"}, +{text:"t",url:"functions_func.html#index_t"}, +{text:"w",url:"functions_func.html#index_w"}]}]}]}, +{text:"Files",url:"files.html",children:[ +{text:"File List",url:"files.html"}]}]} diff --git a/docs/html/nav_f.png b/docs/html/nav_f.png new file mode 100644 index 0000000..72a58a5 Binary files /dev/null and b/docs/html/nav_f.png differ diff --git a/docs/html/nav_g.png b/docs/html/nav_g.png new file mode 100644 index 0000000..2093a23 Binary files /dev/null and b/docs/html/nav_g.png differ diff --git a/docs/html/nav_h.png b/docs/html/nav_h.png new file mode 100644 index 0000000..33389b1 Binary files /dev/null and b/docs/html/nav_h.png differ diff --git a/docs/html/navtree.css b/docs/html/navtree.css new file mode 100644 index 0000000..0cc7e77 --- /dev/null +++ b/docs/html/navtree.css @@ -0,0 +1,146 @@ +#nav-tree .children_ul { + margin:0; + padding:4px; +} + +#nav-tree ul { + list-style:none outside none; + margin:0px; + padding:0px; +} + +#nav-tree li { + white-space:nowrap; + margin:0px; + padding:0px; +} + +#nav-tree .plus { + margin:0px; +} + +#nav-tree .selected { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +#nav-tree img { + margin:0px; + padding:0px; + border:0px; + vertical-align: middle; +} + +#nav-tree a { + text-decoration:none; + padding:0px; + margin:0px; + outline:none; +} + +#nav-tree .label { + margin:0px; + padding:0px; + font: 12px 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +} + +#nav-tree .label a { + padding:2px; +} + +#nav-tree .selected a { + text-decoration:none; + color:#fff; +} + +#nav-tree .children_ul { + margin:0px; + padding:0px; +} + +#nav-tree .item { + margin:0px; + padding:0px; +} + +#nav-tree { + padding: 0px 0px; + background-color: #FAFAFF; + font-size:14px; + overflow:auto; +} + +#doc-content { + overflow:auto; + display:block; + padding:0px; + margin:0px; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#side-nav { + padding:0 6px 0 0; + margin: 0px; + display:block; + position: absolute; + left: 0px; + width: 250px; +} + +.ui-resizable .ui-resizable-handle { + display:block; +} + +.ui-resizable-e { + background-image:url("splitbar.png"); + background-size:100%; + background-repeat:no-repeat; + background-attachment: scroll; + cursor:ew-resize; + height:100%; + right:0; + top:0; + width:6px; +} + +.ui-resizable-handle { + display:none; + font-size:0.1px; + position:absolute; + z-index:1; +} + +#nav-tree-contents { + margin: 6px 0px 0px 0px; +} + +#nav-tree { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#nav-sync { + position:absolute; + top:5px; + right:24px; + z-index:0; +} + +#nav-sync img { + opacity:0.3; +} + +#nav-sync img:hover { + opacity:0.9; +} + +@media print +{ + #nav-tree { display: none; } + div.ui-resizable-handle { display: none; position: relative; } +} + diff --git a/docs/html/navtree.js b/docs/html/navtree.js new file mode 100644 index 0000000..e6d31b0 --- /dev/null +++ b/docs/html/navtree.js @@ -0,0 +1,517 @@ +var navTreeSubIndices = new Array(); +var arrowDown = '▼'; +var arrowRight = '►'; + +function getData(varName) +{ + var i = varName.lastIndexOf('/'); + var n = i>=0 ? varName.substring(i+1) : varName; + return eval(n.replace(/\-/g,'_')); +} + +function stripPath(uri) +{ + return uri.substring(uri.lastIndexOf('/')+1); +} + +function stripPath2(uri) +{ + var i = uri.lastIndexOf('/'); + var s = uri.substring(i+1); + var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); + return m ? uri.substring(i-6) : s; +} + +function hashValue() +{ + return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,''); +} + +function hashUrl() +{ + return '#'+hashValue(); +} + +function pathName() +{ + return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, ''); +} + +function localStorageSupported() +{ + try { + return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem; + } + catch(e) { + return false; + } +} + + +function storeLink(link) +{ + if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) { + window.localStorage.setItem('navpath',link); + } +} + +function deleteLink() +{ + if (localStorageSupported()) { + window.localStorage.setItem('navpath',''); + } +} + +function cachedLink() +{ + if (localStorageSupported()) { + return window.localStorage.getItem('navpath'); + } else { + return ''; + } +} + +function getScript(scriptName,func,show) +{ + var head = document.getElementsByTagName("head")[0]; + var script = document.createElement('script'); + script.id = scriptName; + script.type = 'text/javascript'; + script.onload = func; + script.src = scriptName+'.js'; + if ($.browser.msie && $.browser.version<=8) { + // script.onload does not work with older versions of IE + script.onreadystatechange = function() { + if (script.readyState=='complete' || script.readyState=='loaded') { + func(); if (show) showRoot(); + } + } + } + head.appendChild(script); +} + +function createIndent(o,domNode,node,level) +{ + var level=-1; + var n = node; + while (n.parentNode) { level++; n=n.parentNode; } + if (node.childrenData) { + var imgNode = document.createElement("span"); + imgNode.className = 'arrow'; + imgNode.style.paddingLeft=(16*level).toString()+'px'; + imgNode.innerHTML=arrowRight; + node.plus_img = imgNode; + node.expandToggle = document.createElement("a"); + node.expandToggle.href = "javascript:void(0)"; + node.expandToggle.onclick = function() { + if (node.expanded) { + $(node.getChildrenUL()).slideUp("fast"); + node.plus_img.innerHTML=arrowRight; + node.expanded = false; + } else { + expandNode(o, node, false, false); + } + } + node.expandToggle.appendChild(imgNode); + domNode.appendChild(node.expandToggle); + } else { + var span = document.createElement("span"); + span.className = 'arrow'; + span.style.width = 16*(level+1)+'px'; + span.innerHTML = ' '; + domNode.appendChild(span); + } +} + +var animationInProgress = false; + +function gotoAnchor(anchor,aname,updateLocation) +{ + var pos, docContent = $('#doc-content'); + var ancParent = $(anchor.parent()); + if (ancParent.hasClass('memItemLeft') || + ancParent.hasClass('fieldname') || + ancParent.hasClass('fieldtype') || + ancParent.is(':header')) + { + pos = ancParent.position().top; + } else if (anchor.position()) { + pos = anchor.position().top; + } + if (pos) { + var dist = Math.abs(Math.min( + pos-docContent.offset().top, + docContent[0].scrollHeight- + docContent.height()-docContent.scrollTop())); + animationInProgress=true; + docContent.animate({ + scrollTop: pos + docContent.scrollTop() - docContent.offset().top + },Math.max(50,Math.min(500,dist)),function(){ + if (updateLocation) window.location.href=aname; + animationInProgress=false; + }); + } +} + +function newNode(o, po, text, link, childrenData, lastNode) +{ + var node = new Object(); + node.children = Array(); + node.childrenData = childrenData; + node.depth = po.depth + 1; + node.relpath = po.relpath; + node.isLast = lastNode; + + node.li = document.createElement("li"); + po.getChildrenUL().appendChild(node.li); + node.parentNode = po; + + node.itemDiv = document.createElement("div"); + node.itemDiv.className = "item"; + + node.labelSpan = document.createElement("span"); + node.labelSpan.className = "label"; + + createIndent(o,node.itemDiv,node,0); + node.itemDiv.appendChild(node.labelSpan); + node.li.appendChild(node.itemDiv); + + var a = document.createElement("a"); + node.labelSpan.appendChild(a); + node.label = document.createTextNode(text); + node.expanded = false; + a.appendChild(node.label); + if (link) { + var url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + link = url; + } else { + url = node.relpath+link; + } + a.className = stripPath(link.replace('#',':')); + if (link.indexOf('#')!=-1) { + var aname = '#'+link.split('#')[1]; + var srcPage = stripPath(pathName()); + var targetPage = stripPath(link.split('#')[0]); + a.href = srcPage!=targetPage ? url : "javascript:void(0)"; + a.onclick = function(){ + storeLink(link); + if (!$(a).parent().parent().hasClass('selected')) + { + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + $(a).parent().parent().addClass('selected'); + $(a).parent().parent().attr('id','selected'); + } + var anchor = $(aname); + gotoAnchor(anchor,aname,true); + }; + } else { + a.href = url; + a.onclick = function() { storeLink(link); } + } + } else { + if (childrenData != null) + { + a.className = "nolink"; + a.href = "javascript:void(0)"; + a.onclick = node.expandToggle.onclick; + } + } + + node.childrenUL = null; + node.getChildrenUL = function() { + if (!node.childrenUL) { + node.childrenUL = document.createElement("ul"); + node.childrenUL.className = "children_ul"; + node.childrenUL.style.display = "none"; + node.li.appendChild(node.childrenUL); + } + return node.childrenUL; + }; + + return node; +} + +function showRoot() +{ + var headerHeight = $("#top").height(); + var footerHeight = $("#nav-path").height(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + (function (){ // retry until we can scroll to the selected item + try { + var navtree=$('#nav-tree'); + navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); + } catch (err) { + setTimeout(arguments.callee, 0); + } + })(); +} + +function expandNode(o, node, imm, showRoot) +{ + if (node.childrenData && !node.expanded) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + expandNode(o, node, imm, showRoot); + }, showRoot); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } if (imm || ($.browser.msie && $.browser.version>8)) { + // somehow slideDown jumps to the start of tree for IE9 :-( + $(node.getChildrenUL()).show(); + } else { + $(node.getChildrenUL()).slideDown("fast"); + } + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + } + } +} + +function glowEffect(n,duration) +{ + n.addClass('glow').delay(duration).queue(function(next){ + $(this).removeClass('glow');next(); + }); +} + +function highlightAnchor() +{ + var aname = hashUrl(); + var anchor = $(aname); + if (anchor.parent().attr('class')=='memItemLeft'){ + var rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); + glowEffect(rows.children(),300); // member without details + } else if (anchor.parent().attr('class')=='fieldname'){ + glowEffect(anchor.parent().parent(),1000); // enum value + } else if (anchor.parent().attr('class')=='fieldtype'){ + glowEffect(anchor.parent().parent(),1000); // struct field + } else if (anchor.parent().is(":header")) { + glowEffect(anchor.parent(),1000); // section header + } else { + glowEffect(anchor.next(),1000); // normal member + } + gotoAnchor(anchor,aname,false); +} + +function selectAndHighlight(hash,n) +{ + var a; + if (hash) { + var link=stripPath(pathName())+':'+hash.substring(1); + a=$('.item a[class$="'+link+'"]'); + } + if (a && a.length) { + a.parent().parent().addClass('selected'); + a.parent().parent().attr('id','selected'); + highlightAnchor(); + } else if (n) { + $(n.itemDiv).addClass('selected'); + $(n.itemDiv).attr('id','selected'); + } + if ($('#nav-tree-contents .item:first').hasClass('selected')) { + $('#nav-sync').css('top','30px'); + } else { + $('#nav-sync').css('top','5px'); + } + showRoot(); +} + +function showNode(o, node, index, hash) +{ + if (node && node.childrenData) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + showNode(o,node,index,hash); + },true); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).css({'display':'block'}); + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + var n = node.children[o.breadcrumbs[index]]; + if (index+11) hash = '#'+parts[1].replace(/[^\w\-]/g,''); + else hash=''; + } + if (hash.match(/^#l\d+$/)) { + var anchor=$('a[name='+hash.substring(1)+']'); + glowEffect(anchor.parent(),1000); // line number + hash=''; // strip line number anchors + } + var url=root+hash; + var i=-1; + while (NAVTREEINDEX[i+1]<=url) i++; + if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath) + } else { + getScript(relpath+'navtreeindex'+i,function(){ + navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath); + } + },true); + } +} + +function showSyncOff(n,relpath) +{ + n.html(''); +} + +function showSyncOn(n,relpath) +{ + n.html(''); +} + +function toggleSyncButton(relpath) +{ + var navSync = $('#nav-sync'); + if (navSync.hasClass('sync')) { + navSync.removeClass('sync'); + showSyncOff(navSync,relpath); + storeLink(stripPath2(pathName())+hashUrl()); + } else { + navSync.addClass('sync'); + showSyncOn(navSync,relpath); + deleteLink(); + } +} + +function initNavTree(toroot,relpath) +{ + var o = new Object(); + o.toroot = toroot; + o.node = new Object(); + o.node.li = document.getElementById("nav-tree-contents"); + o.node.childrenData = NAVTREE; + o.node.children = new Array(); + o.node.childrenUL = document.createElement("ul"); + o.node.getChildrenUL = function() { return o.node.childrenUL; }; + o.node.li.appendChild(o.node.childrenUL); + o.node.depth = 0; + o.node.relpath = relpath; + o.node.expanded = false; + o.node.isLast = true; + o.node.plus_img = document.createElement("span"); + o.node.plus_img.className = 'arrow'; + o.node.plus_img.innerHTML = arrowRight; + + if (localStorageSupported()) { + var navSync = $('#nav-sync'); + if (cachedLink()) { + showSyncOff(navSync,relpath); + navSync.removeClass('sync'); + } else { + showSyncOn(navSync,relpath); + } + navSync.click(function(){ toggleSyncButton(relpath); }); + } + + $(window).load(function(){ + navTo(o,toroot,hashUrl(),relpath); + showRoot(); + }); + + $(window).bind('hashchange', function(){ + if (window.location.hash && window.location.hash.length>1){ + var a; + if ($(location).attr('hash')){ + var clslink=stripPath(pathName())+':'+hashValue(); + a=$('.item a[class$="'+clslink.replace(/ + + + + + + +HCA: Related Pages + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    HCA +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    Related Pages
    +
    +
    +
    Here is a list of all related documentation pages:
    +
    +
    + + + + diff --git a/docs/html/resize.js b/docs/html/resize.js new file mode 100644 index 0000000..56e4a02 --- /dev/null +++ b/docs/html/resize.js @@ -0,0 +1,114 @@ +function initResizable() +{ + var cookie_namespace = 'doxygen'; + var sidenav,navtree,content,header,collapsed,collapsedWidth=0,barWidth=6,desktop_vp=768,titleHeight; + + function readCookie(cookie) + { + var myCookie = cookie_namespace+"_"+cookie+"="; + if (document.cookie) { + var index = document.cookie.indexOf(myCookie); + if (index != -1) { + var valStart = index + myCookie.length; + var valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) { + valEnd = document.cookie.length; + } + var val = document.cookie.substring(valStart, valEnd); + return val; + } + } + return 0; + } + + function writeCookie(cookie, val, expiration) + { + if (val==undefined) return; + if (expiration == null) { + var date = new Date(); + date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week + expiration = date.toGMTString(); + } + document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/"; + } + + function resizeWidth() + { + var windowWidth = $(window).width() + "px"; + var sidenavWidth = $(sidenav).outerWidth(); + content.css({marginLeft:parseInt(sidenavWidth)+"px"}); + writeCookie('width',sidenavWidth-barWidth, null); + } + + function restoreWidth(navWidth) + { + var windowWidth = $(window).width() + "px"; + content.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); + sidenav.css({width:navWidth + "px"}); + } + + function resizeHeight() + { + var headerHeight = header.outerHeight(); + var footerHeight = footer.outerHeight(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + content.css({height:windowHeight + "px"}); + navtree.css({height:windowHeight + "px"}); + sidenav.css({height:windowHeight + "px"}); + var width=$(window).width(); + if (width!=collapsedWidth) { + if (width=desktop_vp) { + if (!collapsed) { + collapseExpand(); + } + } else if (width>desktop_vp && collapsedWidth0) { + restoreWidth(0); + collapsed=true; + } + else { + var width = readCookie('width'); + if (width>200 && width<$(window).width()) { restoreWidth(width); } else { restoreWidth(200); } + collapsed=false; + } + } + + header = $("#top"); + sidenav = $("#side-nav"); + content = $("#doc-content"); + navtree = $("#nav-tree"); + footer = $("#nav-path"); + $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); + $(sidenav).resizable({ minWidth: 0 }); + $(window).resize(function() { resizeHeight(); }); + var device = navigator.userAgent.toLowerCase(); + var touch_device = device.match(/(iphone|ipod|ipad|android)/); + if (touch_device) { /* wider split bar for touch only devices */ + $(sidenav).css({ paddingRight:'20px' }); + $('.ui-resizable-e').css({ width:'20px' }); + $('#nav-sync').css({ right:'34px' }); + barWidth=20; + } + var width = readCookie('width'); + if (width) { restoreWidth(width); } else { resizeWidth(); } + resizeHeight(); + var url = location.href; + var i=url.indexOf("#"); + if (i>=0) window.location.hash=url.substr(i); + var _preventDefault = function(evt) { evt.preventDefault(); }; + $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); + $(".ui-resizable-handle").dblclick(collapseExpand); + $(window).load(resizeHeight); +} + + diff --git a/docs/html/search/all_0.html b/docs/html/search/all_0.html new file mode 100644 index 0000000..f25360b --- /dev/null +++ b/docs/html/search/all_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/all_0.js b/docs/html/search/all_0.js new file mode 100644 index 0000000..c5e0f87 --- /dev/null +++ b/docs/html/search/all_0.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['addccovdata',['addCCovData',['../class_individual_data.html#a8caf856e4f6c7d526743ff05b29c9661',1,'IndividualData::addCCovData()'],['../class_individual_data_set.html#a089c41e85d418bf14f31dd1330fea2f1',1,'IndividualDataSet::addCCovData()']]], + ['addingccovdata',['addingCCovData',['../class_individual_data_set.html#a610c3eb4f63aed39dc2c9e52e1b1b2e2',1,'IndividualDataSet']]], + ['addingchrdata',['addingChrData',['../class_individual_data_set.html#a19e0b2d2bf86850b6c0af574df29b688',1,'IndividualDataSet']]], + ['addingpeddata',['addingPedData',['../class_individual_data_set.html#a7ded1f43f59309e65612ba689480e088',1,'IndividualDataSet']]], + ['addingphendata',['addingPhenData',['../class_individual_data_set.html#ac3213f3016f5e404bda4235ed31caddf',1,'IndividualDataSet']]], + ['addingqcovdata',['addingQCovData',['../class_individual_data_set.html#aa7cfd9afb873abebe3d48a51f5388124',1,'IndividualDataSet']]], + ['addpeddata',['addPedData',['../class_individual_data.html#a4ed3b9d923743e0b5b86cfbc4314d8f2',1,'IndividualData::addPedData()'],['../class_individual_data_set.html#a7360d8dd1487fa64cc42c5deb979021d',1,'IndividualDataSet::addPedData()']]], + ['addphendata',['addPhenData',['../class_individual_data.html#a885711b2191a3181e8197769c77d85df',1,'IndividualData::addPhenData()'],['../class_individual_data_set.html#a86e72d91ce939e489687fd16666dd318',1,'IndividualDataSet::addPhenData()']]], + ['addqcovdata',['addQCovData',['../class_individual_data.html#a42fc4d5cdb994e5c8ef2877c68e23b6a',1,'IndividualData::addQCovData()'],['../class_individual_data_set.html#a83c8392469827b88a276e748033af8ff',1,'IndividualDataSet::addQCovData()']]] +]; diff --git a/docs/html/search/all_1.html b/docs/html/search/all_1.html new file mode 100644 index 0000000..b13f0f7 --- /dev/null +++ b/docs/html/search/all_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/all_1.js b/docs/html/search/all_1.js new file mode 100644 index 0000000..6c52044 --- /dev/null +++ b/docs/html/search/all_1.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['calch2r',['calcH2r',['../class_reml_h2r_est.html#a46ae48fb9ddd0b293fa9eeafbef23c38',1,'RemlH2rEst']]], + ['constraintfunction',['constraintFunction',['../class_reml_hca.html#add5f191d301fe48deca82caa0ed64b42',1,'RemlHca']]], + ['construct',['construct',['../class_given_kinship.html#a1d04e3b823dc5d2dc083a79d4c96b7b1',1,'GivenKinship::construct()'],['../class_snp_kinship.html#a8317540d3eaac3cc2d21f2db47306649',1,'SnpKinship::construct()']]] +]; diff --git a/docs/html/search/all_2.html b/docs/html/search/all_2.html new file mode 100644 index 0000000..9543c57 --- /dev/null +++ b/docs/html/search/all_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/all_2.js b/docs/html/search/all_2.js new file mode 100644 index 0000000..e7d7608 --- /dev/null +++ b/docs/html/search/all_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['data',['Data',['../class_data.html',1,'Data'],['../class_data.html#ae1319726a459a90bc203b3550b78e558',1,'Data::Data()']]] +]; diff --git a/docs/html/search/all_3.html b/docs/html/search/all_3.html new file mode 100644 index 0000000..03405c0 --- /dev/null +++ b/docs/html/search/all_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/all_3.js b/docs/html/search/all_3.js new file mode 100644 index 0000000..2af6744 --- /dev/null +++ b/docs/html/search/all_3.js @@ -0,0 +1,48 @@ +var searchData= +[ + ['getan',['getAN',['../class_individual_data_set.html#a844822ee19700a1da8412961724d5d25',1,'IndividualDataSet::getAN()'],['../class_snp_kinship.html#aed018b6a8b40696d6124edef49732b58',1,'SnpKinship::getAN()']]], + ['getbestlambdaval',['getBestLambdaVal',['../class_reml_hca.html#a3c2580e064bafdf5cb5eb2f052ce02c3',1,'RemlHca']]], + ['getbesttrainedw',['getBestTrainedW',['../class_reml_hca.html#af5ea62f862aba373ce20c292424f64fc',1,'RemlHca']]], + ['getbfileprefix',['getBFilePrefix',['../class_option.html#a2b486563be1622e1da31fb43cc717114',1,'Option']]], + ['getccov',['getCCov',['../class_individual_data.html#adf02b65cc7645640d64f2eae90e1e15b',1,'IndividualData']]], + ['getccovfile',['getCCovFile',['../class_option.html#a6baf76ce89274582327e1616862b392f',1,'Option']]], + ['getchr',['getChr',['../class_individual_data_set.html#a48b372129e0e5f5ee973f911c3f052a0',1,'IndividualDataSet']]], + ['getcmmd',['getCmmd',['../class_option.html#a4f4b55fb5a3a18985537543a168b252d',1,'Option']]], + ['getcov',['getCov',['../class_individual_data_set.html#a300ebab7735f66d7108763f18b371c24',1,'IndividualDataSet']]], + ['getcovadded',['getCovAdded',['../class_individual_data_set.html#a4c00be812a03b7c421b6b3581c50e9b0',1,'IndividualDataSet']]], + ['getcovwithoutsplit',['getCovWithoutSplit',['../class_individual_data_set.html#a0b28fc2bfce2a0233bc52233cefb64ff',1,'IndividualDataSet']]], + ['getfinalstats',['getFinalStats',['../class_reml_h2r_est.html#a6d785889bcf66cf889d523e41d25c118',1,'RemlH2rEst']]], + ['getgeno',['getGeno',['../class_individual_data_set.html#aa34ec55d33ad69b64630d71fc24b3138',1,'IndividualDataSet']]], + ['getgrm',['getGrm',['../class_individual_data_set.html#a98000f81dcc25f6caa55060c0e84ebf7',1,'IndividualDataSet::getGrm()'],['../class_kinship.html#ad3e479dec51c13a2e1c70c99f0acc2c4',1,'Kinship::getGrm()']]], + ['getgrmwithoutsplit',['getGrmWithoutSplit',['../class_individual_data_set.html#a944d5406ba3751566bb3c9259de72265',1,'IndividualDataSet']]], + ['getidvec',['getIdVec',['../class_kinship.html#add845b5932eae549de8367e00b86fa8c',1,'Kinship']]], + ['getindividuallist',['getIndividualList',['../class_individual_data_set.html#a10a84b55bc6c639052e27e449eec6df9',1,'IndividualDataSet']]], + ['getindividualmap',['getIndividualMap',['../class_individual_data_set.html#ad41da35ffee7e2ad0dee54a7b89eaab0',1,'IndividualDataSet']]], + ['getkinshipfile',['getKinshipFile',['../class_option.html#abfd74209edc1c9115631527a5f387519',1,'Option']]], + ['getkinshipidfile',['getKinshipIDFile',['../class_option.html#ae8f91cf9f70f2c855671555f2ec390f6',1,'Option']]], + ['getkinshipsrc',['getKinshipSrc',['../class_option.html#a1cb61e972dd463a7da63ea3d9da938ff',1,'Option']]], + ['getlambdavecfile',['getLambdaVecFile',['../class_option.html#ab34e7fd7261a3428e3f1b035ca647abc',1,'Option']]], + ['getmafcutoff',['getMafCutoff',['../class_option.html#a222db1bc9da3a5aede4d6401f16c86ed',1,'Option']]], + ['getmaxiterh2r',['getMaxIterH2r',['../class_option.html#a91ac7dfa8ab9e6141a5a775fb983ff27',1,'Option']]], + ['getmaxiterhca',['getMaxIterHca',['../class_option.html#a347f3442cb7363f210524ad88cb79bcf',1,'Option']]], + ['getmissinggenocutoff',['getMissingGenoCutoff',['../class_option.html#a0b4c58774305589ad64aba3deb9d6955',1,'Option']]], + ['getnewgrmid',['getNewGrmId',['../class_individual_data.html#a15466375800cc1dd62b31f86e8f9190e',1,'IndividualData']]], + ['getnummissinggenovalues',['getNumMissingGenoValues',['../class_individual_data.html#a72c37be530afc78e506a19af418b5259',1,'IndividualData']]], + ['getnumsplits',['getNumSplits',['../class_option.html#ab68ec2e2f08b8ac1a8af85ba48cc43fb',1,'Option']]], + ['getnumsubjects',['getNumSubjects',['../class_individual_data_set.html#a54cdc9472ab575a3e66ba0dbfa03cb24',1,'IndividualDataSet']]], + ['getnumthreads',['getNumThreads',['../class_option.html#ab0cf3c45795ecd3369a7a731072d4291',1,'Option']]], + ['getoutdir',['getOutDir',['../class_option.html#af51898df742daabd8d31d62923bbf36e',1,'Option']]], + ['getped',['getPed',['../class_individual_data.html#a49a3e8d40b9eb8c8582d8efb4b0c1bb5',1,'IndividualData::getPed()'],['../class_individual_data_set.html#a32f66ecb52e7b716b5c3155809fa706a',1,'IndividualDataSet::getPed()']]], + ['getpedid',['getPedId',['../class_individual_data.html#a62f9e329c479fdc35ebb57b0463b70df',1,'IndividualData']]], + ['getphen',['getPhen',['../class_individual_data.html#aa25cd8a20812ec9533089b8301c0318d',1,'IndividualData::getPhen()'],['../class_individual_data_set.html#aab60162ef85cef800d9abb07f5835604',1,'IndividualDataSet::getPhen()']]], + ['getphenfile',['getPhenFile',['../class_option.html#ae74b18e7aafba83cebfeb6f484c42ac8',1,'Option']]], + ['getphenwithoutsplit',['getPhenWithoutSplit',['../class_individual_data_set.html#a5aa39b3457d95d7f85824aa1761bfab9',1,'IndividualDataSet']]], + ['getpregivengrmid',['getPregivenGrmId',['../class_individual_data.html#a8fec70aa6005b7d85ae9e8bb255e53fb',1,'IndividualData']]], + ['getqcov',['getQCov',['../class_individual_data.html#a137605ca9bb5f1b153d078e96fa00bb8',1,'IndividualData']]], + ['getqcovfile',['getQCovFile',['../class_option.html#ae0a5a49e1598747348581bf74198f3d1',1,'Option']]], + ['getscore',['getScore',['../class_scorer.html#aa687ed263a90fbc9e15102402a8ed5ef',1,'Scorer']]], + ['getsplitpartids',['getSplitPartIds',['../class_individual_data_set.html#a01d203698f124fc2d8358b014aff47b4',1,'IndividualDataSet']]], + ['getstrid',['getStrId',['../class_individual_data.html#af6dde62326e0d3696b5456e472451ac0',1,'IndividualData']]], + ['gettraitfile',['getTraitFile',['../class_option.html#a83b4a81a0f2876b192f47bfbfbfbb3fa',1,'Option']]], + ['givenkinship',['GivenKinship',['../class_given_kinship.html',1,'']]] +]; diff --git a/docs/html/search/all_4.html b/docs/html/search/all_4.html new file mode 100644 index 0000000..8e1f4b9 --- /dev/null +++ b/docs/html/search/all_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/all_4.js b/docs/html/search/all_4.js new file mode 100644 index 0000000..9802be8 --- /dev/null +++ b/docs/html/search/all_4.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['h2rest',['H2rEst',['../class_h2r_est.html',1,'']]], + ['hca',['Hca',['../class_hca.html',1,'']]], + ['heritable_20component_20analysis_20pipeline',['Heritable Component Analysis Pipeline',['../index.html',1,'']]] +]; diff --git a/docs/html/search/all_5.html b/docs/html/search/all_5.html new file mode 100644 index 0000000..89a879e --- /dev/null +++ b/docs/html/search/all_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/all_5.js b/docs/html/search/all_5.js new file mode 100644 index 0000000..899b123 --- /dev/null +++ b/docs/html/search/all_5.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['individualdata',['IndividualData',['../class_individual_data.html',1,'']]], + ['individualdataset',['IndividualDataSet',['../class_individual_data_set.html',1,'']]], + ['invertmatrix',['invertMatrix',['../class_util.html#a6806b203dcf18d526886ce3d12150620',1,'Util']]], + ['invertmatrixsympd',['invertMatrixSympd',['../class_util.html#a93fb79235b84e39bcb78b97179c722b4',1,'Util']]] +]; diff --git a/docs/html/search/all_6.html b/docs/html/search/all_6.html new file mode 100644 index 0000000..6afac06 --- /dev/null +++ b/docs/html/search/all_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/all_6.js b/docs/html/search/all_6.js new file mode 100644 index 0000000..7289cc9 --- /dev/null +++ b/docs/html/search/all_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['kinship',['Kinship',['../class_kinship.html',1,'Kinship'],['../class_kinship.html#a18adfc9f2a31d9205628e921ca75fa02',1,'Kinship::Kinship()'],['../class_kinship.html#a0f1616e77644d6a7a87db8aeb095b107',1,'Kinship::Kinship(arma::mat grm, std::map< std::string, int > ind, int nIndv, std::vector< std::string > idVec)']]] +]; diff --git a/docs/html/search/all_7.html b/docs/html/search/all_7.html new file mode 100644 index 0000000..de19107 --- /dev/null +++ b/docs/html/search/all_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/all_7.js b/docs/html/search/all_7.js new file mode 100644 index 0000000..be3128d --- /dev/null +++ b/docs/html/search/all_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['load',['load',['../class_data.html#af103fced88bc1ea697fd6ae9f32bd15f',1,'Data']]] +]; diff --git a/docs/html/search/all_8.html b/docs/html/search/all_8.html new file mode 100644 index 0000000..11e27cd --- /dev/null +++ b/docs/html/search/all_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/all_8.js b/docs/html/search/all_8.js new file mode 100644 index 0000000..b5822c6 --- /dev/null +++ b/docs/html/search/all_8.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['objectivefunction',['objectiveFunction',['../class_reml_hca.html#a22270a523019eed86c6541ed7184fa6b',1,'RemlHca']]], + ['option',['Option',['../class_option.html',1,'']]] +]; diff --git a/docs/html/search/all_9.html b/docs/html/search/all_9.html new file mode 100644 index 0000000..f8abbbe --- /dev/null +++ b/docs/html/search/all_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/all_9.js b/docs/html/search/all_9.js new file mode 100644 index 0000000..cdd8564 --- /dev/null +++ b/docs/html/search/all_9.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['parse',['parse',['../class_option.html#abf3b886d905c18554337c27c2d8043b4',1,'Option']]], + ['parsetodouble',['parseToDouble',['../class_util.html#ac3e250bcab768a533f66cc889cf26081',1,'Util']]], + ['parsetoint',['parseToInt',['../class_util.html#a9db3b3d53006aca617f7474d13bdb7fb',1,'Util']]] +]; diff --git a/docs/html/search/all_a.html b/docs/html/search/all_a.html new file mode 100644 index 0000000..9601fce --- /dev/null +++ b/docs/html/search/all_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/all_a.js b/docs/html/search/all_a.js new file mode 100644 index 0000000..c77d610 --- /dev/null +++ b/docs/html/search/all_a.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['reconcile',['reconcile',['../class_individual_data_set.html#ab449377333865d812e1ebd37b7f845dc',1,'IndividualDataSet']]], + ['remlh2rest',['RemlH2rEst',['../class_reml_h2r_est.html',1,'RemlH2rEst'],['../class_reml_h2r_est.html#a8dd6ffa90845f14ef01e7f03a776e21f',1,'RemlH2rEst::RemlH2rEst()']]], + ['remlhca',['RemlHca',['../class_reml_hca.html',1,'RemlHca'],['../class_reml_hca.html#ad08b49fa08b8c0eecc15ad1e95a72451',1,'RemlHca::RemlHca()']]], + ['resetphendata',['resetPhenData',['../class_individual_data.html#abfc9899daaf19d3cf501247e791558dc',1,'IndividualData']]] +]; diff --git a/docs/html/search/all_b.html b/docs/html/search/all_b.html new file mode 100644 index 0000000..0814e4e --- /dev/null +++ b/docs/html/search/all_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/all_b.js b/docs/html/search/all_b.js new file mode 100644 index 0000000..a05e76d --- /dev/null +++ b/docs/html/search/all_b.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['saveoutput',['saveOutput',['../class_reml_h2r_est.html#a72101a685633ac93f0e3d1159a058c06',1,'RemlH2rEst::saveOutput()'],['../class_reml_hca.html#a95de049dd906fbff1dc4632bdd426dd4',1,'RemlHca::saveOutput()'],['../class_scorer.html#a551bc3435903f7466f352488ad82252b',1,'Scorer::saveOutput()']]], + ['scorer',['Scorer',['../class_scorer.html',1,'Scorer'],['../class_scorer.html#a984c76c1948b49e8d347af14db720c17',1,'Scorer::Scorer()']]], + ['setchrdata',['setChrData',['../class_individual_data_set.html#a5b7b119dee43a383b1db402a134ac24f',1,'IndividualDataSet']]], + ['setgenodata',['setGenoData',['../class_individual_data_set.html#a92e85a50fe23ad05d4ffde3127091cd4',1,'IndividualDataSet']]], + ['setnewgrmid',['setNewGrmId',['../class_individual_data.html#a1a59a84bd7e1ff6652246c4c885cfa38',1,'IndividualData']]], + ['setnummissinggenovalues',['setNumMissingGenoValues',['../class_individual_data.html#aca3dac1ae763cc778313bca3ecac2fbc',1,'IndividualData']]], + ['setoption',['setOption',['../class_individual_data_set.html#aecc26260e462473c94288edfc5cdca20',1,'IndividualDataSet']]], + ['setpedid',['setPedId',['../class_individual_data.html#a9c0690094ce9cab9eba2f6b352213ffe',1,'IndividualData']]], + ['setpregivengrmid',['setPregivenGrmId',['../class_individual_data.html#ae9c5fa72191ea89a63b16422256dd13c',1,'IndividualData']]], + ['setstrid',['setStrId',['../class_individual_data.html#a13f03a99eb8d93edbc2bee5d1d7e25b0',1,'IndividualData']]], + ['settinggenodata',['settingGenoData',['../class_individual_data_set.html#aa77a30a3f5219bf47c585670e6bb7578',1,'IndividualDataSet']]], + ['snpkinship',['SnpKinship',['../class_snp_kinship.html',1,'']]], + ['splitbydelimeter',['splitByDelimeter',['../class_util.html#a6caf10ede2d5def19c796a0eb393a5dc',1,'Util']]] +]; diff --git a/docs/html/search/all_c.html b/docs/html/search/all_c.html new file mode 100644 index 0000000..da08c38 --- /dev/null +++ b/docs/html/search/all_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/all_c.js b/docs/html/search/all_c.js new file mode 100644 index 0000000..9a505c0 --- /dev/null +++ b/docs/html/search/all_c.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['train',['train',['../class_reml_hca.html#a64810b4549d0f9086a168d4c26160a2f',1,'RemlHca']]] +]; diff --git a/docs/html/search/all_d.html b/docs/html/search/all_d.html new file mode 100644 index 0000000..9986c9c --- /dev/null +++ b/docs/html/search/all_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/all_d.js b/docs/html/search/all_d.js new file mode 100644 index 0000000..95f0daf --- /dev/null +++ b/docs/html/search/all_d.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['util',['Util',['../class_util.html',1,'']]] +]; diff --git a/docs/html/search/all_e.html b/docs/html/search/all_e.html new file mode 100644 index 0000000..9fa42bb --- /dev/null +++ b/docs/html/search/all_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/all_e.js b/docs/html/search/all_e.js new file mode 100644 index 0000000..53fede7 --- /dev/null +++ b/docs/html/search/all_e.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['writekinship',['writeKinship',['../class_data.html#a98f3c36d2c92812b15be1ede5ba08986',1,'Data']]] +]; diff --git a/docs/html/search/classes_0.html b/docs/html/search/classes_0.html new file mode 100644 index 0000000..1c3e406 --- /dev/null +++ b/docs/html/search/classes_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/classes_0.js b/docs/html/search/classes_0.js new file mode 100644 index 0000000..d15429d --- /dev/null +++ b/docs/html/search/classes_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['data',['Data',['../class_data.html',1,'']]] +]; diff --git a/docs/html/search/classes_1.html b/docs/html/search/classes_1.html new file mode 100644 index 0000000..a8e7069 --- /dev/null +++ b/docs/html/search/classes_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/classes_1.js b/docs/html/search/classes_1.js new file mode 100644 index 0000000..658c525 --- /dev/null +++ b/docs/html/search/classes_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['givenkinship',['GivenKinship',['../class_given_kinship.html',1,'']]] +]; diff --git a/docs/html/search/classes_2.html b/docs/html/search/classes_2.html new file mode 100644 index 0000000..5c09c96 --- /dev/null +++ b/docs/html/search/classes_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/classes_2.js b/docs/html/search/classes_2.js new file mode 100644 index 0000000..1aa9830 --- /dev/null +++ b/docs/html/search/classes_2.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['h2rest',['H2rEst',['../class_h2r_est.html',1,'']]], + ['hca',['Hca',['../class_hca.html',1,'']]] +]; diff --git a/docs/html/search/classes_3.html b/docs/html/search/classes_3.html new file mode 100644 index 0000000..5faaeba --- /dev/null +++ b/docs/html/search/classes_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/classes_3.js b/docs/html/search/classes_3.js new file mode 100644 index 0000000..a938259 --- /dev/null +++ b/docs/html/search/classes_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['individualdata',['IndividualData',['../class_individual_data.html',1,'']]], + ['individualdataset',['IndividualDataSet',['../class_individual_data_set.html',1,'']]] +]; diff --git a/docs/html/search/classes_4.html b/docs/html/search/classes_4.html new file mode 100644 index 0000000..b3f11bc --- /dev/null +++ b/docs/html/search/classes_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/classes_4.js b/docs/html/search/classes_4.js new file mode 100644 index 0000000..b5a6239 --- /dev/null +++ b/docs/html/search/classes_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['kinship',['Kinship',['../class_kinship.html',1,'']]] +]; diff --git a/docs/html/search/classes_5.html b/docs/html/search/classes_5.html new file mode 100644 index 0000000..952ace6 --- /dev/null +++ b/docs/html/search/classes_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/classes_5.js b/docs/html/search/classes_5.js new file mode 100644 index 0000000..bb01fa7 --- /dev/null +++ b/docs/html/search/classes_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['option',['Option',['../class_option.html',1,'']]] +]; diff --git a/docs/html/search/classes_6.html b/docs/html/search/classes_6.html new file mode 100644 index 0000000..75eef9f --- /dev/null +++ b/docs/html/search/classes_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/classes_6.js b/docs/html/search/classes_6.js new file mode 100644 index 0000000..6cc0fb0 --- /dev/null +++ b/docs/html/search/classes_6.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['remlh2rest',['RemlH2rEst',['../class_reml_h2r_est.html',1,'']]], + ['remlhca',['RemlHca',['../class_reml_hca.html',1,'']]] +]; diff --git a/docs/html/search/classes_7.html b/docs/html/search/classes_7.html new file mode 100644 index 0000000..745f5f2 --- /dev/null +++ b/docs/html/search/classes_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/classes_7.js b/docs/html/search/classes_7.js new file mode 100644 index 0000000..a7fe84b --- /dev/null +++ b/docs/html/search/classes_7.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['scorer',['Scorer',['../class_scorer.html',1,'']]], + ['snpkinship',['SnpKinship',['../class_snp_kinship.html',1,'']]] +]; diff --git a/docs/html/search/classes_8.html b/docs/html/search/classes_8.html new file mode 100644 index 0000000..5a443d9 --- /dev/null +++ b/docs/html/search/classes_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/classes_8.js b/docs/html/search/classes_8.js new file mode 100644 index 0000000..95f0daf --- /dev/null +++ b/docs/html/search/classes_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['util',['Util',['../class_util.html',1,'']]] +]; diff --git a/docs/html/search/close.png b/docs/html/search/close.png new file mode 100644 index 0000000..9342d3d Binary files /dev/null and b/docs/html/search/close.png differ diff --git a/docs/html/search/files_0.html b/docs/html/search/files_0.html new file mode 100644 index 0000000..4f272b8 --- /dev/null +++ b/docs/html/search/files_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/files_0.js b/docs/html/search/files_0.js new file mode 100644 index 0000000..8bc75af --- /dev/null +++ b/docs/html/search/files_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['data_2ecpp',['Data.cpp',['../_data_8cpp.html',1,'']]], + ['data_2eh',['Data.h',['../_data_8h.html',1,'']]] +]; diff --git a/docs/html/search/files_1.html b/docs/html/search/files_1.html new file mode 100644 index 0000000..dcce422 --- /dev/null +++ b/docs/html/search/files_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/files_1.js b/docs/html/search/files_1.js new file mode 100644 index 0000000..ca34f08 --- /dev/null +++ b/docs/html/search/files_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['givenkinship_2ecpp',['GivenKinship.cpp',['../_given_kinship_8cpp.html',1,'']]], + ['givenkinship_2eh',['GivenKinship.h',['../_given_kinship_8h.html',1,'']]] +]; diff --git a/docs/html/search/files_2.html b/docs/html/search/files_2.html new file mode 100644 index 0000000..d5c6c3b --- /dev/null +++ b/docs/html/search/files_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/files_2.js b/docs/html/search/files_2.js new file mode 100644 index 0000000..68e22bd --- /dev/null +++ b/docs/html/search/files_2.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['individualdata_2ecpp',['IndividualData.cpp',['../_individual_data_8cpp.html',1,'']]], + ['individualdata_2eh',['IndividualData.h',['../_individual_data_8h.html',1,'']]], + ['individualdataset_2ecpp',['IndividualDataSet.cpp',['../_individual_data_set_8cpp.html',1,'']]], + ['individualdataset_2eh',['IndividualDataSet.h',['../_individual_data_set_8h.html',1,'']]] +]; diff --git a/docs/html/search/files_3.html b/docs/html/search/files_3.html new file mode 100644 index 0000000..d5a9528 --- /dev/null +++ b/docs/html/search/files_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/files_3.js b/docs/html/search/files_3.js new file mode 100644 index 0000000..d0741e3 --- /dev/null +++ b/docs/html/search/files_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['kinship_2ecpp',['Kinship.cpp',['../_kinship_8cpp.html',1,'']]], + ['kinship_2eh',['Kinship.h',['../_kinship_8h.html',1,'']]] +]; diff --git a/docs/html/search/files_4.html b/docs/html/search/files_4.html new file mode 100644 index 0000000..7b4c42a --- /dev/null +++ b/docs/html/search/files_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/files_4.js b/docs/html/search/files_4.js new file mode 100644 index 0000000..c93faff --- /dev/null +++ b/docs/html/search/files_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['main_2ecpp',['main.cpp',['../main_8cpp.html',1,'']]] +]; diff --git a/docs/html/search/files_5.html b/docs/html/search/files_5.html new file mode 100644 index 0000000..1f77bb1 --- /dev/null +++ b/docs/html/search/files_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/files_5.js b/docs/html/search/files_5.js new file mode 100644 index 0000000..5cc0034 --- /dev/null +++ b/docs/html/search/files_5.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['option_2ecpp',['Option.cpp',['../_option_8cpp.html',1,'']]], + ['option_2eh',['Option.h',['../_option_8h.html',1,'']]] +]; diff --git a/docs/html/search/files_6.html b/docs/html/search/files_6.html new file mode 100644 index 0000000..7573254 --- /dev/null +++ b/docs/html/search/files_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/files_6.js b/docs/html/search/files_6.js new file mode 100644 index 0000000..9e04783 --- /dev/null +++ b/docs/html/search/files_6.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['remlh2rest_2ecpp',['RemlH2rEst.cpp',['../_reml_h2r_est_8cpp.html',1,'']]], + ['remlh2rest_2eh',['RemlH2rEst.h',['../_reml_h2r_est_8h.html',1,'']]], + ['remlhca_2ecpp',['RemlHca.cpp',['../_reml_hca_8cpp.html',1,'']]], + ['remlhca_2eh',['RemlHca.h',['../_reml_hca_8h.html',1,'']]] +]; diff --git a/docs/html/search/files_7.html b/docs/html/search/files_7.html new file mode 100644 index 0000000..214b329 --- /dev/null +++ b/docs/html/search/files_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/files_7.js b/docs/html/search/files_7.js new file mode 100644 index 0000000..17030dd --- /dev/null +++ b/docs/html/search/files_7.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['scorer_2ecpp',['Scorer.cpp',['../_scorer_8cpp.html',1,'']]], + ['scorer_2eh',['Scorer.h',['../_scorer_8h.html',1,'']]], + ['snpkinship_2ecpp',['SnpKinship.cpp',['../_snp_kinship_8cpp.html',1,'']]], + ['snpkinship_2eh',['SnpKinship.h',['../_snp_kinship_8h.html',1,'']]] +]; diff --git a/docs/html/search/files_8.html b/docs/html/search/files_8.html new file mode 100644 index 0000000..6720c7c --- /dev/null +++ b/docs/html/search/files_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/files_8.js b/docs/html/search/files_8.js new file mode 100644 index 0000000..6b9e13d --- /dev/null +++ b/docs/html/search/files_8.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['util_2ecpp',['util.cpp',['../util_8cpp.html',1,'']]], + ['util_2eh',['util.h',['../util_8h.html',1,'']]] +]; diff --git a/docs/html/search/functions_0.html b/docs/html/search/functions_0.html new file mode 100644 index 0000000..4e6d87d --- /dev/null +++ b/docs/html/search/functions_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/functions_0.js b/docs/html/search/functions_0.js new file mode 100644 index 0000000..c5e0f87 --- /dev/null +++ b/docs/html/search/functions_0.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['addccovdata',['addCCovData',['../class_individual_data.html#a8caf856e4f6c7d526743ff05b29c9661',1,'IndividualData::addCCovData()'],['../class_individual_data_set.html#a089c41e85d418bf14f31dd1330fea2f1',1,'IndividualDataSet::addCCovData()']]], + ['addingccovdata',['addingCCovData',['../class_individual_data_set.html#a610c3eb4f63aed39dc2c9e52e1b1b2e2',1,'IndividualDataSet']]], + ['addingchrdata',['addingChrData',['../class_individual_data_set.html#a19e0b2d2bf86850b6c0af574df29b688',1,'IndividualDataSet']]], + ['addingpeddata',['addingPedData',['../class_individual_data_set.html#a7ded1f43f59309e65612ba689480e088',1,'IndividualDataSet']]], + ['addingphendata',['addingPhenData',['../class_individual_data_set.html#ac3213f3016f5e404bda4235ed31caddf',1,'IndividualDataSet']]], + ['addingqcovdata',['addingQCovData',['../class_individual_data_set.html#aa7cfd9afb873abebe3d48a51f5388124',1,'IndividualDataSet']]], + ['addpeddata',['addPedData',['../class_individual_data.html#a4ed3b9d923743e0b5b86cfbc4314d8f2',1,'IndividualData::addPedData()'],['../class_individual_data_set.html#a7360d8dd1487fa64cc42c5deb979021d',1,'IndividualDataSet::addPedData()']]], + ['addphendata',['addPhenData',['../class_individual_data.html#a885711b2191a3181e8197769c77d85df',1,'IndividualData::addPhenData()'],['../class_individual_data_set.html#a86e72d91ce939e489687fd16666dd318',1,'IndividualDataSet::addPhenData()']]], + ['addqcovdata',['addQCovData',['../class_individual_data.html#a42fc4d5cdb994e5c8ef2877c68e23b6a',1,'IndividualData::addQCovData()'],['../class_individual_data_set.html#a83c8392469827b88a276e748033af8ff',1,'IndividualDataSet::addQCovData()']]] +]; diff --git a/docs/html/search/functions_1.html b/docs/html/search/functions_1.html new file mode 100644 index 0000000..b343e2d --- /dev/null +++ b/docs/html/search/functions_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/functions_1.js b/docs/html/search/functions_1.js new file mode 100644 index 0000000..6c52044 --- /dev/null +++ b/docs/html/search/functions_1.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['calch2r',['calcH2r',['../class_reml_h2r_est.html#a46ae48fb9ddd0b293fa9eeafbef23c38',1,'RemlH2rEst']]], + ['constraintfunction',['constraintFunction',['../class_reml_hca.html#add5f191d301fe48deca82caa0ed64b42',1,'RemlHca']]], + ['construct',['construct',['../class_given_kinship.html#a1d04e3b823dc5d2dc083a79d4c96b7b1',1,'GivenKinship::construct()'],['../class_snp_kinship.html#a8317540d3eaac3cc2d21f2db47306649',1,'SnpKinship::construct()']]] +]; diff --git a/docs/html/search/functions_2.html b/docs/html/search/functions_2.html new file mode 100644 index 0000000..ecce2f3 --- /dev/null +++ b/docs/html/search/functions_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/functions_2.js b/docs/html/search/functions_2.js new file mode 100644 index 0000000..bdd78a2 --- /dev/null +++ b/docs/html/search/functions_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['data',['Data',['../class_data.html#ae1319726a459a90bc203b3550b78e558',1,'Data']]] +]; diff --git a/docs/html/search/functions_3.html b/docs/html/search/functions_3.html new file mode 100644 index 0000000..15f06ab --- /dev/null +++ b/docs/html/search/functions_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/functions_3.js b/docs/html/search/functions_3.js new file mode 100644 index 0000000..a958467 --- /dev/null +++ b/docs/html/search/functions_3.js @@ -0,0 +1,47 @@ +var searchData= +[ + ['getan',['getAN',['../class_individual_data_set.html#a844822ee19700a1da8412961724d5d25',1,'IndividualDataSet::getAN()'],['../class_snp_kinship.html#aed018b6a8b40696d6124edef49732b58',1,'SnpKinship::getAN()']]], + ['getbestlambdaval',['getBestLambdaVal',['../class_reml_hca.html#a3c2580e064bafdf5cb5eb2f052ce02c3',1,'RemlHca']]], + ['getbesttrainedw',['getBestTrainedW',['../class_reml_hca.html#af5ea62f862aba373ce20c292424f64fc',1,'RemlHca']]], + ['getbfileprefix',['getBFilePrefix',['../class_option.html#a2b486563be1622e1da31fb43cc717114',1,'Option']]], + ['getccov',['getCCov',['../class_individual_data.html#adf02b65cc7645640d64f2eae90e1e15b',1,'IndividualData']]], + ['getccovfile',['getCCovFile',['../class_option.html#a6baf76ce89274582327e1616862b392f',1,'Option']]], + ['getchr',['getChr',['../class_individual_data_set.html#a48b372129e0e5f5ee973f911c3f052a0',1,'IndividualDataSet']]], + ['getcmmd',['getCmmd',['../class_option.html#a4f4b55fb5a3a18985537543a168b252d',1,'Option']]], + ['getcov',['getCov',['../class_individual_data_set.html#a300ebab7735f66d7108763f18b371c24',1,'IndividualDataSet']]], + ['getcovadded',['getCovAdded',['../class_individual_data_set.html#a4c00be812a03b7c421b6b3581c50e9b0',1,'IndividualDataSet']]], + ['getcovwithoutsplit',['getCovWithoutSplit',['../class_individual_data_set.html#a0b28fc2bfce2a0233bc52233cefb64ff',1,'IndividualDataSet']]], + ['getfinalstats',['getFinalStats',['../class_reml_h2r_est.html#a6d785889bcf66cf889d523e41d25c118',1,'RemlH2rEst']]], + ['getgeno',['getGeno',['../class_individual_data_set.html#aa34ec55d33ad69b64630d71fc24b3138',1,'IndividualDataSet']]], + ['getgrm',['getGrm',['../class_individual_data_set.html#a98000f81dcc25f6caa55060c0e84ebf7',1,'IndividualDataSet::getGrm()'],['../class_kinship.html#ad3e479dec51c13a2e1c70c99f0acc2c4',1,'Kinship::getGrm()']]], + ['getgrmwithoutsplit',['getGrmWithoutSplit',['../class_individual_data_set.html#a944d5406ba3751566bb3c9259de72265',1,'IndividualDataSet']]], + ['getidvec',['getIdVec',['../class_kinship.html#add845b5932eae549de8367e00b86fa8c',1,'Kinship']]], + ['getindividuallist',['getIndividualList',['../class_individual_data_set.html#a10a84b55bc6c639052e27e449eec6df9',1,'IndividualDataSet']]], + ['getindividualmap',['getIndividualMap',['../class_individual_data_set.html#ad41da35ffee7e2ad0dee54a7b89eaab0',1,'IndividualDataSet']]], + ['getkinshipfile',['getKinshipFile',['../class_option.html#abfd74209edc1c9115631527a5f387519',1,'Option']]], + ['getkinshipidfile',['getKinshipIDFile',['../class_option.html#ae8f91cf9f70f2c855671555f2ec390f6',1,'Option']]], + ['getkinshipsrc',['getKinshipSrc',['../class_option.html#a1cb61e972dd463a7da63ea3d9da938ff',1,'Option']]], + ['getlambdavecfile',['getLambdaVecFile',['../class_option.html#ab34e7fd7261a3428e3f1b035ca647abc',1,'Option']]], + ['getmafcutoff',['getMafCutoff',['../class_option.html#a222db1bc9da3a5aede4d6401f16c86ed',1,'Option']]], + ['getmaxiterh2r',['getMaxIterH2r',['../class_option.html#a91ac7dfa8ab9e6141a5a775fb983ff27',1,'Option']]], + ['getmaxiterhca',['getMaxIterHca',['../class_option.html#a347f3442cb7363f210524ad88cb79bcf',1,'Option']]], + ['getmissinggenocutoff',['getMissingGenoCutoff',['../class_option.html#a0b4c58774305589ad64aba3deb9d6955',1,'Option']]], + ['getnewgrmid',['getNewGrmId',['../class_individual_data.html#a15466375800cc1dd62b31f86e8f9190e',1,'IndividualData']]], + ['getnummissinggenovalues',['getNumMissingGenoValues',['../class_individual_data.html#a72c37be530afc78e506a19af418b5259',1,'IndividualData']]], + ['getnumsplits',['getNumSplits',['../class_option.html#ab68ec2e2f08b8ac1a8af85ba48cc43fb',1,'Option']]], + ['getnumsubjects',['getNumSubjects',['../class_individual_data_set.html#a54cdc9472ab575a3e66ba0dbfa03cb24',1,'IndividualDataSet']]], + ['getnumthreads',['getNumThreads',['../class_option.html#ab0cf3c45795ecd3369a7a731072d4291',1,'Option']]], + ['getoutdir',['getOutDir',['../class_option.html#af51898df742daabd8d31d62923bbf36e',1,'Option']]], + ['getped',['getPed',['../class_individual_data.html#a49a3e8d40b9eb8c8582d8efb4b0c1bb5',1,'IndividualData::getPed()'],['../class_individual_data_set.html#a32f66ecb52e7b716b5c3155809fa706a',1,'IndividualDataSet::getPed()']]], + ['getpedid',['getPedId',['../class_individual_data.html#a62f9e329c479fdc35ebb57b0463b70df',1,'IndividualData']]], + ['getphen',['getPhen',['../class_individual_data.html#aa25cd8a20812ec9533089b8301c0318d',1,'IndividualData::getPhen()'],['../class_individual_data_set.html#aab60162ef85cef800d9abb07f5835604',1,'IndividualDataSet::getPhen()']]], + ['getphenfile',['getPhenFile',['../class_option.html#ae74b18e7aafba83cebfeb6f484c42ac8',1,'Option']]], + ['getphenwithoutsplit',['getPhenWithoutSplit',['../class_individual_data_set.html#a5aa39b3457d95d7f85824aa1761bfab9',1,'IndividualDataSet']]], + ['getpregivengrmid',['getPregivenGrmId',['../class_individual_data.html#a8fec70aa6005b7d85ae9e8bb255e53fb',1,'IndividualData']]], + ['getqcov',['getQCov',['../class_individual_data.html#a137605ca9bb5f1b153d078e96fa00bb8',1,'IndividualData']]], + ['getqcovfile',['getQCovFile',['../class_option.html#ae0a5a49e1598747348581bf74198f3d1',1,'Option']]], + ['getscore',['getScore',['../class_scorer.html#aa687ed263a90fbc9e15102402a8ed5ef',1,'Scorer']]], + ['getsplitpartids',['getSplitPartIds',['../class_individual_data_set.html#a01d203698f124fc2d8358b014aff47b4',1,'IndividualDataSet']]], + ['getstrid',['getStrId',['../class_individual_data.html#af6dde62326e0d3696b5456e472451ac0',1,'IndividualData']]], + ['gettraitfile',['getTraitFile',['../class_option.html#a83b4a81a0f2876b192f47bfbfbfbb3fa',1,'Option']]] +]; diff --git a/docs/html/search/functions_4.html b/docs/html/search/functions_4.html new file mode 100644 index 0000000..8985ff2 --- /dev/null +++ b/docs/html/search/functions_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/functions_4.js b/docs/html/search/functions_4.js new file mode 100644 index 0000000..33d83c1 --- /dev/null +++ b/docs/html/search/functions_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['invertmatrix',['invertMatrix',['../class_util.html#a6806b203dcf18d526886ce3d12150620',1,'Util']]], + ['invertmatrixsympd',['invertMatrixSympd',['../class_util.html#a93fb79235b84e39bcb78b97179c722b4',1,'Util']]] +]; diff --git a/docs/html/search/functions_5.html b/docs/html/search/functions_5.html new file mode 100644 index 0000000..0314918 --- /dev/null +++ b/docs/html/search/functions_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/functions_5.js b/docs/html/search/functions_5.js new file mode 100644 index 0000000..0433b06 --- /dev/null +++ b/docs/html/search/functions_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['kinship',['Kinship',['../class_kinship.html#a18adfc9f2a31d9205628e921ca75fa02',1,'Kinship::Kinship()'],['../class_kinship.html#a0f1616e77644d6a7a87db8aeb095b107',1,'Kinship::Kinship(arma::mat grm, std::map< std::string, int > ind, int nIndv, std::vector< std::string > idVec)']]] +]; diff --git a/docs/html/search/functions_6.html b/docs/html/search/functions_6.html new file mode 100644 index 0000000..c506123 --- /dev/null +++ b/docs/html/search/functions_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/functions_6.js b/docs/html/search/functions_6.js new file mode 100644 index 0000000..be3128d --- /dev/null +++ b/docs/html/search/functions_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['load',['load',['../class_data.html#af103fced88bc1ea697fd6ae9f32bd15f',1,'Data']]] +]; diff --git a/docs/html/search/functions_7.html b/docs/html/search/functions_7.html new file mode 100644 index 0000000..83a7b84 --- /dev/null +++ b/docs/html/search/functions_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/functions_7.js b/docs/html/search/functions_7.js new file mode 100644 index 0000000..5d4d7bb --- /dev/null +++ b/docs/html/search/functions_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['objectivefunction',['objectiveFunction',['../class_reml_hca.html#a22270a523019eed86c6541ed7184fa6b',1,'RemlHca']]] +]; diff --git a/docs/html/search/functions_8.html b/docs/html/search/functions_8.html new file mode 100644 index 0000000..b55f0e6 --- /dev/null +++ b/docs/html/search/functions_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/functions_8.js b/docs/html/search/functions_8.js new file mode 100644 index 0000000..cdd8564 --- /dev/null +++ b/docs/html/search/functions_8.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['parse',['parse',['../class_option.html#abf3b886d905c18554337c27c2d8043b4',1,'Option']]], + ['parsetodouble',['parseToDouble',['../class_util.html#ac3e250bcab768a533f66cc889cf26081',1,'Util']]], + ['parsetoint',['parseToInt',['../class_util.html#a9db3b3d53006aca617f7474d13bdb7fb',1,'Util']]] +]; diff --git a/docs/html/search/functions_9.html b/docs/html/search/functions_9.html new file mode 100644 index 0000000..c73f07b --- /dev/null +++ b/docs/html/search/functions_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/functions_9.js b/docs/html/search/functions_9.js new file mode 100644 index 0000000..af78324 --- /dev/null +++ b/docs/html/search/functions_9.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['reconcile',['reconcile',['../class_individual_data_set.html#ab449377333865d812e1ebd37b7f845dc',1,'IndividualDataSet']]], + ['remlh2rest',['RemlH2rEst',['../class_reml_h2r_est.html#a8dd6ffa90845f14ef01e7f03a776e21f',1,'RemlH2rEst']]], + ['remlhca',['RemlHca',['../class_reml_hca.html#ad08b49fa08b8c0eecc15ad1e95a72451',1,'RemlHca']]], + ['resetphendata',['resetPhenData',['../class_individual_data.html#abfc9899daaf19d3cf501247e791558dc',1,'IndividualData']]] +]; diff --git a/docs/html/search/functions_a.html b/docs/html/search/functions_a.html new file mode 100644 index 0000000..f10ad63 --- /dev/null +++ b/docs/html/search/functions_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/functions_a.js b/docs/html/search/functions_a.js new file mode 100644 index 0000000..de74b81 --- /dev/null +++ b/docs/html/search/functions_a.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['saveoutput',['saveOutput',['../class_reml_h2r_est.html#a72101a685633ac93f0e3d1159a058c06',1,'RemlH2rEst::saveOutput()'],['../class_reml_hca.html#a95de049dd906fbff1dc4632bdd426dd4',1,'RemlHca::saveOutput()'],['../class_scorer.html#a551bc3435903f7466f352488ad82252b',1,'Scorer::saveOutput()']]], + ['scorer',['Scorer',['../class_scorer.html#a984c76c1948b49e8d347af14db720c17',1,'Scorer']]], + ['setchrdata',['setChrData',['../class_individual_data_set.html#a5b7b119dee43a383b1db402a134ac24f',1,'IndividualDataSet']]], + ['setgenodata',['setGenoData',['../class_individual_data_set.html#a92e85a50fe23ad05d4ffde3127091cd4',1,'IndividualDataSet']]], + ['setnewgrmid',['setNewGrmId',['../class_individual_data.html#a1a59a84bd7e1ff6652246c4c885cfa38',1,'IndividualData']]], + ['setnummissinggenovalues',['setNumMissingGenoValues',['../class_individual_data.html#aca3dac1ae763cc778313bca3ecac2fbc',1,'IndividualData']]], + ['setoption',['setOption',['../class_individual_data_set.html#aecc26260e462473c94288edfc5cdca20',1,'IndividualDataSet']]], + ['setpedid',['setPedId',['../class_individual_data.html#a9c0690094ce9cab9eba2f6b352213ffe',1,'IndividualData']]], + ['setpregivengrmid',['setPregivenGrmId',['../class_individual_data.html#ae9c5fa72191ea89a63b16422256dd13c',1,'IndividualData']]], + ['setstrid',['setStrId',['../class_individual_data.html#a13f03a99eb8d93edbc2bee5d1d7e25b0',1,'IndividualData']]], + ['settinggenodata',['settingGenoData',['../class_individual_data_set.html#aa77a30a3f5219bf47c585670e6bb7578',1,'IndividualDataSet']]], + ['splitbydelimeter',['splitByDelimeter',['../class_util.html#a6caf10ede2d5def19c796a0eb393a5dc',1,'Util']]] +]; diff --git a/docs/html/search/functions_b.html b/docs/html/search/functions_b.html new file mode 100644 index 0000000..172ea1b --- /dev/null +++ b/docs/html/search/functions_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/functions_b.js b/docs/html/search/functions_b.js new file mode 100644 index 0000000..9a505c0 --- /dev/null +++ b/docs/html/search/functions_b.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['train',['train',['../class_reml_hca.html#a64810b4549d0f9086a168d4c26160a2f',1,'RemlHca']]] +]; diff --git a/docs/html/search/functions_c.html b/docs/html/search/functions_c.html new file mode 100644 index 0000000..99492ba --- /dev/null +++ b/docs/html/search/functions_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/functions_c.js b/docs/html/search/functions_c.js new file mode 100644 index 0000000..53fede7 --- /dev/null +++ b/docs/html/search/functions_c.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['writekinship',['writeKinship',['../class_data.html#a98f3c36d2c92812b15be1ede5ba08986',1,'Data']]] +]; diff --git a/docs/html/search/mag_sel.png b/docs/html/search/mag_sel.png new file mode 100644 index 0000000..81f6040 Binary files /dev/null and b/docs/html/search/mag_sel.png differ diff --git a/docs/html/search/nomatches.html b/docs/html/search/nomatches.html new file mode 100644 index 0000000..b1ded27 --- /dev/null +++ b/docs/html/search/nomatches.html @@ -0,0 +1,12 @@ + + + + + + + +
    +
    No Matches
    +
    + + diff --git a/docs/html/search/pages_0.html b/docs/html/search/pages_0.html new file mode 100644 index 0000000..4955b9e --- /dev/null +++ b/docs/html/search/pages_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/pages_0.js b/docs/html/search/pages_0.js new file mode 100644 index 0000000..122c032 --- /dev/null +++ b/docs/html/search/pages_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['heritable_20component_20analysis_20pipeline',['Heritable Component Analysis Pipeline',['../index.html',1,'']]] +]; diff --git a/docs/html/search/search.css b/docs/html/search/search.css new file mode 100644 index 0000000..3cf9df9 --- /dev/null +++ b/docs/html/search/search.css @@ -0,0 +1,271 @@ +/*---------------- Search Box */ + +#FSearchBox { + float: left; +} + +#MSearchBox { + white-space : nowrap; + float: none; + margin-top: 8px; + right: 0px; + width: 170px; + height: 24px; + z-index: 102; +} + +#MSearchBox .left +{ + display:block; + position:absolute; + left:10px; + width:20px; + height:19px; + background:url('search_l.png') no-repeat; + background-position:right; +} + +#MSearchSelect { + display:block; + position:absolute; + width:20px; + height:19px; +} + +.left #MSearchSelect { + left:4px; +} + +.right #MSearchSelect { + right:5px; +} + +#MSearchField { + display:block; + position:absolute; + height:19px; + background:url('search_m.png') repeat-x; + border:none; + width:115px; + margin-left:20px; + padding-left:4px; + color: #909090; + outline: none; + font: 9pt Arial, Verdana, sans-serif; + -webkit-border-radius: 0px; +} + +#FSearchBox #MSearchField { + margin-left:15px; +} + +#MSearchBox .right { + display:block; + position:absolute; + right:10px; + top:8px; + width:20px; + height:19px; + background:url('search_r.png') no-repeat; + background-position:left; +} + +#MSearchClose { + display: none; + position: absolute; + top: 4px; + background : none; + border: none; + margin: 0px 4px 0px 0px; + padding: 0px 0px; + outline: none; +} + +.left #MSearchClose { + left: 6px; +} + +.right #MSearchClose { + right: 2px; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #90A5CE; + background-color: #F9FAFC; + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: #FFFFFF; + background-color: #3D578C; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + width: 60ex; + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000; + background-color: #EEF1F7; + z-index:10000; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; +} + +.SRResult { + display: none; +} + +DIV.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.searchresult { + background-color: #F0F3F8; +} + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: url("../tab_a.png"); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/docs/html/search/search.js b/docs/html/search/search.js new file mode 100644 index 0000000..dedce3b --- /dev/null +++ b/docs/html/search/search.js @@ -0,0 +1,791 @@ +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches.html'; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline'; + if (this.insideFrame) + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName == 'DIV' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName == 'DIV' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults() +{ + var results = document.getElementById("SRResults"); + for (var e=0; e + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/variables_0.js b/docs/html/search/variables_0.js new file mode 100644 index 0000000..845021f --- /dev/null +++ b/docs/html/search/variables_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['idvec',['idVec',['../class_kinship.html#ab2526834b58e785a5c05069e346cfaf8',1,'Kinship']]], + ['individualdataset',['individualDataSet',['../class_data.html#a61adff3d9c24eb86a754b08d39fb1e48',1,'Data']]] +]; diff --git a/docs/html/search/variables_1.html b/docs/html/search/variables_1.html new file mode 100644 index 0000000..84237b6 --- /dev/null +++ b/docs/html/search/variables_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/variables_1.js b/docs/html/search/variables_1.js new file mode 100644 index 0000000..c2b6ccc --- /dev/null +++ b/docs/html/search/variables_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['lambdavec',['lambdaVec',['../class_data.html#a6471ad4b3fafd2270f5f1076e70a67ce',1,'Data']]] +]; diff --git a/docs/html/search/variables_2.html b/docs/html/search/variables_2.html new file mode 100644 index 0000000..5c9de1a --- /dev/null +++ b/docs/html/search/variables_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/variables_2.js b/docs/html/search/variables_2.js new file mode 100644 index 0000000..79ecd07 --- /dev/null +++ b/docs/html/search/variables_2.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['m_5fgrm',['m_grm',['../class_kinship.html#a9d27e5b9fb058d4e0ce844fbb0508bc3',1,'Kinship']]], + ['m_5fnindv',['m_nIndv',['../class_kinship.html#a8e0bb309d82f1b720b995abbae65158a',1,'Kinship']]] +]; diff --git a/docs/html/search/variables_3.html b/docs/html/search/variables_3.html new file mode 100644 index 0000000..f95e34c --- /dev/null +++ b/docs/html/search/variables_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/variables_3.js b/docs/html/search/variables_3.js new file mode 100644 index 0000000..bd60a5a --- /dev/null +++ b/docs/html/search/variables_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['scorers',['scorers',['../class_data.html#a191cf84ef250f6aa792b77beb2a0b4a0',1,'Data']]] +]; diff --git a/docs/html/search/variables_4.html b/docs/html/search/variables_4.html new file mode 100644 index 0000000..d7db285 --- /dev/null +++ b/docs/html/search/variables_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/html/search/variables_4.js b/docs/html/search/variables_4.js new file mode 100644 index 0000000..c9f2737 --- /dev/null +++ b/docs/html/search/variables_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['trait',['trait',['../class_data.html#a7996ee33b569fc2f67568ec04c16158c',1,'Data']]] +]; diff --git a/docs/html/splitbar.png b/docs/html/splitbar.png new file mode 100644 index 0000000..fe895f2 Binary files /dev/null and b/docs/html/splitbar.png differ diff --git a/docs/html/sync_off.png b/docs/html/sync_off.png new file mode 100644 index 0000000..3b443fc Binary files /dev/null and b/docs/html/sync_off.png differ diff --git a/docs/html/sync_on.png b/docs/html/sync_on.png new file mode 100644 index 0000000..e08320f Binary files /dev/null and b/docs/html/sync_on.png differ diff --git a/docs/html/tab_a.png b/docs/html/tab_a.png new file mode 100644 index 0000000..3b725c4 Binary files /dev/null and b/docs/html/tab_a.png differ diff --git a/docs/html/tab_b.png b/docs/html/tab_b.png new file mode 100644 index 0000000..e2b4a86 Binary files /dev/null and b/docs/html/tab_b.png differ diff --git a/docs/html/tab_h.png b/docs/html/tab_h.png new file mode 100644 index 0000000..fd5cb70 Binary files /dev/null and b/docs/html/tab_h.png differ diff --git a/docs/html/tab_s.png b/docs/html/tab_s.png new file mode 100644 index 0000000..ab478c9 Binary files /dev/null and b/docs/html/tab_s.png differ diff --git a/docs/html/tabs.css b/docs/html/tabs.css new file mode 100644 index 0000000..a28614b --- /dev/null +++ b/docs/html/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#doc-content{overflow:auto;display:block;padding:0;margin:0;-webkit-overflow-scrolling:touch}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,0.9);color:#283a5d;outline:0}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace!important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283a5d transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;-moz-border-radius:0!important;-webkit-border-radius:0;border-radius:0!important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a:hover span.sub-arrow{border-color:white transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;-moz-border-radius:5px!important;-webkit-border-radius:5px;border-radius:5px!important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0!important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent white}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px!important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}} \ No newline at end of file diff --git a/docs/html/util_8cpp.html b/docs/html/util_8cpp.html new file mode 100644 index 0000000..013cde5 --- /dev/null +++ b/docs/html/util_8cpp.html @@ -0,0 +1,107 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/util.cpp File Reference + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    HCA +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    util.cpp File Reference
    +
    +
    +
    #include "util.h"
    +
    +Include dependency graph for util.cpp:
    +
    +
    + + + +
    +
    +
    + + + + diff --git a/docs/html/util_8cpp__incl.map b/docs/html/util_8cpp__incl.map new file mode 100644 index 0000000..06397d0 --- /dev/null +++ b/docs/html/util_8cpp__incl.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/util_8cpp__incl.md5 b/docs/html/util_8cpp__incl.md5 new file mode 100644 index 0000000..4c7a1ae --- /dev/null +++ b/docs/html/util_8cpp__incl.md5 @@ -0,0 +1 @@ +c25ebc42b7067b9393a8f4f7368aabb9 \ No newline at end of file diff --git a/docs/html/util_8cpp__incl.png b/docs/html/util_8cpp__incl.png new file mode 100644 index 0000000..16c184f Binary files /dev/null and b/docs/html/util_8cpp__incl.png differ diff --git a/docs/html/util_8h.html b/docs/html/util_8h.html new file mode 100644 index 0000000..e81023b --- /dev/null +++ b/docs/html/util_8h.html @@ -0,0 +1,136 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/util.h File Reference + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    HCA +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    +
    util.h File Reference
    +
    +
    +
    #include <armadillo>
    +
    +Include dependency graph for util.h:
    +
    +
    + + +
    +
    +This graph shows which files directly or indirectly include this file:
    +
    +
    + + + + + + + + + + + + + + + +
    +
    +

    Go to the source code of this file.

    + + + + +

    +Classes

    class  Util
     
    +
    +
    + + + + diff --git a/docs/html/util_8h__dep__incl.map b/docs/html/util_8h__dep__incl.map new file mode 100644 index 0000000..882adb4 --- /dev/null +++ b/docs/html/util_8h__dep__incl.map @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/docs/html/util_8h__dep__incl.md5 b/docs/html/util_8h__dep__incl.md5 new file mode 100644 index 0000000..9c10c43 --- /dev/null +++ b/docs/html/util_8h__dep__incl.md5 @@ -0,0 +1 @@ +7b0c3a5ef7067061331e00590c5ca78a \ No newline at end of file diff --git a/docs/html/util_8h__dep__incl.png b/docs/html/util_8h__dep__incl.png new file mode 100644 index 0000000..a9194b4 Binary files /dev/null and b/docs/html/util_8h__dep__incl.png differ diff --git a/docs/html/util_8h__incl.map b/docs/html/util_8h__incl.map new file mode 100644 index 0000000..366c53f --- /dev/null +++ b/docs/html/util_8h__incl.map @@ -0,0 +1,2 @@ + + diff --git a/docs/html/util_8h__incl.md5 b/docs/html/util_8h__incl.md5 new file mode 100644 index 0000000..c4f29b0 --- /dev/null +++ b/docs/html/util_8h__incl.md5 @@ -0,0 +1 @@ +50c7fa9c017f352f6a257671b96051c8 \ No newline at end of file diff --git a/docs/html/util_8h__incl.png b/docs/html/util_8h__incl.png new file mode 100644 index 0000000..1cb2bf8 Binary files /dev/null and b/docs/html/util_8h__incl.png differ diff --git a/docs/html/util_8h_source.html b/docs/html/util_8h_source.html new file mode 100644 index 0000000..86c3550 --- /dev/null +++ b/docs/html/util_8h_source.html @@ -0,0 +1,104 @@ + + + + + + + +HCA: /Users/danielruskin/src/hca-dev/src/util.h Source File + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    HCA +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    util.h
    +
    +
    +
    1 /*
    2  * SnpKinship.h
    3  *
    4  * Created on: Feb 17, 2016
    5  * Author: Joey
    6  */
    7 
    8 #ifndef UTIL_H_
    9 #define UTIL_H_
    10 
    11 #include <armadillo>
    12 
    13 class Util
    14 {
    15  public:
    16  static std::vector<std::string> splitByDelimeter(std::string data, std::string delim);
    17  static double parseToDouble(std::string data);
    18  static int parseToInt(std::string data);
    19  static arma::mat invertMatrix(arma::mat& m, std::string name, bool alreadyAdded = false);
    20  static arma::mat invertMatrixSympd(arma::mat& m, std::string name, bool alreadyAdded = false);
    21 };
    22 
    23 
    24 #endif /* UTIL_H_ */
    static std::vector< std::string > splitByDelimeter(std::string data, std::string delim)
    Splits a string by delimiter, and returns a vector swith the result.
    Definition: util.cpp:4
    +
    static arma::mat invertMatrixSympd(arma::mat &m, std::string name, bool alreadyAdded=false)
    Inverts the matrix via arma::inv_sympd, adding values to diagonals should inversion fail...
    Definition: util.cpp:72
    +
    static double parseToDouble(std::string data)
    Parses a string to a double, raising an error if the data is invalid.
    Definition: util.cpp:20
    +
    static int parseToInt(std::string data)
    Parses a string to an integer, raising an error if the data is invalid.
    Definition: util.cpp:33
    +
    static arma::mat invertMatrix(arma::mat &m, std::string name, bool alreadyAdded=false)
    Inverts the matrix via arma::inv, adding values to diagonals should inversion fail. If values are added to diagonals, outputs a warning with the "name" variable.
    Definition: util.cpp:46
    +
    Definition: util.h:13
    +
    +
    + + + + diff --git a/docs/latex/Makefile b/docs/latex/Makefile new file mode 100644 index 0000000..8cc3866 --- /dev/null +++ b/docs/latex/Makefile @@ -0,0 +1,21 @@ +all: refman.pdf + +pdf: refman.pdf + +refman.pdf: clean refman.tex + pdflatex refman + makeindex refman.idx + pdflatex refman + latex_count=8 ; \ + while egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\ + do \ + echo "Rerunning latex...." ;\ + pdflatex refman ;\ + latex_count=`expr $$latex_count - 1` ;\ + done + makeindex refman.idx + pdflatex refman + + +clean: + rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf diff --git a/docs/latex/_data_8cpp.tex b/docs/latex/_data_8cpp.tex new file mode 100644 index 0000000..c56c2c0 --- /dev/null +++ b/docs/latex/_data_8cpp.tex @@ -0,0 +1,16 @@ +\hypertarget{_data_8cpp}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Data.cpp File Reference} +\label{_data_8cpp}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Data.\+cpp@{/\+Users/danielruskin/src/hca-\/dev/src/\+Data.\+cpp}} +{\ttfamily \#include \char`\"{}Data.\+h\char`\"{}}\newline +{\ttfamily \#include $<$unistd.\+h$>$}\newline +{\ttfamily \#include $<$sys/stat.\+h$>$}\newline +{\ttfamily \#include $<$bitset$>$}\newline +{\ttfamily \#include \char`\"{}Snp\+Kinship.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Given\+Kinship.\+h\char`\"{}}\newline +Include dependency graph for Data.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_data_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/latex/_data_8cpp__incl.md5 b/docs/latex/_data_8cpp__incl.md5 new file mode 100644 index 0000000..3983ba3 --- /dev/null +++ b/docs/latex/_data_8cpp__incl.md5 @@ -0,0 +1 @@ +6175098855a53a3dfbc8879ceb26094a \ No newline at end of file diff --git a/docs/latex/_data_8cpp__incl.pdf b/docs/latex/_data_8cpp__incl.pdf new file mode 100644 index 0000000..2ff3f98 Binary files /dev/null and b/docs/latex/_data_8cpp__incl.pdf differ diff --git a/docs/latex/_data_8h.tex b/docs/latex/_data_8h.tex new file mode 100644 index 0000000..df77b37 --- /dev/null +++ b/docs/latex/_data_8h.tex @@ -0,0 +1,32 @@ +\hypertarget{_data_8h}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Data.h File Reference} +\label{_data_8h}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Data.\+h@{/\+Users/danielruskin/src/hca-\/dev/src/\+Data.\+h}} +{\ttfamily \#include $<$iostream$>$}\newline +{\ttfamily \#include $<$armadillo$>$}\newline +{\ttfamily \#include $<$map$>$}\newline +{\ttfamily \#include $<$set$>$}\newline +{\ttfamily \#include $<$iterator$>$}\newline +{\ttfamily \#include $<$bitset$>$}\newline +{\ttfamily \#include \char`\"{}Individual\+Data\+Set.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Option.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Scorer.\+h\char`\"{}}\newline +Include dependency graph for Data.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_data_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_data_8h__dep__incl} +\end{center} +\end{figure} +\subsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \hyperlink{class_data}{Data} +\begin{DoxyCompactList}\small\item\em A class to load all relevant data. Responsible solely for loading data -\/ not for reconciling missing individuals. \end{DoxyCompactList}\end{DoxyCompactItemize} diff --git a/docs/latex/_data_8h__dep__incl.md5 b/docs/latex/_data_8h__dep__incl.md5 new file mode 100644 index 0000000..dcca380 --- /dev/null +++ b/docs/latex/_data_8h__dep__incl.md5 @@ -0,0 +1 @@ +8edf77e87227183a189fffdc1b82e80f \ No newline at end of file diff --git a/docs/latex/_data_8h__dep__incl.pdf b/docs/latex/_data_8h__dep__incl.pdf new file mode 100644 index 0000000..adcc59c Binary files /dev/null and b/docs/latex/_data_8h__dep__incl.pdf differ diff --git a/docs/latex/_data_8h__incl.md5 b/docs/latex/_data_8h__incl.md5 new file mode 100644 index 0000000..c919643 --- /dev/null +++ b/docs/latex/_data_8h__incl.md5 @@ -0,0 +1 @@ +48b0608519da00a54566a593bf9eae1a \ No newline at end of file diff --git a/docs/latex/_data_8h__incl.pdf b/docs/latex/_data_8h__incl.pdf new file mode 100644 index 0000000..91657c5 Binary files /dev/null and b/docs/latex/_data_8h__incl.pdf differ diff --git a/docs/latex/_given_kinship_8cpp.tex b/docs/latex/_given_kinship_8cpp.tex new file mode 100644 index 0000000..3bcd5c0 --- /dev/null +++ b/docs/latex/_given_kinship_8cpp.tex @@ -0,0 +1,11 @@ +\hypertarget{_given_kinship_8cpp}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Given\+Kinship.cpp File Reference} +\label{_given_kinship_8cpp}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Given\+Kinship.\+cpp@{/\+Users/danielruskin/src/hca-\/dev/src/\+Given\+Kinship.\+cpp}} +{\ttfamily \#include \char`\"{}Given\+Kinship.\+h\char`\"{}}\newline +Include dependency graph for Given\+Kinship.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_given_kinship_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/latex/_given_kinship_8cpp__incl.md5 b/docs/latex/_given_kinship_8cpp__incl.md5 new file mode 100644 index 0000000..892602b --- /dev/null +++ b/docs/latex/_given_kinship_8cpp__incl.md5 @@ -0,0 +1 @@ +eaac476ea4e806f7dc523eee07f8986d \ No newline at end of file diff --git a/docs/latex/_given_kinship_8cpp__incl.pdf b/docs/latex/_given_kinship_8cpp__incl.pdf new file mode 100644 index 0000000..8315524 Binary files /dev/null and b/docs/latex/_given_kinship_8cpp__incl.pdf differ diff --git a/docs/latex/_given_kinship_8h.tex b/docs/latex/_given_kinship_8h.tex new file mode 100644 index 0000000..b4947f0 --- /dev/null +++ b/docs/latex/_given_kinship_8h.tex @@ -0,0 +1,27 @@ +\hypertarget{_given_kinship_8h}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Given\+Kinship.h File Reference} +\label{_given_kinship_8h}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Given\+Kinship.\+h@{/\+Users/danielruskin/src/hca-\/dev/src/\+Given\+Kinship.\+h}} +{\ttfamily \#include $<$stdint.\+h$>$}\newline +{\ttfamily \#include \char`\"{}Kinship.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}util.\+h\char`\"{}}\newline +{\ttfamily \#include $<$armadillo$>$}\newline +Include dependency graph for Given\+Kinship.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_given_kinship_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_given_kinship_8h__dep__incl} +\end{center} +\end{figure} +\subsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \hyperlink{class_given_kinship}{Given\+Kinship} +\begin{DoxyCompactList}\small\item\em A class to load a pregiven kinship matrix. \end{DoxyCompactList}\end{DoxyCompactItemize} diff --git a/docs/latex/_given_kinship_8h__dep__incl.md5 b/docs/latex/_given_kinship_8h__dep__incl.md5 new file mode 100644 index 0000000..40ce9f4 --- /dev/null +++ b/docs/latex/_given_kinship_8h__dep__incl.md5 @@ -0,0 +1 @@ +1b32319835eec41ebad72d1aa8841499 \ No newline at end of file diff --git a/docs/latex/_given_kinship_8h__dep__incl.pdf b/docs/latex/_given_kinship_8h__dep__incl.pdf new file mode 100644 index 0000000..020c55a Binary files /dev/null and b/docs/latex/_given_kinship_8h__dep__incl.pdf differ diff --git a/docs/latex/_given_kinship_8h__incl.md5 b/docs/latex/_given_kinship_8h__incl.md5 new file mode 100644 index 0000000..c2c35b1 --- /dev/null +++ b/docs/latex/_given_kinship_8h__incl.md5 @@ -0,0 +1 @@ +66dd6eb6ad15768143dfe5c2fa19bfa6 \ No newline at end of file diff --git a/docs/latex/_given_kinship_8h__incl.pdf b/docs/latex/_given_kinship_8h__incl.pdf new file mode 100644 index 0000000..4beb698 Binary files /dev/null and b/docs/latex/_given_kinship_8h__incl.pdf differ diff --git a/docs/latex/_individual_data_8cpp.tex b/docs/latex/_individual_data_8cpp.tex new file mode 100644 index 0000000..c29bc7d --- /dev/null +++ b/docs/latex/_individual_data_8cpp.tex @@ -0,0 +1,11 @@ +\hypertarget{_individual_data_8cpp}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Individual\+Data.cpp File Reference} +\label{_individual_data_8cpp}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Individual\+Data.\+cpp@{/\+Users/danielruskin/src/hca-\/dev/src/\+Individual\+Data.\+cpp}} +{\ttfamily \#include \char`\"{}Individual\+Data.\+h\char`\"{}}\newline +Include dependency graph for Individual\+Data.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=261pt]{_individual_data_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/latex/_individual_data_8cpp__incl.md5 b/docs/latex/_individual_data_8cpp__incl.md5 new file mode 100644 index 0000000..1e1994d --- /dev/null +++ b/docs/latex/_individual_data_8cpp__incl.md5 @@ -0,0 +1 @@ +7eb16f0cbf3e42d01d0e89d7b43514d6 \ No newline at end of file diff --git a/docs/latex/_individual_data_8cpp__incl.pdf b/docs/latex/_individual_data_8cpp__incl.pdf new file mode 100644 index 0000000..06f4cb0 Binary files /dev/null and b/docs/latex/_individual_data_8cpp__incl.pdf differ diff --git a/docs/latex/_individual_data_8h.tex b/docs/latex/_individual_data_8h.tex new file mode 100644 index 0000000..bfbbf61 --- /dev/null +++ b/docs/latex/_individual_data_8h.tex @@ -0,0 +1,26 @@ +\hypertarget{_individual_data_8h}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Individual\+Data.h File Reference} +\label{_individual_data_8h}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Individual\+Data.\+h@{/\+Users/danielruskin/src/hca-\/dev/src/\+Individual\+Data.\+h}} +{\ttfamily \#include $<$iostream$>$}\newline +{\ttfamily \#include $<$armadillo$>$}\newline +{\ttfamily \#include $<$map$>$}\newline +Include dependency graph for Individual\+Data.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=261pt]{_individual_data_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_individual_data_8h__dep__incl} +\end{center} +\end{figure} +\subsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \hyperlink{class_individual_data}{Individual\+Data} +\begin{DoxyCompactList}\small\item\em A class to represent data associated with a given individual. \end{DoxyCompactList}\end{DoxyCompactItemize} diff --git a/docs/latex/_individual_data_8h__dep__incl.md5 b/docs/latex/_individual_data_8h__dep__incl.md5 new file mode 100644 index 0000000..88056ac --- /dev/null +++ b/docs/latex/_individual_data_8h__dep__incl.md5 @@ -0,0 +1 @@ +63b61cf1fe80b643166d7ddddaff803e \ No newline at end of file diff --git a/docs/latex/_individual_data_8h__dep__incl.pdf b/docs/latex/_individual_data_8h__dep__incl.pdf new file mode 100644 index 0000000..6ed8ee7 Binary files /dev/null and b/docs/latex/_individual_data_8h__dep__incl.pdf differ diff --git a/docs/latex/_individual_data_8h__incl.md5 b/docs/latex/_individual_data_8h__incl.md5 new file mode 100644 index 0000000..26e618b --- /dev/null +++ b/docs/latex/_individual_data_8h__incl.md5 @@ -0,0 +1 @@ +676cf84b1c05c3ed349895210e753fed \ No newline at end of file diff --git a/docs/latex/_individual_data_8h__incl.pdf b/docs/latex/_individual_data_8h__incl.pdf new file mode 100644 index 0000000..f86635c Binary files /dev/null and b/docs/latex/_individual_data_8h__incl.pdf differ diff --git a/docs/latex/_individual_data_set_8cpp.tex b/docs/latex/_individual_data_set_8cpp.tex new file mode 100644 index 0000000..cfd1ca9 --- /dev/null +++ b/docs/latex/_individual_data_set_8cpp.tex @@ -0,0 +1,11 @@ +\hypertarget{_individual_data_set_8cpp}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Individual\+Data\+Set.cpp File Reference} +\label{_individual_data_set_8cpp}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Individual\+Data\+Set.\+cpp@{/\+Users/danielruskin/src/hca-\/dev/src/\+Individual\+Data\+Set.\+cpp}} +{\ttfamily \#include \char`\"{}Individual\+Data\+Set.\+h\char`\"{}}\newline +Include dependency graph for Individual\+Data\+Set.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_individual_data_set_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/latex/_individual_data_set_8cpp__incl.md5 b/docs/latex/_individual_data_set_8cpp__incl.md5 new file mode 100644 index 0000000..40ab0af --- /dev/null +++ b/docs/latex/_individual_data_set_8cpp__incl.md5 @@ -0,0 +1 @@ +64bca01446eb4b5b0d89dc1ac111aaf4 \ No newline at end of file diff --git a/docs/latex/_individual_data_set_8cpp__incl.pdf b/docs/latex/_individual_data_set_8cpp__incl.pdf new file mode 100644 index 0000000..768b999 Binary files /dev/null and b/docs/latex/_individual_data_set_8cpp__incl.pdf differ diff --git a/docs/latex/_individual_data_set_8h.tex b/docs/latex/_individual_data_set_8h.tex new file mode 100644 index 0000000..3e4753e --- /dev/null +++ b/docs/latex/_individual_data_set_8h.tex @@ -0,0 +1,29 @@ +\hypertarget{_individual_data_set_8h}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Individual\+Data\+Set.h File Reference} +\label{_individual_data_set_8h}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Individual\+Data\+Set.\+h@{/\+Users/danielruskin/src/hca-\/dev/src/\+Individual\+Data\+Set.\+h}} +{\ttfamily \#include \char`\"{}Given\+Kinship.\+h\char`\"{}}\newline +{\ttfamily \#include $<$armadillo$>$}\newline +{\ttfamily \#include $<$list$>$}\newline +{\ttfamily \#include \char`\"{}Individual\+Data.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Option.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Snp\+Kinship.\+h\char`\"{}}\newline +Include dependency graph for Individual\+Data\+Set.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_individual_data_set_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_individual_data_set_8h__dep__incl} +\end{center} +\end{figure} +\subsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \hyperlink{class_individual_data_set}{Individual\+Data\+Set} +\begin{DoxyCompactList}\small\item\em A class to keep track of and reconcile \hyperlink{class_individual_data}{Individual\+Data} objects. \end{DoxyCompactList}\end{DoxyCompactItemize} diff --git a/docs/latex/_individual_data_set_8h__dep__incl.md5 b/docs/latex/_individual_data_set_8h__dep__incl.md5 new file mode 100644 index 0000000..a3df94e --- /dev/null +++ b/docs/latex/_individual_data_set_8h__dep__incl.md5 @@ -0,0 +1 @@ +3f07f7f593aa6bc2be218495714e8fa4 \ No newline at end of file diff --git a/docs/latex/_individual_data_set_8h__dep__incl.pdf b/docs/latex/_individual_data_set_8h__dep__incl.pdf new file mode 100644 index 0000000..a78ab82 Binary files /dev/null and b/docs/latex/_individual_data_set_8h__dep__incl.pdf differ diff --git a/docs/latex/_individual_data_set_8h__incl.md5 b/docs/latex/_individual_data_set_8h__incl.md5 new file mode 100644 index 0000000..33cc2d4 --- /dev/null +++ b/docs/latex/_individual_data_set_8h__incl.md5 @@ -0,0 +1 @@ +9c81182b263ee3539aa75a5e365b0cd5 \ No newline at end of file diff --git a/docs/latex/_individual_data_set_8h__incl.pdf b/docs/latex/_individual_data_set_8h__incl.pdf new file mode 100644 index 0000000..243345f Binary files /dev/null and b/docs/latex/_individual_data_set_8h__incl.pdf differ diff --git a/docs/latex/_kinship_8cpp.tex b/docs/latex/_kinship_8cpp.tex new file mode 100644 index 0000000..e2320f2 --- /dev/null +++ b/docs/latex/_kinship_8cpp.tex @@ -0,0 +1,12 @@ +\hypertarget{_kinship_8cpp}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Kinship.cpp File Reference} +\label{_kinship_8cpp}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Kinship.\+cpp@{/\+Users/danielruskin/src/hca-\/dev/src/\+Kinship.\+cpp}} +{\ttfamily \#include \char`\"{}Kinship.\+h\char`\"{}}\newline +{\ttfamily \#include $<$cmath$>$}\newline +Include dependency graph for Kinship.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_kinship_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/latex/_kinship_8cpp__incl.md5 b/docs/latex/_kinship_8cpp__incl.md5 new file mode 100644 index 0000000..eb5b37d --- /dev/null +++ b/docs/latex/_kinship_8cpp__incl.md5 @@ -0,0 +1 @@ +e7284b7dbecd748902bb225235ee65d4 \ No newline at end of file diff --git a/docs/latex/_kinship_8cpp__incl.pdf b/docs/latex/_kinship_8cpp__incl.pdf new file mode 100644 index 0000000..664c8fd Binary files /dev/null and b/docs/latex/_kinship_8cpp__incl.pdf differ diff --git a/docs/latex/_kinship_8h.tex b/docs/latex/_kinship_8h.tex new file mode 100644 index 0000000..3b52150 --- /dev/null +++ b/docs/latex/_kinship_8h.tex @@ -0,0 +1,28 @@ +\hypertarget{_kinship_8h}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Kinship.h File Reference} +\label{_kinship_8h}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Kinship.\+h@{/\+Users/danielruskin/src/hca-\/dev/src/\+Kinship.\+h}} +{\ttfamily \#include $<$stdint.\+h$>$}\newline +{\ttfamily \#include $<$iostream$>$}\newline +{\ttfamily \#include $<$armadillo$>$}\newline +{\ttfamily \#include $<$map$>$}\newline +{\ttfamily \#include $<$set$>$}\newline +Include dependency graph for Kinship.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_kinship_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_kinship_8h__dep__incl} +\end{center} +\end{figure} +\subsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \hyperlink{class_kinship}{Kinship} +\begin{DoxyCompactList}\small\item\em A class used to load or generate kinship data. This class must not be used directly; only subclasses should be used. \end{DoxyCompactList}\end{DoxyCompactItemize} diff --git a/docs/latex/_kinship_8h__dep__incl.md5 b/docs/latex/_kinship_8h__dep__incl.md5 new file mode 100644 index 0000000..c8df820 --- /dev/null +++ b/docs/latex/_kinship_8h__dep__incl.md5 @@ -0,0 +1 @@ +1e1d6735743987d5ef6e653083de102b \ No newline at end of file diff --git a/docs/latex/_kinship_8h__dep__incl.pdf b/docs/latex/_kinship_8h__dep__incl.pdf new file mode 100644 index 0000000..f68ea58 Binary files /dev/null and b/docs/latex/_kinship_8h__dep__incl.pdf differ diff --git a/docs/latex/_kinship_8h__incl.md5 b/docs/latex/_kinship_8h__incl.md5 new file mode 100644 index 0000000..60a4fbe --- /dev/null +++ b/docs/latex/_kinship_8h__incl.md5 @@ -0,0 +1 @@ +c525dcd55593f2656b580a04901ae407 \ No newline at end of file diff --git a/docs/latex/_kinship_8h__incl.pdf b/docs/latex/_kinship_8h__incl.pdf new file mode 100644 index 0000000..304be11 Binary files /dev/null and b/docs/latex/_kinship_8h__incl.pdf differ diff --git a/docs/latex/_option_8cpp.tex b/docs/latex/_option_8cpp.tex new file mode 100644 index 0000000..28f0697 --- /dev/null +++ b/docs/latex/_option_8cpp.tex @@ -0,0 +1,12 @@ +\hypertarget{_option_8cpp}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Option.cpp File Reference} +\label{_option_8cpp}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Option.\+cpp@{/\+Users/danielruskin/src/hca-\/dev/src/\+Option.\+cpp}} +{\ttfamily \#include \char`\"{}Option.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Data.\+h\char`\"{}}\newline +Include dependency graph for Option.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_option_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/latex/_option_8cpp__incl.md5 b/docs/latex/_option_8cpp__incl.md5 new file mode 100644 index 0000000..652ba10 --- /dev/null +++ b/docs/latex/_option_8cpp__incl.md5 @@ -0,0 +1 @@ +13a1d358f632a3c2d775fc6059122be9 \ No newline at end of file diff --git a/docs/latex/_option_8cpp__incl.pdf b/docs/latex/_option_8cpp__incl.pdf new file mode 100644 index 0000000..94c8e56 Binary files /dev/null and b/docs/latex/_option_8cpp__incl.pdf differ diff --git a/docs/latex/_option_8h.tex b/docs/latex/_option_8h.tex new file mode 100644 index 0000000..ed1c7fe --- /dev/null +++ b/docs/latex/_option_8h.tex @@ -0,0 +1,26 @@ +\hypertarget{_option_8h}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Option.h File Reference} +\label{_option_8h}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Option.\+h@{/\+Users/danielruskin/src/hca-\/dev/src/\+Option.\+h}} +{\ttfamily \#include $<$iostream$>$}\newline +{\ttfamily \#include $<$stdlib.\+h$>$}\newline +{\ttfamily \#include $<$stdint.\+h$>$}\newline +Include dependency graph for Option.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=266pt]{_option_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_option_8h__dep__incl} +\end{center} +\end{figure} +\subsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \hyperlink{class_option}{Option} +\begin{DoxyCompactList}\small\item\em A class to load all user options. \end{DoxyCompactList}\end{DoxyCompactItemize} diff --git a/docs/latex/_option_8h__dep__incl.md5 b/docs/latex/_option_8h__dep__incl.md5 new file mode 100644 index 0000000..52bc2d2 --- /dev/null +++ b/docs/latex/_option_8h__dep__incl.md5 @@ -0,0 +1 @@ +b4e1cf3fa7f34f479d1de0db4887105f \ No newline at end of file diff --git a/docs/latex/_option_8h__dep__incl.pdf b/docs/latex/_option_8h__dep__incl.pdf new file mode 100644 index 0000000..7e37745 Binary files /dev/null and b/docs/latex/_option_8h__dep__incl.pdf differ diff --git a/docs/latex/_option_8h__incl.md5 b/docs/latex/_option_8h__incl.md5 new file mode 100644 index 0000000..8eba240 --- /dev/null +++ b/docs/latex/_option_8h__incl.md5 @@ -0,0 +1 @@ +82ad4effcc55d4a4440292e626d52c61 \ No newline at end of file diff --git a/docs/latex/_option_8h__incl.pdf b/docs/latex/_option_8h__incl.pdf new file mode 100644 index 0000000..fa13d45 Binary files /dev/null and b/docs/latex/_option_8h__incl.pdf differ diff --git a/docs/latex/_reml_h2r_est_8cpp.tex b/docs/latex/_reml_h2r_est_8cpp.tex new file mode 100644 index 0000000..e92386a --- /dev/null +++ b/docs/latex/_reml_h2r_est_8cpp.tex @@ -0,0 +1,11 @@ +\hypertarget{_reml_h2r_est_8cpp}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Reml\+H2r\+Est.cpp File Reference} +\label{_reml_h2r_est_8cpp}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Reml\+H2r\+Est.\+cpp@{/\+Users/danielruskin/src/hca-\/dev/src/\+Reml\+H2r\+Est.\+cpp}} +{\ttfamily \#include \char`\"{}Reml\+H2r\+Est.\+h\char`\"{}}\newline +Include dependency graph for Reml\+H2r\+Est.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=342pt]{_reml_h2r_est_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/latex/_reml_h2r_est_8cpp__incl.md5 b/docs/latex/_reml_h2r_est_8cpp__incl.md5 new file mode 100644 index 0000000..be86d85 --- /dev/null +++ b/docs/latex/_reml_h2r_est_8cpp__incl.md5 @@ -0,0 +1 @@ +e4c60c345f73b7b59374e0e5cee62e75 \ No newline at end of file diff --git a/docs/latex/_reml_h2r_est_8cpp__incl.pdf b/docs/latex/_reml_h2r_est_8cpp__incl.pdf new file mode 100644 index 0000000..f6d36b3 Binary files /dev/null and b/docs/latex/_reml_h2r_est_8cpp__incl.pdf differ diff --git a/docs/latex/_reml_h2r_est_8h.tex b/docs/latex/_reml_h2r_est_8h.tex new file mode 100644 index 0000000..c59e737 --- /dev/null +++ b/docs/latex/_reml_h2r_est_8h.tex @@ -0,0 +1,26 @@ +\hypertarget{_reml_h2r_est_8h}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Reml\+H2r\+Est.h File Reference} +\label{_reml_h2r_est_8h}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Reml\+H2r\+Est.\+h@{/\+Users/danielruskin/src/hca-\/dev/src/\+Reml\+H2r\+Est.\+h}} +{\ttfamily \#include \char`\"{}Option.\+h\char`\"{}}\newline +{\ttfamily \#include $<$math.\+h$>$}\newline +{\ttfamily \#include $<$armadillo$>$}\newline +Include dependency graph for Reml\+H2r\+Est.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=342pt]{_reml_h2r_est_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_reml_h2r_est_8h__dep__incl} +\end{center} +\end{figure} +\subsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \hyperlink{class_reml_h2r_est}{Reml\+H2r\+Est} +\begin{DoxyCompactList}\small\item\em A class to perform heritability analysis on a given dataset. \end{DoxyCompactList}\end{DoxyCompactItemize} diff --git a/docs/latex/_reml_h2r_est_8h__dep__incl.md5 b/docs/latex/_reml_h2r_est_8h__dep__incl.md5 new file mode 100644 index 0000000..802835f --- /dev/null +++ b/docs/latex/_reml_h2r_est_8h__dep__incl.md5 @@ -0,0 +1 @@ +2a98b5228328004baf0f3e89e21c13e2 \ No newline at end of file diff --git a/docs/latex/_reml_h2r_est_8h__dep__incl.pdf b/docs/latex/_reml_h2r_est_8h__dep__incl.pdf new file mode 100644 index 0000000..adca077 Binary files /dev/null and b/docs/latex/_reml_h2r_est_8h__dep__incl.pdf differ diff --git a/docs/latex/_reml_h2r_est_8h__incl.md5 b/docs/latex/_reml_h2r_est_8h__incl.md5 new file mode 100644 index 0000000..3be882b --- /dev/null +++ b/docs/latex/_reml_h2r_est_8h__incl.md5 @@ -0,0 +1 @@ +f4f2b22f68d803fc6a9de0645f849f3d \ No newline at end of file diff --git a/docs/latex/_reml_h2r_est_8h__incl.pdf b/docs/latex/_reml_h2r_est_8h__incl.pdf new file mode 100644 index 0000000..73c9219 Binary files /dev/null and b/docs/latex/_reml_h2r_est_8h__incl.pdf differ diff --git a/docs/latex/_reml_hca_8cpp.tex b/docs/latex/_reml_hca_8cpp.tex new file mode 100644 index 0000000..50c0e9a --- /dev/null +++ b/docs/latex/_reml_hca_8cpp.tex @@ -0,0 +1,11 @@ +\hypertarget{_reml_hca_8cpp}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Reml\+Hca.cpp File Reference} +\label{_reml_hca_8cpp}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Reml\+Hca.\+cpp@{/\+Users/danielruskin/src/hca-\/dev/src/\+Reml\+Hca.\+cpp}} +{\ttfamily \#include \char`\"{}Reml\+Hca.\+h\char`\"{}}\newline +Include dependency graph for Reml\+Hca.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_reml_hca_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/latex/_reml_hca_8cpp__incl.md5 b/docs/latex/_reml_hca_8cpp__incl.md5 new file mode 100644 index 0000000..a9adbca --- /dev/null +++ b/docs/latex/_reml_hca_8cpp__incl.md5 @@ -0,0 +1 @@ +01966c83b57501ce7fc7b46a9f5aea4c \ No newline at end of file diff --git a/docs/latex/_reml_hca_8cpp__incl.pdf b/docs/latex/_reml_hca_8cpp__incl.pdf new file mode 100644 index 0000000..096abe6 Binary files /dev/null and b/docs/latex/_reml_hca_8cpp__incl.pdf differ diff --git a/docs/latex/_reml_hca_8h.tex b/docs/latex/_reml_hca_8h.tex new file mode 100644 index 0000000..5e5b083 --- /dev/null +++ b/docs/latex/_reml_hca_8h.tex @@ -0,0 +1,28 @@ +\hypertarget{_reml_hca_8h}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Reml\+Hca.h File Reference} +\label{_reml_hca_8h}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Reml\+Hca.\+h@{/\+Users/danielruskin/src/hca-\/dev/src/\+Reml\+Hca.\+h}} +{\ttfamily \#include \char`\"{}Option.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Data.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Reml\+H2r\+Est.\+h\char`\"{}}\newline +{\ttfamily \#include $<$nlopt.\+hpp$>$}\newline +{\ttfamily \#include $<$armadillo$>$}\newline +Include dependency graph for Reml\+Hca.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_reml_hca_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_reml_hca_8h__dep__incl} +\end{center} +\end{figure} +\subsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \hyperlink{class_reml_hca}{Reml\+Hca} +\begin{DoxyCompactList}\small\item\em A class to perform heritable component analysis on a given dataset. \end{DoxyCompactList}\end{DoxyCompactItemize} diff --git a/docs/latex/_reml_hca_8h__dep__incl.md5 b/docs/latex/_reml_hca_8h__dep__incl.md5 new file mode 100644 index 0000000..c9c5a26 --- /dev/null +++ b/docs/latex/_reml_hca_8h__dep__incl.md5 @@ -0,0 +1 @@ +2e5a5bd68a8c9a5e046c7da42c3cd696 \ No newline at end of file diff --git a/docs/latex/_reml_hca_8h__dep__incl.pdf b/docs/latex/_reml_hca_8h__dep__incl.pdf new file mode 100644 index 0000000..5a5fcc9 Binary files /dev/null and b/docs/latex/_reml_hca_8h__dep__incl.pdf differ diff --git a/docs/latex/_reml_hca_8h__incl.md5 b/docs/latex/_reml_hca_8h__incl.md5 new file mode 100644 index 0000000..fdb8798 --- /dev/null +++ b/docs/latex/_reml_hca_8h__incl.md5 @@ -0,0 +1 @@ +bee2fa157fea93bd040c510576cf1396 \ No newline at end of file diff --git a/docs/latex/_reml_hca_8h__incl.pdf b/docs/latex/_reml_hca_8h__incl.pdf new file mode 100644 index 0000000..d5202a7 Binary files /dev/null and b/docs/latex/_reml_hca_8h__incl.pdf differ diff --git a/docs/latex/_scorer_8cpp.tex b/docs/latex/_scorer_8cpp.tex new file mode 100644 index 0000000..11c05b2 --- /dev/null +++ b/docs/latex/_scorer_8cpp.tex @@ -0,0 +1,11 @@ +\hypertarget{_scorer_8cpp}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Scorer.cpp File Reference} +\label{_scorer_8cpp}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Scorer.\+cpp@{/\+Users/danielruskin/src/hca-\/dev/src/\+Scorer.\+cpp}} +{\ttfamily \#include \char`\"{}Scorer.\+h\char`\"{}}\newline +Include dependency graph for Scorer.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_scorer_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/latex/_scorer_8cpp__incl.md5 b/docs/latex/_scorer_8cpp__incl.md5 new file mode 100644 index 0000000..08de577 --- /dev/null +++ b/docs/latex/_scorer_8cpp__incl.md5 @@ -0,0 +1 @@ +62e1f0b860c3696b6e40cbf5d4664f66 \ No newline at end of file diff --git a/docs/latex/_scorer_8cpp__incl.pdf b/docs/latex/_scorer_8cpp__incl.pdf new file mode 100644 index 0000000..bcf6533 Binary files /dev/null and b/docs/latex/_scorer_8cpp__incl.pdf differ diff --git a/docs/latex/_scorer_8h.tex b/docs/latex/_scorer_8h.tex new file mode 100644 index 0000000..6897969 --- /dev/null +++ b/docs/latex/_scorer_8h.tex @@ -0,0 +1,28 @@ +\hypertarget{_scorer_8h}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Scorer.h File Reference} +\label{_scorer_8h}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Scorer.\+h@{/\+Users/danielruskin/src/hca-\/dev/src/\+Scorer.\+h}} +{\ttfamily \#include \char`\"{}Option.\+h\char`\"{}}\newline +{\ttfamily \#include $<$list$>$}\newline +{\ttfamily \#include $<$armadillo$>$}\newline +{\ttfamily \#include \char`\"{}Individual\+Data.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Individual\+Data\+Set.\+h\char`\"{}}\newline +Include dependency graph for Scorer.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_scorer_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_scorer_8h__dep__incl} +\end{center} +\end{figure} +\subsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \hyperlink{class_scorer}{Scorer} +\begin{DoxyCompactList}\small\item\em A class to score users based on their phenotypes and a generated weight. \end{DoxyCompactList}\end{DoxyCompactItemize} diff --git a/docs/latex/_scorer_8h__dep__incl.md5 b/docs/latex/_scorer_8h__dep__incl.md5 new file mode 100644 index 0000000..57e9d51 --- /dev/null +++ b/docs/latex/_scorer_8h__dep__incl.md5 @@ -0,0 +1 @@ +0f1d29e375e02723de50a35a4c7ed87b \ No newline at end of file diff --git a/docs/latex/_scorer_8h__dep__incl.pdf b/docs/latex/_scorer_8h__dep__incl.pdf new file mode 100644 index 0000000..f39b621 Binary files /dev/null and b/docs/latex/_scorer_8h__dep__incl.pdf differ diff --git a/docs/latex/_scorer_8h__incl.md5 b/docs/latex/_scorer_8h__incl.md5 new file mode 100644 index 0000000..ae067d9 --- /dev/null +++ b/docs/latex/_scorer_8h__incl.md5 @@ -0,0 +1 @@ +8b95f9d19d38fd27cf8180aad6bd0dd8 \ No newline at end of file diff --git a/docs/latex/_scorer_8h__incl.pdf b/docs/latex/_scorer_8h__incl.pdf new file mode 100644 index 0000000..d7cccc9 Binary files /dev/null and b/docs/latex/_scorer_8h__incl.pdf differ diff --git a/docs/latex/_snp_kinship_8cpp.tex b/docs/latex/_snp_kinship_8cpp.tex new file mode 100644 index 0000000..7359b89 --- /dev/null +++ b/docs/latex/_snp_kinship_8cpp.tex @@ -0,0 +1,11 @@ +\hypertarget{_snp_kinship_8cpp}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Snp\+Kinship.cpp File Reference} +\label{_snp_kinship_8cpp}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Snp\+Kinship.\+cpp@{/\+Users/danielruskin/src/hca-\/dev/src/\+Snp\+Kinship.\+cpp}} +{\ttfamily \#include \char`\"{}Snp\+Kinship.\+h\char`\"{}}\newline +Include dependency graph for Snp\+Kinship.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_snp_kinship_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/latex/_snp_kinship_8cpp__incl.md5 b/docs/latex/_snp_kinship_8cpp__incl.md5 new file mode 100644 index 0000000..4f347ba --- /dev/null +++ b/docs/latex/_snp_kinship_8cpp__incl.md5 @@ -0,0 +1 @@ +6921875f876f5e8eb61cf4eb9ff82e1d \ No newline at end of file diff --git a/docs/latex/_snp_kinship_8cpp__incl.pdf b/docs/latex/_snp_kinship_8cpp__incl.pdf new file mode 100644 index 0000000..a94efdb Binary files /dev/null and b/docs/latex/_snp_kinship_8cpp__incl.pdf differ diff --git a/docs/latex/_snp_kinship_8h.tex b/docs/latex/_snp_kinship_8h.tex new file mode 100644 index 0000000..eb2e97a --- /dev/null +++ b/docs/latex/_snp_kinship_8h.tex @@ -0,0 +1,26 @@ +\hypertarget{_snp_kinship_8h}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/\+Snp\+Kinship.h File Reference} +\label{_snp_kinship_8h}\index{/\+Users/danielruskin/src/hca-\/dev/src/\+Snp\+Kinship.\+h@{/\+Users/danielruskin/src/hca-\/dev/src/\+Snp\+Kinship.\+h}} +{\ttfamily \#include \char`\"{}Kinship.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Option.\+h\char`\"{}}\newline +{\ttfamily \#include $<$armadillo$>$}\newline +Include dependency graph for Snp\+Kinship.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_snp_kinship_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{_snp_kinship_8h__dep__incl} +\end{center} +\end{figure} +\subsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \hyperlink{class_snp_kinship}{Snp\+Kinship} +\begin{DoxyCompactList}\small\item\em A class to generate a kinship matrix from S\+NP data. \end{DoxyCompactList}\end{DoxyCompactItemize} diff --git a/docs/latex/_snp_kinship_8h__dep__incl.md5 b/docs/latex/_snp_kinship_8h__dep__incl.md5 new file mode 100644 index 0000000..4725015 --- /dev/null +++ b/docs/latex/_snp_kinship_8h__dep__incl.md5 @@ -0,0 +1 @@ +11e2c054aeecfade3253a8e2e3adf016 \ No newline at end of file diff --git a/docs/latex/_snp_kinship_8h__dep__incl.pdf b/docs/latex/_snp_kinship_8h__dep__incl.pdf new file mode 100644 index 0000000..4406391 Binary files /dev/null and b/docs/latex/_snp_kinship_8h__dep__incl.pdf differ diff --git a/docs/latex/_snp_kinship_8h__incl.md5 b/docs/latex/_snp_kinship_8h__incl.md5 new file mode 100644 index 0000000..406266a --- /dev/null +++ b/docs/latex/_snp_kinship_8h__incl.md5 @@ -0,0 +1 @@ +06533717da199a97c5133d9e25cf15a0 \ No newline at end of file diff --git a/docs/latex/_snp_kinship_8h__incl.pdf b/docs/latex/_snp_kinship_8h__incl.pdf new file mode 100644 index 0000000..069e226 Binary files /dev/null and b/docs/latex/_snp_kinship_8h__incl.pdf differ diff --git a/docs/latex/annotated.tex b/docs/latex/annotated.tex new file mode 100644 index 0000000..9df925d --- /dev/null +++ b/docs/latex/annotated.tex @@ -0,0 +1,16 @@ +\section{Class List} +Here are the classes, structs, unions and interfaces with brief descriptions\+:\begin{DoxyCompactList} +\item\contentsline{section}{\hyperlink{class_data}{Data} \\*A class to load all relevant data. Responsible solely for loading data -\/ not for reconciling missing individuals }{\pageref{class_data}}{} +\item\contentsline{section}{\hyperlink{class_given_kinship}{Given\+Kinship} \\*A class to load a pregiven kinship matrix }{\pageref{class_given_kinship}}{} +\item\contentsline{section}{\hyperlink{class_h2r_est}{H2r\+Est} \\*A class used to perform heritability analysis }{\pageref{class_h2r_est}}{} +\item\contentsline{section}{\hyperlink{class_hca}{Hca} \\*A class used to perform heritable component analysis }{\pageref{class_hca}}{} +\item\contentsline{section}{\hyperlink{class_individual_data}{Individual\+Data} \\*A class to represent data associated with a given individual }{\pageref{class_individual_data}}{} +\item\contentsline{section}{\hyperlink{class_individual_data_set}{Individual\+Data\+Set} \\*A class to keep track of and reconcile \hyperlink{class_individual_data}{Individual\+Data} objects }{\pageref{class_individual_data_set}}{} +\item\contentsline{section}{\hyperlink{class_kinship}{Kinship} \\*A class used to load or generate kinship data. This class must not be used directly; only subclasses should be used }{\pageref{class_kinship}}{} +\item\contentsline{section}{\hyperlink{class_option}{Option} \\*A class to load all user options }{\pageref{class_option}}{} +\item\contentsline{section}{\hyperlink{class_reml_h2r_est}{Reml\+H2r\+Est} \\*A class to perform heritability analysis on a given dataset }{\pageref{class_reml_h2r_est}}{} +\item\contentsline{section}{\hyperlink{class_reml_hca}{Reml\+Hca} \\*A class to perform heritable component analysis on a given dataset }{\pageref{class_reml_hca}}{} +\item\contentsline{section}{\hyperlink{class_scorer}{Scorer} \\*A class to score users based on their phenotypes and a generated weight }{\pageref{class_scorer}}{} +\item\contentsline{section}{\hyperlink{class_snp_kinship}{Snp\+Kinship} \\*A class to generate a kinship matrix from S\+NP data }{\pageref{class_snp_kinship}}{} +\item\contentsline{section}{\hyperlink{class_util}{Util} }{\pageref{class_util}}{} +\end{DoxyCompactList} diff --git a/docs/latex/class_data.tex b/docs/latex/class_data.tex new file mode 100644 index 0000000..a8a6c3a --- /dev/null +++ b/docs/latex/class_data.tex @@ -0,0 +1,82 @@ +\hypertarget{class_data}{}\section{Data Class Reference} +\label{class_data}\index{Data@{Data}} + + +A class to load all relevant data. Responsible solely for loading data -\/ not for reconciling missing individuals. + + + + +{\ttfamily \#include $<$Data.\+h$>$} + + + +Collaboration diagram for Data\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=219pt]{class_data__coll__graph} +\end{center} +\end{figure} +\subsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{class_data_ae1319726a459a90bc203b3550b78e558}\label{class_data_ae1319726a459a90bc203b3550b78e558}} +\hyperlink{class_data_ae1319726a459a90bc203b3550b78e558}{Data} (\hyperlink{class_option}{Option} \&option) +\begin{DoxyCompactList}\small\item\em A constructor. \end{DoxyCompactList}\item +void \hyperlink{class_data_af103fced88bc1ea697fd6ae9f32bd15f}{load} (\hyperlink{class_option}{Option} \&option) +\begin{DoxyCompactList}\small\item\em Loads data based on the provided option argument. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_data_a98f3c36d2c92812b15be1ede5ba08986}\label{class_data_a98f3c36d2c92812b15be1ede5ba08986}} +void \hyperlink{class_data_a98f3c36d2c92812b15be1ede5ba08986}{write\+Kinship} (std\+::string out\+Dir) +\begin{DoxyCompactList}\small\item\em Writes the \hyperlink{class_kinship}{Kinship} file to disk. \end{DoxyCompactList}\end{DoxyCompactItemize} +\subsection*{Public Attributes} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{class_data_a61adff3d9c24eb86a754b08d39fb1e48}\label{class_data_a61adff3d9c24eb86a754b08d39fb1e48}} +\hyperlink{class_individual_data_set}{Individual\+Data\+Set} {\bfseries individual\+Data\+Set} +\item +\mbox{\Hypertarget{class_data_a7996ee33b569fc2f67568ec04c16158c}\label{class_data_a7996ee33b569fc2f67568ec04c16158c}} +arma\+::mat {\bfseries trait} +\item +\mbox{\Hypertarget{class_data_a6471ad4b3fafd2270f5f1076e70a67ce}\label{class_data_a6471ad4b3fafd2270f5f1076e70a67ce}} +std\+::vector$<$ double $>$ {\bfseries lambda\+Vec} +\item +\mbox{\Hypertarget{class_data_a191cf84ef250f6aa792b77beb2a0b4a0}\label{class_data_a191cf84ef250f6aa792b77beb2a0b4a0}} +std\+::vector$<$ \hyperlink{class_scorer}{Scorer} $>$ {\bfseries scorers} +\end{DoxyCompactItemize} + + +\subsection{Detailed Description} +A class to load all relevant data. Responsible solely for loading data -\/ not for reconciling missing individuals. + +Loads data into the user\+Data\+Set, trait, lambda\+Vec, and scorers fields. + +\subsection{Member Function Documentation} +\mbox{\Hypertarget{class_data_af103fced88bc1ea697fd6ae9f32bd15f}\label{class_data_af103fced88bc1ea697fd6ae9f32bd15f}} +\index{Data@{Data}!load@{load}} +\index{load@{load}!Data@{Data}} +\subsubsection{\texorpdfstring{load()}{load()}} +{\footnotesize\ttfamily void Data\+::load (\begin{DoxyParamCaption}\item[{\hyperlink{class_option}{Option} \&}]{option }\end{DoxyParamCaption})} + + + +Loads data based on the provided option argument. + +Loads the following individual-\/specific data\+: +\begin{DoxyEnumerate} +\item F\+AM data +\item S\+NP data +\item Phenotype data +\item Covariate data (quantitative and categorial/discrete) +\end{DoxyEnumerate} + +Loads the following non-\/individual-\/specific data\+: +\begin{DoxyEnumerate} +\item Trait file (for scoring) +\item Lambda vector file +\end{DoxyEnumerate} + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/\+Users/danielruskin/src/hca-\/dev/src/Data.\+h\item +/\+Users/danielruskin/src/hca-\/dev/src/Data.\+cpp\end{DoxyCompactItemize} diff --git a/docs/latex/class_data__coll__graph.md5 b/docs/latex/class_data__coll__graph.md5 new file mode 100644 index 0000000..9e7389b --- /dev/null +++ b/docs/latex/class_data__coll__graph.md5 @@ -0,0 +1 @@ +9ef440043ead9dfd082a07158239412b \ No newline at end of file diff --git a/docs/latex/class_data__coll__graph.pdf b/docs/latex/class_data__coll__graph.pdf new file mode 100644 index 0000000..6d8c18f Binary files /dev/null and b/docs/latex/class_data__coll__graph.pdf differ diff --git a/docs/latex/class_given_kinship.tex b/docs/latex/class_given_kinship.tex new file mode 100644 index 0000000..15dcb02 --- /dev/null +++ b/docs/latex/class_given_kinship.tex @@ -0,0 +1,47 @@ +\hypertarget{class_given_kinship}{}\section{Given\+Kinship Class Reference} +\label{class_given_kinship}\index{Given\+Kinship@{Given\+Kinship}} + + +A class to load a pregiven kinship matrix. + + + + +{\ttfamily \#include $<$Given\+Kinship.\+h$>$} + + + +Inheritance diagram for Given\+Kinship\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=154pt]{class_given_kinship__inherit__graph} +\end{center} +\end{figure} + + +Collaboration diagram for Given\+Kinship\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=154pt]{class_given_kinship__coll__graph} +\end{center} +\end{figure} +\subsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{class_given_kinship_a1d04e3b823dc5d2dc083a79d4c96b7b1}\label{class_given_kinship_a1d04e3b823dc5d2dc083a79d4c96b7b1}} +void \hyperlink{class_given_kinship_a1d04e3b823dc5d2dc083a79d4c96b7b1}{construct} (std\+::string kinshipfile, std\+::string kinshipidfile) +\begin{DoxyCompactList}\small\item\em Constructor. Loads and parses the kinship file into a matrix. \end{DoxyCompactList}\end{DoxyCompactItemize} +\subsection*{Additional Inherited Members} + + +\subsection{Detailed Description} +A class to load a pregiven kinship matrix. + +Used if ks\+Src is pregiven. + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/\+Users/danielruskin/src/hca-\/dev/src/Given\+Kinship.\+h\item +/\+Users/danielruskin/src/hca-\/dev/src/Given\+Kinship.\+cpp\end{DoxyCompactItemize} diff --git a/docs/latex/class_given_kinship__coll__graph.md5 b/docs/latex/class_given_kinship__coll__graph.md5 new file mode 100644 index 0000000..664e581 --- /dev/null +++ b/docs/latex/class_given_kinship__coll__graph.md5 @@ -0,0 +1 @@ +7e6efe7f916175bf448f73c5053c4285 \ No newline at end of file diff --git a/docs/latex/class_given_kinship__coll__graph.pdf b/docs/latex/class_given_kinship__coll__graph.pdf new file mode 100644 index 0000000..3405225 Binary files /dev/null and b/docs/latex/class_given_kinship__coll__graph.pdf differ diff --git a/docs/latex/class_given_kinship__inherit__graph.md5 b/docs/latex/class_given_kinship__inherit__graph.md5 new file mode 100644 index 0000000..f159ca5 --- /dev/null +++ b/docs/latex/class_given_kinship__inherit__graph.md5 @@ -0,0 +1 @@ +9f31ea4b54364e599008fa2ed7ac336c \ No newline at end of file diff --git a/docs/latex/class_given_kinship__inherit__graph.pdf b/docs/latex/class_given_kinship__inherit__graph.pdf new file mode 100644 index 0000000..3405225 Binary files /dev/null and b/docs/latex/class_given_kinship__inherit__graph.pdf differ diff --git a/docs/latex/class_h2r_est.tex b/docs/latex/class_h2r_est.tex new file mode 100644 index 0000000..19ca901 --- /dev/null +++ b/docs/latex/class_h2r_est.tex @@ -0,0 +1,37 @@ +\hypertarget{class_h2r_est}{}\section{H2r\+Est Class Reference} +\label{class_h2r_est}\index{H2r\+Est@{H2r\+Est}} + + +A class used to perform heritability analysis. + + + + +{\ttfamily \#include $<$H2r\+Est.\+h$>$} + + + +Inheritance diagram for H2r\+Est\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=168pt]{class_h2r_est__inherit__graph} +\end{center} +\end{figure} + + +Collaboration diagram for H2r\+Est\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=126pt]{class_h2r_est__coll__graph} +\end{center} +\end{figure} + + +\subsection{Detailed Description} +A class used to perform heritability analysis. + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +/\+Users/danielruskin/src/hca-\/dev/src/H2r\+Est.\+h\end{DoxyCompactItemize} diff --git a/docs/latex/class_h2r_est__coll__graph.md5 b/docs/latex/class_h2r_est__coll__graph.md5 new file mode 100644 index 0000000..373da14 --- /dev/null +++ b/docs/latex/class_h2r_est__coll__graph.md5 @@ -0,0 +1 @@ +23c4e07dac69dd36f231440e70ab0898 \ No newline at end of file diff --git a/docs/latex/class_h2r_est__coll__graph.pdf b/docs/latex/class_h2r_est__coll__graph.pdf new file mode 100644 index 0000000..492bdf5 Binary files /dev/null and b/docs/latex/class_h2r_est__coll__graph.pdf differ diff --git a/docs/latex/class_h2r_est__inherit__graph.md5 b/docs/latex/class_h2r_est__inherit__graph.md5 new file mode 100644 index 0000000..90668b8 --- /dev/null +++ b/docs/latex/class_h2r_est__inherit__graph.md5 @@ -0,0 +1 @@ +d28b7bee5d49698809fc8aa31bd5fd55 \ No newline at end of file diff --git a/docs/latex/class_h2r_est__inherit__graph.pdf b/docs/latex/class_h2r_est__inherit__graph.pdf new file mode 100644 index 0000000..08d10a2 Binary files /dev/null and b/docs/latex/class_h2r_est__inherit__graph.pdf differ diff --git a/docs/latex/class_hca.tex b/docs/latex/class_hca.tex new file mode 100644 index 0000000..177acc5 --- /dev/null +++ b/docs/latex/class_hca.tex @@ -0,0 +1,37 @@ +\hypertarget{class_hca}{}\section{Hca Class Reference} +\label{class_hca}\index{Hca@{Hca}} + + +A class used to perform heritable component analysis. + + + + +{\ttfamily \#include $<$Hca.\+h$>$} + + + +Inheritance diagram for Hca\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=194pt]{class_hca__inherit__graph} +\end{center} +\end{figure} + + +Collaboration diagram for Hca\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=112pt]{class_hca__coll__graph} +\end{center} +\end{figure} + + +\subsection{Detailed Description} +A class used to perform heritable component analysis. + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +/\+Users/danielruskin/src/hca-\/dev/src/Hca.\+h\end{DoxyCompactItemize} diff --git a/docs/latex/class_hca__coll__graph.md5 b/docs/latex/class_hca__coll__graph.md5 new file mode 100644 index 0000000..5b60e6f --- /dev/null +++ b/docs/latex/class_hca__coll__graph.md5 @@ -0,0 +1 @@ +0832130c435c11bfe6ad48e24533a95f \ No newline at end of file diff --git a/docs/latex/class_hca__coll__graph.pdf b/docs/latex/class_hca__coll__graph.pdf new file mode 100644 index 0000000..9199fc1 Binary files /dev/null and b/docs/latex/class_hca__coll__graph.pdf differ diff --git a/docs/latex/class_hca__inherit__graph.md5 b/docs/latex/class_hca__inherit__graph.md5 new file mode 100644 index 0000000..029a5e5 --- /dev/null +++ b/docs/latex/class_hca__inherit__graph.md5 @@ -0,0 +1 @@ +31503d6872f51dcbe5c84847a77e04ca \ No newline at end of file diff --git a/docs/latex/class_hca__inherit__graph.pdf b/docs/latex/class_hca__inherit__graph.pdf new file mode 100644 index 0000000..f683295 Binary files /dev/null and b/docs/latex/class_hca__inherit__graph.pdf differ diff --git a/docs/latex/class_individual_data.tex b/docs/latex/class_individual_data.tex new file mode 100644 index 0000000..c32e8cc --- /dev/null +++ b/docs/latex/class_individual_data.tex @@ -0,0 +1,91 @@ +\hypertarget{class_individual_data}{}\section{Individual\+Data Class Reference} +\label{class_individual_data}\index{Individual\+Data@{Individual\+Data}} + + +A class to represent data associated with a given individual. + + + + +{\ttfamily \#include $<$Individual\+Data.\+h$>$} + + + +Collaboration diagram for Individual\+Data\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=192pt]{class_individual_data__coll__graph} +\end{center} +\end{figure} +\subsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{class_individual_data_a49a3e8d40b9eb8c8582d8efb4b0c1bb5}\label{class_individual_data_a49a3e8d40b9eb8c8582d8efb4b0c1bb5}} +std\+::vector$<$ double $>$ \& \hyperlink{class_individual_data_a49a3e8d40b9eb8c8582d8efb4b0c1bb5}{get\+Ped} () +\begin{DoxyCompactList}\small\item\em Returns P\+ED data for this individual. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_aa25cd8a20812ec9533089b8301c0318d}\label{class_individual_data_aa25cd8a20812ec9533089b8301c0318d}} +std\+::vector$<$ double $>$ \& \hyperlink{class_individual_data_aa25cd8a20812ec9533089b8301c0318d}{get\+Phen} () +\begin{DoxyCompactList}\small\item\em Returns phenotypic data for this individual. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_a137605ca9bb5f1b153d078e96fa00bb8}\label{class_individual_data_a137605ca9bb5f1b153d078e96fa00bb8}} +std\+::vector$<$ double $>$ \& \hyperlink{class_individual_data_a137605ca9bb5f1b153d078e96fa00bb8}{get\+Q\+Cov} () +\begin{DoxyCompactList}\small\item\em Returns quantitative covariate data for this individual. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_adf02b65cc7645640d64f2eae90e1e15b}\label{class_individual_data_adf02b65cc7645640d64f2eae90e1e15b}} +std\+::vector$<$ double $>$ \& \hyperlink{class_individual_data_adf02b65cc7645640d64f2eae90e1e15b}{get\+C\+Cov} () +\begin{DoxyCompactList}\small\item\em Returns categorical covariate data for this individual. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_a13f03a99eb8d93edbc2bee5d1d7e25b0}\label{class_individual_data_a13f03a99eb8d93edbc2bee5d1d7e25b0}} +void \hyperlink{class_individual_data_a13f03a99eb8d93edbc2bee5d1d7e25b0}{set\+Str\+Id} (std\+::string str\+Id\+New) +\begin{DoxyCompactList}\small\item\em Sets the string ID for this individual (i.\+e. the ID provided in input files). \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_af6dde62326e0d3696b5456e472451ac0}\label{class_individual_data_af6dde62326e0d3696b5456e472451ac0}} +std\+::string \hyperlink{class_individual_data_af6dde62326e0d3696b5456e472451ac0}{get\+Str\+Id} () const +\begin{DoxyCompactList}\small\item\em Returns the string ID for this individual. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_ae9c5fa72191ea89a63b16422256dd13c}\label{class_individual_data_ae9c5fa72191ea89a63b16422256dd13c}} +void \hyperlink{class_individual_data_ae9c5fa72191ea89a63b16422256dd13c}{set\+Pregiven\+Grm\+Id} (int id\+New) +\begin{DoxyCompactList}\small\item\em Sets this individual\textquotesingle{}s position in the pregiven G\+RM. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_a8fec70aa6005b7d85ae9e8bb255e53fb}\label{class_individual_data_a8fec70aa6005b7d85ae9e8bb255e53fb}} +int \hyperlink{class_individual_data_a8fec70aa6005b7d85ae9e8bb255e53fb}{get\+Pregiven\+Grm\+Id} () const +\begin{DoxyCompactList}\small\item\em Returns this individual\textquotesingle{}s position in the pregiven G\+RM. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_a1a59a84bd7e1ff6652246c4c885cfa38}\label{class_individual_data_a1a59a84bd7e1ff6652246c4c885cfa38}} +void \hyperlink{class_individual_data_a1a59a84bd7e1ff6652246c4c885cfa38}{set\+New\+Grm\+Id} (int id\+New) +\begin{DoxyCompactList}\small\item\em Sets this individual\textquotesingle{}s position in the final G\+RM. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_a15466375800cc1dd62b31f86e8f9190e}\label{class_individual_data_a15466375800cc1dd62b31f86e8f9190e}} +int \hyperlink{class_individual_data_a15466375800cc1dd62b31f86e8f9190e}{get\+New\+Grm\+Id} () const +\begin{DoxyCompactList}\small\item\em Returns this individual\textquotesingle{}s position in the final G\+RM. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_a9c0690094ce9cab9eba2f6b352213ffe}\label{class_individual_data_a9c0690094ce9cab9eba2f6b352213ffe}} +void \hyperlink{class_individual_data_a9c0690094ce9cab9eba2f6b352213ffe}{set\+Ped\+Id} (int id\+New) +\begin{DoxyCompactList}\small\item\em Sets this individual\textquotesingle{}s position in the genotypic data matrix. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_a62f9e329c479fdc35ebb57b0463b70df}\label{class_individual_data_a62f9e329c479fdc35ebb57b0463b70df}} +int \hyperlink{class_individual_data_a62f9e329c479fdc35ebb57b0463b70df}{get\+Ped\+Id} () const +\begin{DoxyCompactList}\small\item\em Returns this individual\textquotesingle{}s position in the genotypic data matrix. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_aca3dac1ae763cc778313bca3ecac2fbc}\label{class_individual_data_aca3dac1ae763cc778313bca3ecac2fbc}} +void \hyperlink{class_individual_data_aca3dac1ae763cc778313bca3ecac2fbc}{set\+Num\+Missing\+Geno\+Values} (int num\+Missing\+Geno\+Values\+New) +\begin{DoxyCompactList}\small\item\em Sets the number of missing genotypic values for this individual. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_a72c37be530afc78e506a19af418b5259}\label{class_individual_data_a72c37be530afc78e506a19af418b5259}} +int \hyperlink{class_individual_data_a72c37be530afc78e506a19af418b5259}{get\+Num\+Missing\+Geno\+Values} () +\begin{DoxyCompactList}\small\item\em Returns the number of missing genotypic values for this individual. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_a4ed3b9d923743e0b5b86cfbc4314d8f2}\label{class_individual_data_a4ed3b9d923743e0b5b86cfbc4314d8f2}} +void \hyperlink{class_individual_data_a4ed3b9d923743e0b5b86cfbc4314d8f2}{add\+Ped\+Data} (std\+::vector$<$ double $>$ \&ped\+New) +\begin{DoxyCompactList}\small\item\em Adds data from the P\+ED file to this individual. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_abfc9899daaf19d3cf501247e791558dc}\label{class_individual_data_abfc9899daaf19d3cf501247e791558dc}} +void \hyperlink{class_individual_data_abfc9899daaf19d3cf501247e791558dc}{reset\+Phen\+Data} () +\begin{DoxyCompactList}\small\item\em Deletes all phenotypic data on this individual. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_a885711b2191a3181e8197769c77d85df}\label{class_individual_data_a885711b2191a3181e8197769c77d85df}} +void \hyperlink{class_individual_data_a885711b2191a3181e8197769c77d85df}{add\+Phen\+Data} (std\+::vector$<$ double $>$ \&phen\+New) +\begin{DoxyCompactList}\small\item\em Adds phenotypic data to this individual. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_a42fc4d5cdb994e5c8ef2877c68e23b6a}\label{class_individual_data_a42fc4d5cdb994e5c8ef2877c68e23b6a}} +void \hyperlink{class_individual_data_a42fc4d5cdb994e5c8ef2877c68e23b6a}{add\+Q\+Cov\+Data} (std\+::vector$<$ double $>$ \&q\+Cov\+New) +\begin{DoxyCompactList}\small\item\em Adds quantitative covariate data to this individual. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_a8caf856e4f6c7d526743ff05b29c9661}\label{class_individual_data_a8caf856e4f6c7d526743ff05b29c9661}} +void \hyperlink{class_individual_data_a8caf856e4f6c7d526743ff05b29c9661}{add\+C\+Cov\+Data} (std\+::vector$<$ double $>$ \&c\+Cov\+New) +\begin{DoxyCompactList}\small\item\em Adds categorical covariate data to this individual. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\subsection{Detailed Description} +A class to represent data associated with a given individual. + +\hyperlink{class_individual_data}{Individual\+Data} objects are generally kept track of with a \hyperlink{class_individual_data_set}{Individual\+Data\+Set}. + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/\+Users/danielruskin/src/hca-\/dev/src/Individual\+Data.\+h\item +/\+Users/danielruskin/src/hca-\/dev/src/Individual\+Data.\+cpp\end{DoxyCompactItemize} diff --git a/docs/latex/class_individual_data__coll__graph.md5 b/docs/latex/class_individual_data__coll__graph.md5 new file mode 100644 index 0000000..5b419a8 --- /dev/null +++ b/docs/latex/class_individual_data__coll__graph.md5 @@ -0,0 +1 @@ +b18385fd3fc23f2f3db437fe1346c01c \ No newline at end of file diff --git a/docs/latex/class_individual_data__coll__graph.pdf b/docs/latex/class_individual_data__coll__graph.pdf new file mode 100644 index 0000000..2246ebd Binary files /dev/null and b/docs/latex/class_individual_data__coll__graph.pdf differ diff --git a/docs/latex/class_individual_data_set.tex b/docs/latex/class_individual_data_set.tex new file mode 100644 index 0000000..d0a7d8e --- /dev/null +++ b/docs/latex/class_individual_data_set.tex @@ -0,0 +1,147 @@ +\hypertarget{class_individual_data_set}{}\section{Individual\+Data\+Set Class Reference} +\label{class_individual_data_set}\index{Individual\+Data\+Set@{Individual\+Data\+Set}} + + +A class to keep track of and reconcile \hyperlink{class_individual_data}{Individual\+Data} objects. + + + + +{\ttfamily \#include $<$Individual\+Data\+Set.\+h$>$} + + + +Collaboration diagram for Individual\+Data\+Set\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=186pt]{class_individual_data_set__coll__graph} +\end{center} +\end{figure} +\subsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{class_individual_data_set_a7ded1f43f59309e65612ba689480e088}\label{class_individual_data_set_a7ded1f43f59309e65612ba689480e088}} +void \hyperlink{class_individual_data_set_a7ded1f43f59309e65612ba689480e088}{adding\+Ped\+Data} () +\begin{DoxyCompactList}\small\item\em Indicate that P\+ED data will be added to this \hyperlink{class_individual_data_set}{Individual\+Data\+Set}. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a7360d8dd1487fa64cc42c5deb979021d}\label{class_individual_data_set_a7360d8dd1487fa64cc42c5deb979021d}} +void \hyperlink{class_individual_data_set_a7360d8dd1487fa64cc42c5deb979021d}{add\+Ped\+Data} (std\+::string id, int ped\+Id, std\+::vector$<$ double $>$ \&ped\+Data) +\begin{DoxyCompactList}\small\item\em Add P\+ED data to this \hyperlink{class_individual_data_set}{Individual\+Data\+Set}, for the provided individual ID. \end{DoxyCompactList}\item +void \hyperlink{class_individual_data_set_ac3213f3016f5e404bda4235ed31caddf}{adding\+Phen\+Data} () +\begin{DoxyCompactList}\small\item\em Indicate that phenotypic data will be added to this \hyperlink{class_individual_data_set}{Individual\+Data\+Set}. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a86e72d91ce939e489687fd16666dd318}\label{class_individual_data_set_a86e72d91ce939e489687fd16666dd318}} +void \hyperlink{class_individual_data_set_a86e72d91ce939e489687fd16666dd318}{add\+Phen\+Data} (std\+::string id, std\+::vector$<$ double $>$ \&phen\+Data) +\begin{DoxyCompactList}\small\item\em Add phenotypic data to this \hyperlink{class_individual_data_set}{Individual\+Data\+Set}, for the provided individual ID. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_aa7cfd9afb873abebe3d48a51f5388124}\label{class_individual_data_set_aa7cfd9afb873abebe3d48a51f5388124}} +void \hyperlink{class_individual_data_set_aa7cfd9afb873abebe3d48a51f5388124}{adding\+Q\+Cov\+Data} () +\begin{DoxyCompactList}\small\item\em Indicate that quantitative covariate data will be added to this \hyperlink{class_individual_data_set}{Individual\+Data\+Set}. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a83c8392469827b88a276e748033af8ff}\label{class_individual_data_set_a83c8392469827b88a276e748033af8ff}} +void \hyperlink{class_individual_data_set_a83c8392469827b88a276e748033af8ff}{add\+Q\+Cov\+Data} (std\+::string id, std\+::vector$<$ double $>$ \&q\+Cov\+Data) +\begin{DoxyCompactList}\small\item\em Add quantitative covariate data to this \hyperlink{class_individual_data_set}{Individual\+Data\+Set}, for the provided individual ID. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a610c3eb4f63aed39dc2c9e52e1b1b2e2}\label{class_individual_data_set_a610c3eb4f63aed39dc2c9e52e1b1b2e2}} +void \hyperlink{class_individual_data_set_a610c3eb4f63aed39dc2c9e52e1b1b2e2}{adding\+C\+Cov\+Data} () +\begin{DoxyCompactList}\small\item\em Indicate that categorical covariate data will be added to this \hyperlink{class_individual_data_set}{Individual\+Data\+Set}. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a089c41e85d418bf14f31dd1330fea2f1}\label{class_individual_data_set_a089c41e85d418bf14f31dd1330fea2f1}} +void \hyperlink{class_individual_data_set_a089c41e85d418bf14f31dd1330fea2f1}{add\+C\+Cov\+Data} (std\+::string id, std\+::vector$<$ double $>$ \&c\+Cov\+Data) +\begin{DoxyCompactList}\small\item\em Add categorical covariate data to this \hyperlink{class_individual_data_set}{Individual\+Data\+Set}, for the provided individual ID. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a19e0b2d2bf86850b6c0af574df29b688}\label{class_individual_data_set_a19e0b2d2bf86850b6c0af574df29b688}} +void \hyperlink{class_individual_data_set_a19e0b2d2bf86850b6c0af574df29b688}{adding\+Chr\+Data} () +\begin{DoxyCompactList}\small\item\em Indicate that chromsome data will be added to this \hyperlink{class_individual_data_set}{Individual\+Data\+Set}. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a5b7b119dee43a383b1db402a134ac24f}\label{class_individual_data_set_a5b7b119dee43a383b1db402a134ac24f}} +void \hyperlink{class_individual_data_set_a5b7b119dee43a383b1db402a134ac24f}{set\+Chr\+Data} (std\+::vector$<$ int $>$ \&chr\+New) +\begin{DoxyCompactList}\small\item\em Add chromosome data to this \hyperlink{class_individual_data_set}{Individual\+Data\+Set}. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_aa77a30a3f5219bf47c585670e6bb7578}\label{class_individual_data_set_aa77a30a3f5219bf47c585670e6bb7578}} +void \hyperlink{class_individual_data_set_aa77a30a3f5219bf47c585670e6bb7578}{setting\+Geno\+Data} () +\begin{DoxyCompactList}\small\item\em Indicate that genotypic data will be added to this \hyperlink{class_individual_data_set}{Individual\+Data\+Set}. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a92e85a50fe23ad05d4ffde3127091cd4}\label{class_individual_data_set_a92e85a50fe23ad05d4ffde3127091cd4}} +void \hyperlink{class_individual_data_set_a92e85a50fe23ad05d4ffde3127091cd4}{set\+Geno\+Data} (arma\+::mat \&geno\+New, std\+::vector$<$ int $>$ num\+Missing\+Values) +\begin{DoxyCompactList}\small\item\em Add genotypic data to this \hyperlink{class_individual_data_set}{Individual\+Data\+Set}. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_aecc26260e462473c94288edfc5cdca20}\label{class_individual_data_set_aecc26260e462473c94288edfc5cdca20}} +void \hyperlink{class_individual_data_set_aecc26260e462473c94288edfc5cdca20}{set\+Option} (\hyperlink{class_option}{Option} \&option\+New) +\begin{DoxyCompactList}\small\item\em Sets the \hyperlink{class_option}{Option} object on this individual\+Data\+Set. \end{DoxyCompactList}\item +void \hyperlink{class_individual_data_set_ab449377333865d812e1ebd37b7f845dc}{reconcile} () +\begin{DoxyCompactList}\small\item\em Reconciles data by removing individuals with missing data. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a54cdc9472ab575a3e66ba0dbfa03cb24}\label{class_individual_data_set_a54cdc9472ab575a3e66ba0dbfa03cb24}} +int \hyperlink{class_individual_data_set_a54cdc9472ab575a3e66ba0dbfa03cb24}{get\+Num\+Subjects} () +\begin{DoxyCompactList}\small\item\em Returns the number of individuals currently being kept track of. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a4c00be812a03b7c421b6b3581c50e9b0}\label{class_individual_data_set_a4c00be812a03b7c421b6b3581c50e9b0}} +bool \hyperlink{class_individual_data_set_a4c00be812a03b7c421b6b3581c50e9b0}{get\+Cov\+Added} () +\begin{DoxyCompactList}\small\item\em Returns true if covariate data has been added. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_aa34ec55d33ad69b64630d71fc24b3138}\label{class_individual_data_set_aa34ec55d33ad69b64630d71fc24b3138}} +arma\+::mat \& \hyperlink{class_individual_data_set_aa34ec55d33ad69b64630d71fc24b3138}{get\+Geno} () +\begin{DoxyCompactList}\small\item\em Returns the generated genotypic data matrix. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a48b372129e0e5f5ee973f911c3f052a0}\label{class_individual_data_set_a48b372129e0e5f5ee973f911c3f052a0}} +std\+::vector$<$ int $>$ \& \hyperlink{class_individual_data_set_a48b372129e0e5f5ee973f911c3f052a0}{get\+Chr} () +\begin{DoxyCompactList}\small\item\em Returns the provided chromosome data. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a844822ee19700a1da8412961724d5d25}\label{class_individual_data_set_a844822ee19700a1da8412961724d5d25}} +arma\+::mat \& \hyperlink{class_individual_data_set_a844822ee19700a1da8412961724d5d25}{get\+AN} () +\begin{DoxyCompactList}\small\item\em Returns the AN matrix (only available if the matrix was generated from S\+NP data). \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a98000f81dcc25f6caa55060c0e84ebf7}\label{class_individual_data_set_a98000f81dcc25f6caa55060c0e84ebf7}} +arma\+::mat \& \hyperlink{class_individual_data_set_a98000f81dcc25f6caa55060c0e84ebf7}{get\+Grm} (int idx) +\begin{DoxyCompactList}\small\item\em Returns the generated genetic relationship matrix. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a300ebab7735f66d7108763f18b371c24}\label{class_individual_data_set_a300ebab7735f66d7108763f18b371c24}} +arma\+::mat \& \hyperlink{class_individual_data_set_a300ebab7735f66d7108763f18b371c24}{get\+Cov} (int idx) +\begin{DoxyCompactList}\small\item\em Returns the covariate data associated with the given index (based on split number). \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_aab60162ef85cef800d9abb07f5835604}\label{class_individual_data_set_aab60162ef85cef800d9abb07f5835604}} +arma\+::mat \& \hyperlink{class_individual_data_set_aab60162ef85cef800d9abb07f5835604}{get\+Phen} (int idx) +\begin{DoxyCompactList}\small\item\em Returns the phenotypic data associated with the given index (based on split number). \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a944d5406ba3751566bb3c9259de72265}\label{class_individual_data_set_a944d5406ba3751566bb3c9259de72265}} +arma\+::mat \& \hyperlink{class_individual_data_set_a944d5406ba3751566bb3c9259de72265}{get\+Grm\+Without\+Split} (int idx) +\begin{DoxyCompactList}\small\item\em Returns the G\+RM data with all individuals E\+X\+C\+E\+PT for those in the provided split number. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a0b28fc2bfce2a0233bc52233cefb64ff}\label{class_individual_data_set_a0b28fc2bfce2a0233bc52233cefb64ff}} +arma\+::mat \& \hyperlink{class_individual_data_set_a0b28fc2bfce2a0233bc52233cefb64ff}{get\+Cov\+Without\+Split} (int idx) +\begin{DoxyCompactList}\small\item\em Returns the covariates with all individuals E\+X\+C\+E\+PT for those in the provided split number. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a5aa39b3457d95d7f85824aa1761bfab9}\label{class_individual_data_set_a5aa39b3457d95d7f85824aa1761bfab9}} +arma\+::mat \& \hyperlink{class_individual_data_set_a5aa39b3457d95d7f85824aa1761bfab9}{get\+Phen\+Without\+Split} (int idx) +\begin{DoxyCompactList}\small\item\em Returns the phenotypic data with all individuals E\+X\+C\+E\+PT for those in the provided split number. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a32f66ecb52e7b716b5c3155809fa706a}\label{class_individual_data_set_a32f66ecb52e7b716b5c3155809fa706a}} +arma\+::mat \& \hyperlink{class_individual_data_set_a32f66ecb52e7b716b5c3155809fa706a}{get\+Ped} () +\begin{DoxyCompactList}\small\item\em Returns the P\+ED data associated with the given index (based on split number). \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a01d203698f124fc2d8358b014aff47b4}\label{class_individual_data_set_a01d203698f124fc2d8358b014aff47b4}} +std\+::vector$<$ std\+::vector$<$ std\+::string $>$ $>$ \& \hyperlink{class_individual_data_set_a01d203698f124fc2d8358b014aff47b4}{get\+Split\+Part\+Ids} () +\begin{DoxyCompactList}\small\item\em Returns the I\+Ds associated with each \char`\"{}split\char`\"{}. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_a10a84b55bc6c639052e27e449eec6df9}\label{class_individual_data_set_a10a84b55bc6c639052e27e449eec6df9}} +std\+::list$<$ std\+::reference\+\_\+wrapper$<$ \hyperlink{class_individual_data}{Individual\+Data} $>$ $>$ \& \hyperlink{class_individual_data_set_a10a84b55bc6c639052e27e449eec6df9}{get\+Individual\+List} () +\begin{DoxyCompactList}\small\item\em Returns the \hyperlink{class_individual_data}{Individual\+Data} objects in a list data structure. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_individual_data_set_ad41da35ffee7e2ad0dee54a7b89eaab0}\label{class_individual_data_set_ad41da35ffee7e2ad0dee54a7b89eaab0}} +std\+::map$<$ std\+::string, \hyperlink{class_individual_data}{Individual\+Data} $>$ \& \hyperlink{class_individual_data_set_ad41da35ffee7e2ad0dee54a7b89eaab0}{get\+Individual\+Map} () +\begin{DoxyCompactList}\small\item\em Returns the \hyperlink{class_individual_data}{Individual\+Data} objects in a map data structure. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\subsection{Detailed Description} +A class to keep track of and reconcile \hyperlink{class_individual_data}{Individual\+Data} objects. + +\subsection{Member Function Documentation} +\mbox{\Hypertarget{class_individual_data_set_ac3213f3016f5e404bda4235ed31caddf}\label{class_individual_data_set_ac3213f3016f5e404bda4235ed31caddf}} +\index{Individual\+Data\+Set@{Individual\+Data\+Set}!adding\+Phen\+Data@{adding\+Phen\+Data}} +\index{adding\+Phen\+Data@{adding\+Phen\+Data}!Individual\+Data\+Set@{Individual\+Data\+Set}} +\subsubsection{\texorpdfstring{adding\+Phen\+Data()}{addingPhenData()}} +{\footnotesize\ttfamily void Individual\+Data\+Set\+::adding\+Phen\+Data (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} + + + +Indicate that phenotypic data will be added to this \hyperlink{class_individual_data_set}{Individual\+Data\+Set}. + +Wipes any existing phenotypic data. \mbox{\Hypertarget{class_individual_data_set_ab449377333865d812e1ebd37b7f845dc}\label{class_individual_data_set_ab449377333865d812e1ebd37b7f845dc}} +\index{Individual\+Data\+Set@{Individual\+Data\+Set}!reconcile@{reconcile}} +\index{reconcile@{reconcile}!Individual\+Data\+Set@{Individual\+Data\+Set}} +\subsubsection{\texorpdfstring{reconcile()}{reconcile()}} +{\footnotesize\ttfamily void Individual\+Data\+Set\+::reconcile (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} + + + +Reconciles data by removing individuals with missing data. + +Once data is reconciled, also generates final matrices with all individuals that are still included. + +Generates several matrix formats, including\+: +\begin{DoxyEnumerate} +\item The \char`\"{}full\char`\"{} matrix, with all individuals included. +\item If splitting is enabled\+: one matrix for each split of the data +\item If splitting is enabled\+: one matrix with all information except for a single split of the data -\/ this is run with respect to {\itshape every} split. +\end{DoxyEnumerate} + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/\+Users/danielruskin/src/hca-\/dev/src/Individual\+Data\+Set.\+h\item +/\+Users/danielruskin/src/hca-\/dev/src/Individual\+Data\+Set.\+cpp\end{DoxyCompactItemize} diff --git a/docs/latex/class_individual_data_set__coll__graph.md5 b/docs/latex/class_individual_data_set__coll__graph.md5 new file mode 100644 index 0000000..9615c92 --- /dev/null +++ b/docs/latex/class_individual_data_set__coll__graph.md5 @@ -0,0 +1 @@ +915089bdd45233035a1d4c14115038c5 \ No newline at end of file diff --git a/docs/latex/class_individual_data_set__coll__graph.pdf b/docs/latex/class_individual_data_set__coll__graph.pdf new file mode 100644 index 0000000..698c4e7 Binary files /dev/null and b/docs/latex/class_individual_data_set__coll__graph.pdf differ diff --git a/docs/latex/class_kinship.tex b/docs/latex/class_kinship.tex new file mode 100644 index 0000000..4a3fad1 --- /dev/null +++ b/docs/latex/class_kinship.tex @@ -0,0 +1,77 @@ +\hypertarget{class_kinship}{}\section{Kinship Class Reference} +\label{class_kinship}\index{Kinship@{Kinship}} + + +A class used to load or generate kinship data. This class must not be used directly; only subclasses should be used. + + + + +{\ttfamily \#include $<$Kinship.\+h$>$} + + + +Inheritance diagram for Kinship\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=243pt]{class_kinship__inherit__graph} +\end{center} +\end{figure} + + +Collaboration diagram for Kinship\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=150pt]{class_kinship__coll__graph} +\end{center} +\end{figure} +\subsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{class_kinship_a18adfc9f2a31d9205628e921ca75fa02}\label{class_kinship_a18adfc9f2a31d9205628e921ca75fa02}} +\hyperlink{class_kinship_a18adfc9f2a31d9205628e921ca75fa02}{Kinship} () +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_kinship_a0f1616e77644d6a7a87db8aeb095b107}\label{class_kinship_a0f1616e77644d6a7a87db8aeb095b107}} +\hyperlink{class_kinship_a0f1616e77644d6a7a87db8aeb095b107}{Kinship} (arma\+::mat grm, std\+::map$<$ std\+::string, int $>$ ind, int n\+Indv, std\+::vector$<$ std\+::string $>$ id\+Vec) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_kinship_ad3e479dec51c13a2e1c70c99f0acc2c4}\label{class_kinship_ad3e479dec51c13a2e1c70c99f0acc2c4}} +arma\+::mat \& \hyperlink{class_kinship_ad3e479dec51c13a2e1c70c99f0acc2c4}{get\+Grm} () +\begin{DoxyCompactList}\small\item\em Returns the generated or parsed Genetic Relationship Matrix (G\+RM). \end{DoxyCompactList}\item +std\+::vector$<$ std\+::string $>$ \& \hyperlink{class_kinship_add845b5932eae549de8367e00b86fa8c}{get\+Id\+Vec} () +\begin{DoxyCompactList}\small\item\em Returns the generated or parsed individual id vector. \end{DoxyCompactList}\end{DoxyCompactItemize} +\subsection*{Protected Attributes} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{class_kinship_a9d27e5b9fb058d4e0ce844fbb0508bc3}\label{class_kinship_a9d27e5b9fb058d4e0ce844fbb0508bc3}} +arma\+::mat {\bfseries m\+\_\+grm} +\item +\mbox{\Hypertarget{class_kinship_a8e0bb309d82f1b720b995abbae65158a}\label{class_kinship_a8e0bb309d82f1b720b995abbae65158a}} +uint32\+\_\+t {\bfseries m\+\_\+n\+Indv} +\item +\mbox{\Hypertarget{class_kinship_ab2526834b58e785a5c05069e346cfaf8}\label{class_kinship_ab2526834b58e785a5c05069e346cfaf8}} +std\+::vector$<$ std\+::string $>$ {\bfseries id\+Vec} +\end{DoxyCompactItemize} + + +\subsection{Detailed Description} +A class used to load or generate kinship data. This class must not be used directly; only subclasses should be used. + +\subsection{Member Function Documentation} +\mbox{\Hypertarget{class_kinship_add845b5932eae549de8367e00b86fa8c}\label{class_kinship_add845b5932eae549de8367e00b86fa8c}} +\index{Kinship@{Kinship}!get\+Id\+Vec@{get\+Id\+Vec}} +\index{get\+Id\+Vec@{get\+Id\+Vec}!Kinship@{Kinship}} +\subsubsection{\texorpdfstring{get\+Id\+Vec()}{getIdVec()}} +{\footnotesize\ttfamily std\+::vector$<$ std\+::string $>$ \& Kinship\+::get\+Id\+Vec (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} + + + +Returns the generated or parsed individual id vector. + +Maintains insertion order. The first individual in id\+Vec represents the first individual in the G\+RM. + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/\+Users/danielruskin/src/hca-\/dev/src/Kinship.\+h\item +/\+Users/danielruskin/src/hca-\/dev/src/Kinship.\+cpp\end{DoxyCompactItemize} diff --git a/docs/latex/class_kinship__coll__graph.md5 b/docs/latex/class_kinship__coll__graph.md5 new file mode 100644 index 0000000..6736837 --- /dev/null +++ b/docs/latex/class_kinship__coll__graph.md5 @@ -0,0 +1 @@ +a9927ee3a8b654275c2bb095f399f235 \ No newline at end of file diff --git a/docs/latex/class_kinship__coll__graph.pdf b/docs/latex/class_kinship__coll__graph.pdf new file mode 100644 index 0000000..4037473 Binary files /dev/null and b/docs/latex/class_kinship__coll__graph.pdf differ diff --git a/docs/latex/class_kinship__inherit__graph.md5 b/docs/latex/class_kinship__inherit__graph.md5 new file mode 100644 index 0000000..50a4535 --- /dev/null +++ b/docs/latex/class_kinship__inherit__graph.md5 @@ -0,0 +1 @@ +f24dd5e5b2dbaade233f562caaf3306c \ No newline at end of file diff --git a/docs/latex/class_kinship__inherit__graph.pdf b/docs/latex/class_kinship__inherit__graph.pdf new file mode 100644 index 0000000..dbae8de Binary files /dev/null and b/docs/latex/class_kinship__inherit__graph.pdf differ diff --git a/docs/latex/class_option.tex b/docs/latex/class_option.tex new file mode 100644 index 0000000..e340cc4 --- /dev/null +++ b/docs/latex/class_option.tex @@ -0,0 +1,88 @@ +\hypertarget{class_option}{}\section{Option Class Reference} +\label{class_option}\index{Option@{Option}} + + +A class to load all user options. + + + + +{\ttfamily \#include $<$Option.\+h$>$} + + + +Collaboration diagram for Option\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=184pt]{class_option__coll__graph} +\end{center} +\end{figure} +\subsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{class_option_abf3b886d905c18554337c27c2d8043b4}\label{class_option_abf3b886d905c18554337c27c2d8043b4}} +void \hyperlink{class_option_abf3b886d905c18554337c27c2d8043b4}{parse} (int argc, char $\ast$$\ast$argv) +\begin{DoxyCompactList}\small\item\em Parses all C\+LI options. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_option_a4f4b55fb5a3a18985537543a168b252d}\label{class_option_a4f4b55fb5a3a18985537543a168b252d}} +uint16\+\_\+t \hyperlink{class_option_a4f4b55fb5a3a18985537543a168b252d}{get\+Cmmd} () const +\begin{DoxyCompactList}\small\item\em Returns the command the user specified; i.\+e., the analysis to run. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_option_a2b486563be1622e1da31fb43cc717114}\label{class_option_a2b486563be1622e1da31fb43cc717114}} +std\+::string \hyperlink{class_option_a2b486563be1622e1da31fb43cc717114}{get\+B\+File\+Prefix} () const +\begin{DoxyCompactList}\small\item\em Returns the prefix for the binary data filenames. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_option_ae0a5a49e1598747348581bf74198f3d1}\label{class_option_ae0a5a49e1598747348581bf74198f3d1}} +std\+::string \hyperlink{class_option_ae0a5a49e1598747348581bf74198f3d1}{get\+Q\+Cov\+File} () const +\begin{DoxyCompactList}\small\item\em Returns the quantitative covariate filename. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_option_a6baf76ce89274582327e1616862b392f}\label{class_option_a6baf76ce89274582327e1616862b392f}} +std\+::string \hyperlink{class_option_a6baf76ce89274582327e1616862b392f}{get\+C\+Cov\+File} () const +\begin{DoxyCompactList}\small\item\em Returns the categorical covariate filename. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_option_abfd74209edc1c9115631527a5f387519}\label{class_option_abfd74209edc1c9115631527a5f387519}} +std\+::string \hyperlink{class_option_abfd74209edc1c9115631527a5f387519}{get\+Kinship\+File} () const +\begin{DoxyCompactList}\small\item\em Returns the kinship filename. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_option_ae8f91cf9f70f2c855671555f2ec390f6}\label{class_option_ae8f91cf9f70f2c855671555f2ec390f6}} +std\+::string \hyperlink{class_option_ae8f91cf9f70f2c855671555f2ec390f6}{get\+Kinship\+I\+D\+File} () const +\begin{DoxyCompactList}\small\item\em Returns the kinship ID filename. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_option_ae74b18e7aafba83cebfeb6f484c42ac8}\label{class_option_ae74b18e7aafba83cebfeb6f484c42ac8}} +std\+::string \hyperlink{class_option_ae74b18e7aafba83cebfeb6f484c42ac8}{get\+Phen\+File} () const +\begin{DoxyCompactList}\small\item\em Returns the phenotype filename. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_option_a83b4a81a0f2876b192f47bfbfbfbb3fa}\label{class_option_a83b4a81a0f2876b192f47bfbfbfbb3fa}} +std\+::string \hyperlink{class_option_a83b4a81a0f2876b192f47bfbfbfbb3fa}{get\+Trait\+File} () const +\begin{DoxyCompactList}\small\item\em Returns the trait filename. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_option_a1cb61e972dd463a7da63ea3d9da938ff}\label{class_option_a1cb61e972dd463a7da63ea3d9da938ff}} +int \hyperlink{class_option_a1cb61e972dd463a7da63ea3d9da938ff}{get\+Kinship\+Src} () const +\begin{DoxyCompactList}\small\item\em Returns the kinship source to use. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_option_a222db1bc9da3a5aede4d6401f16c86ed}\label{class_option_a222db1bc9da3a5aede4d6401f16c86ed}} +double \hyperlink{class_option_a222db1bc9da3a5aede4d6401f16c86ed}{get\+Maf\+Cutoff} () const +\begin{DoxyCompactList}\small\item\em Returns the Minor Allele Frequency cutoff for G\+RM generation. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_option_a0b4c58774305589ad64aba3deb9d6955}\label{class_option_a0b4c58774305589ad64aba3deb9d6955}} +double \hyperlink{class_option_a0b4c58774305589ad64aba3deb9d6955}{get\+Missing\+Geno\+Cutoff} () const +\begin{DoxyCompactList}\small\item\em Returns the missing genotypic data cutoff for G\+RM generation. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_option_af51898df742daabd8d31d62923bbf36e}\label{class_option_af51898df742daabd8d31d62923bbf36e}} +std\+::string \hyperlink{class_option_af51898df742daabd8d31d62923bbf36e}{get\+Out\+Dir} () const +\begin{DoxyCompactList}\small\item\em Returns the directory for output files. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_option_ab0cf3c45795ecd3369a7a731072d4291}\label{class_option_ab0cf3c45795ecd3369a7a731072d4291}} +int \hyperlink{class_option_ab0cf3c45795ecd3369a7a731072d4291}{get\+Num\+Threads} () const +\begin{DoxyCompactList}\small\item\em Returns the number of threads to use. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_option_ab34e7fd7261a3428e3f1b035ca647abc}\label{class_option_ab34e7fd7261a3428e3f1b035ca647abc}} +std\+::string \hyperlink{class_option_ab34e7fd7261a3428e3f1b035ca647abc}{get\+Lambda\+Vec\+File} () const +\begin{DoxyCompactList}\small\item\em Returns the lambda vector filename. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_option_ab68ec2e2f08b8ac1a8af85ba48cc43fb}\label{class_option_ab68ec2e2f08b8ac1a8af85ba48cc43fb}} +int \hyperlink{class_option_ab68ec2e2f08b8ac1a8af85ba48cc43fb}{get\+Num\+Splits} () const +\begin{DoxyCompactList}\small\item\em Returns the number of splits to use during the cross-\/validation and lambda-\/tuning process. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_option_a347f3442cb7363f210524ad88cb79bcf}\label{class_option_a347f3442cb7363f210524ad88cb79bcf}} +int \hyperlink{class_option_a347f3442cb7363f210524ad88cb79bcf}{get\+Max\+Iter\+Hca} () const +\begin{DoxyCompactList}\small\item\em Returns the maximum number of iterations for H\+CA analysis (default\+: 200). \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_option_a91ac7dfa8ab9e6141a5a775fb983ff27}\label{class_option_a91ac7dfa8ab9e6141a5a775fb983ff27}} +int \hyperlink{class_option_a91ac7dfa8ab9e6141a5a775fb983ff27}{get\+Max\+Iter\+H2r} () const +\begin{DoxyCompactList}\small\item\em Returns the maximum number of iterations for heritability analysis (default\+: 200). \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\subsection{Detailed Description} +A class to load all user options. + +Note that this class does not load data\+: only options. The \hyperlink{class_data}{Data} class is responsible for actually loading data. + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/\+Users/danielruskin/src/hca-\/dev/src/Option.\+h\item +/\+Users/danielruskin/src/hca-\/dev/src/Option.\+cpp\end{DoxyCompactItemize} diff --git a/docs/latex/class_option__coll__graph.md5 b/docs/latex/class_option__coll__graph.md5 new file mode 100644 index 0000000..b6d51e7 --- /dev/null +++ b/docs/latex/class_option__coll__graph.md5 @@ -0,0 +1 @@ +fb3b6e22038739488303dd8f858eb15b \ No newline at end of file diff --git a/docs/latex/class_option__coll__graph.pdf b/docs/latex/class_option__coll__graph.pdf new file mode 100644 index 0000000..f323f5b Binary files /dev/null and b/docs/latex/class_option__coll__graph.pdf differ diff --git a/docs/latex/class_reml_h2r_est.tex b/docs/latex/class_reml_h2r_est.tex new file mode 100644 index 0000000..3ee0b29 --- /dev/null +++ b/docs/latex/class_reml_h2r_est.tex @@ -0,0 +1,67 @@ +\hypertarget{class_reml_h2r_est}{}\section{Reml\+H2r\+Est Class Reference} +\label{class_reml_h2r_est}\index{Reml\+H2r\+Est@{Reml\+H2r\+Est}} + + +A class to perform heritability analysis on a given dataset. + + + + +{\ttfamily \#include $<$Reml\+H2r\+Est.\+h$>$} + + + +Inheritance diagram for Reml\+H2r\+Est\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=168pt]{class_reml_h2r_est__inherit__graph} +\end{center} +\end{figure} + + +Collaboration diagram for Reml\+H2r\+Est\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=168pt]{class_reml_h2r_est__coll__graph} +\end{center} +\end{figure} +\subsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\hyperlink{class_reml_h2r_est_a8dd6ffa90845f14ef01e7f03a776e21f}{Reml\+H2r\+Est} (\hyperlink{class_option}{Option} \&new\+Option, arma\+::mat \&new\+Phen, arma\+::mat \&new\+Grm, arma\+::mat \&new\+Cov) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_reml_h2r_est_a46ae48fb9ddd0b293fa9eeafbef23c38}\label{class_reml_h2r_est_a46ae48fb9ddd0b293fa9eeafbef23c38}} +void \hyperlink{class_reml_h2r_est_a46ae48fb9ddd0b293fa9eeafbef23c38}{calc\+H2r} () +\begin{DoxyCompactList}\small\item\em Runs heritability analysis on the data. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_reml_h2r_est_a72101a685633ac93f0e3d1159a058c06}\label{class_reml_h2r_est_a72101a685633ac93f0e3d1159a058c06}} +void \hyperlink{class_reml_h2r_est_a72101a685633ac93f0e3d1159a058c06}{save\+Output} () +\begin{DoxyCompactList}\small\item\em Saves output to a file. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_reml_h2r_est_a6d785889bcf66cf889d523e41d25c118}\label{class_reml_h2r_est_a6d785889bcf66cf889d523e41d25c118}} +std\+::vector$<$ std\+::vector$<$ double $>$ $>$ \& \hyperlink{class_reml_h2r_est_a6d785889bcf66cf889d523e41d25c118}{get\+Final\+Stats} () +\begin{DoxyCompactList}\small\item\em Returns the final stats from the R\+E\+ML analysis. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\subsection{Detailed Description} +A class to perform heritability analysis on a given dataset. + +Uses the R\+E\+ML algorithm. + +\subsection{Constructor \& Destructor Documentation} +\mbox{\Hypertarget{class_reml_h2r_est_a8dd6ffa90845f14ef01e7f03a776e21f}\label{class_reml_h2r_est_a8dd6ffa90845f14ef01e7f03a776e21f}} +\index{Reml\+H2r\+Est@{Reml\+H2r\+Est}!Reml\+H2r\+Est@{Reml\+H2r\+Est}} +\index{Reml\+H2r\+Est@{Reml\+H2r\+Est}!Reml\+H2r\+Est@{Reml\+H2r\+Est}} +\subsubsection{\texorpdfstring{Reml\+H2r\+Est()}{RemlH2rEst()}} +{\footnotesize\ttfamily Reml\+H2r\+Est\+::\+Reml\+H2r\+Est (\begin{DoxyParamCaption}\item[{\hyperlink{class_option}{Option} \&}]{new\+Option, }\item[{arma\+::mat \&}]{new\+Phen, }\item[{arma\+::mat \&}]{new\+Grm, }\item[{arma\+::mat \&}]{new\+Cov }\end{DoxyParamCaption})} + + + +Constructor. + +Raises an error if the provided phenotypic data has more than one column. + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/\+Users/danielruskin/src/hca-\/dev/src/Reml\+H2r\+Est.\+h\item +/\+Users/danielruskin/src/hca-\/dev/src/Reml\+H2r\+Est.\+cpp\end{DoxyCompactItemize} diff --git a/docs/latex/class_reml_h2r_est__coll__graph.md5 b/docs/latex/class_reml_h2r_est__coll__graph.md5 new file mode 100644 index 0000000..3544761 --- /dev/null +++ b/docs/latex/class_reml_h2r_est__coll__graph.md5 @@ -0,0 +1 @@ +48efe23b65c0042024f0bbbdfd49cc5e \ No newline at end of file diff --git a/docs/latex/class_reml_h2r_est__coll__graph.pdf b/docs/latex/class_reml_h2r_est__coll__graph.pdf new file mode 100644 index 0000000..c240a4e Binary files /dev/null and b/docs/latex/class_reml_h2r_est__coll__graph.pdf differ diff --git a/docs/latex/class_reml_h2r_est__inherit__graph.md5 b/docs/latex/class_reml_h2r_est__inherit__graph.md5 new file mode 100644 index 0000000..a5c015e --- /dev/null +++ b/docs/latex/class_reml_h2r_est__inherit__graph.md5 @@ -0,0 +1 @@ +0c1027f494bad53b6facf445f78a3d50 \ No newline at end of file diff --git a/docs/latex/class_reml_h2r_est__inherit__graph.pdf b/docs/latex/class_reml_h2r_est__inherit__graph.pdf new file mode 100644 index 0000000..5effd4c Binary files /dev/null and b/docs/latex/class_reml_h2r_est__inherit__graph.pdf differ diff --git a/docs/latex/class_reml_hca.tex b/docs/latex/class_reml_hca.tex new file mode 100644 index 0000000..7ea9991 --- /dev/null +++ b/docs/latex/class_reml_hca.tex @@ -0,0 +1,79 @@ +\hypertarget{class_reml_hca}{}\section{Reml\+Hca Class Reference} +\label{class_reml_hca}\index{Reml\+Hca@{Reml\+Hca}} + + +A class to perform heritable component analysis on a given dataset. + + + + +{\ttfamily \#include $<$Reml\+Hca.\+h$>$} + + + +Inheritance diagram for Reml\+Hca\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=194pt]{class_reml_hca__inherit__graph} +\end{center} +\end{figure} + + +Collaboration diagram for Reml\+Hca\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=194pt]{class_reml_hca__coll__graph} +\end{center} +\end{figure} +\subsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{class_reml_hca_ad08b49fa08b8c0eecc15ad1e95a72451}\label{class_reml_hca_ad08b49fa08b8c0eecc15ad1e95a72451}} +\hyperlink{class_reml_hca_ad08b49fa08b8c0eecc15ad1e95a72451}{Reml\+Hca} (\hyperlink{class_option}{Option} \&new\+Option, \hyperlink{class_data}{Data} \&new\+Data) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_reml_hca_a64810b4549d0f9086a168d4c26160a2f}\label{class_reml_hca_a64810b4549d0f9086a168d4c26160a2f}} +void \hyperlink{class_reml_hca_a64810b4549d0f9086a168d4c26160a2f}{train} () +\begin{DoxyCompactList}\small\item\em Runs the R\+E\+ML algorithm to obtain highly-\/heritable traits. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_reml_hca_a95de049dd906fbff1dc4632bdd426dd4}\label{class_reml_hca_a95de049dd906fbff1dc4632bdd426dd4}} +void \hyperlink{class_reml_hca_a95de049dd906fbff1dc4632bdd426dd4}{save\+Output} () +\begin{DoxyCompactList}\small\item\em Saves output to a file. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_reml_hca_a3c2580e064bafdf5cb5eb2f052ce02c3}\label{class_reml_hca_a3c2580e064bafdf5cb5eb2f052ce02c3}} +double \hyperlink{class_reml_hca_a3c2580e064bafdf5cb5eb2f052ce02c3}{get\+Best\+Lambda\+Val} () +\begin{DoxyCompactList}\small\item\em Return the best lambda value, found by the train function. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_reml_hca_af5ea62f862aba373ce20c292424f64fc}\label{class_reml_hca_af5ea62f862aba373ce20c292424f64fc}} +arma\+::mat \& \hyperlink{class_reml_hca_af5ea62f862aba373ce20c292424f64fc}{get\+Best\+TrainedW} () +\begin{DoxyCompactList}\small\item\em Returns the weights generated by the train function. \end{DoxyCompactList}\end{DoxyCompactItemize} +\subsection*{Static Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{class_reml_hca_a22270a523019eed86c6541ed7184fa6b}\label{class_reml_hca_a22270a523019eed86c6541ed7184fa6b}} +static double \hyperlink{class_reml_hca_a22270a523019eed86c6541ed7184fa6b}{objective\+Function} (const std\+::vector$<$ double $>$ \&x, std\+::vector$<$ double $>$ \&grad, void $\ast$my\+\_\+func\+\_\+data) +\begin{DoxyCompactList}\small\item\em Objective function for the H\+CA minimization process. \end{DoxyCompactList}\item +static double \hyperlink{class_reml_hca_add5f191d301fe48deca82caa0ed64b42}{constraint\+Function} (const std\+::vector$<$ double $>$ \&x, std\+::vector$<$ double $>$ \&grad, void $\ast$data) +\begin{DoxyCompactList}\small\item\em Constraint function for the H\+CA minimization process. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\subsection{Detailed Description} +A class to perform heritable component analysis on a given dataset. + +Uses the R\+E\+ML algorithm. + +\subsection{Member Function Documentation} +\mbox{\Hypertarget{class_reml_hca_add5f191d301fe48deca82caa0ed64b42}\label{class_reml_hca_add5f191d301fe48deca82caa0ed64b42}} +\index{Reml\+Hca@{Reml\+Hca}!constraint\+Function@{constraint\+Function}} +\index{constraint\+Function@{constraint\+Function}!Reml\+Hca@{Reml\+Hca}} +\subsubsection{\texorpdfstring{constraint\+Function()}{constraintFunction()}} +{\footnotesize\ttfamily double Reml\+Hca\+::constraint\+Function (\begin{DoxyParamCaption}\item[{const std\+::vector$<$ double $>$ \&}]{x, }\item[{std\+::vector$<$ double $>$ \&}]{grad, }\item[{void $\ast$}]{func\+Data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}} + + + +Constraint function for the H\+CA minimization process. + +Constrained to be equal to zero. + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/\+Users/danielruskin/src/hca-\/dev/src/Reml\+Hca.\+h\item +/\+Users/danielruskin/src/hca-\/dev/src/Reml\+Hca.\+cpp\end{DoxyCompactItemize} diff --git a/docs/latex/class_reml_hca__coll__graph.md5 b/docs/latex/class_reml_hca__coll__graph.md5 new file mode 100644 index 0000000..4ab33c2 --- /dev/null +++ b/docs/latex/class_reml_hca__coll__graph.md5 @@ -0,0 +1 @@ +af6654970eede297360fb7804398d5a6 \ No newline at end of file diff --git a/docs/latex/class_reml_hca__coll__graph.pdf b/docs/latex/class_reml_hca__coll__graph.pdf new file mode 100644 index 0000000..b9c0df8 Binary files /dev/null and b/docs/latex/class_reml_hca__coll__graph.pdf differ diff --git a/docs/latex/class_reml_hca__inherit__graph.md5 b/docs/latex/class_reml_hca__inherit__graph.md5 new file mode 100644 index 0000000..2cd1fa6 --- /dev/null +++ b/docs/latex/class_reml_hca__inherit__graph.md5 @@ -0,0 +1 @@ +259bbfd86ed6ab08f4828723df6fd1c2 \ No newline at end of file diff --git a/docs/latex/class_reml_hca__inherit__graph.pdf b/docs/latex/class_reml_hca__inherit__graph.pdf new file mode 100644 index 0000000..b9c0df8 Binary files /dev/null and b/docs/latex/class_reml_hca__inherit__graph.pdf differ diff --git a/docs/latex/class_scorer.tex b/docs/latex/class_scorer.tex new file mode 100644 index 0000000..ecb8d18 --- /dev/null +++ b/docs/latex/class_scorer.tex @@ -0,0 +1,55 @@ +\hypertarget{class_scorer}{}\section{Scorer Class Reference} +\label{class_scorer}\index{Scorer@{Scorer}} + + +A class to score users based on their phenotypes and a generated weight. + + + + +{\ttfamily \#include $<$Scorer.\+h$>$} + + + +Collaboration diagram for Scorer\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=162pt]{class_scorer__coll__graph} +\end{center} +\end{figure} +\subsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\hyperlink{class_scorer_a984c76c1948b49e8d347af14db720c17}{Scorer} (\hyperlink{class_option}{Option} \&new\+Option, arma\+::mat \&phen, arma\+::mat \&trait) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_scorer_aa687ed263a90fbc9e15102402a8ed5ef}\label{class_scorer_aa687ed263a90fbc9e15102402a8ed5ef}} +arma\+::mat \& \hyperlink{class_scorer_aa687ed263a90fbc9e15102402a8ed5ef}{get\+Score} () +\begin{DoxyCompactList}\small\item\em Returns the generated scores. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_scorer_a551bc3435903f7466f352488ad82252b}\label{class_scorer_a551bc3435903f7466f352488ad82252b}} +void \hyperlink{class_scorer_a551bc3435903f7466f352488ad82252b}{save\+Output} (\hyperlink{class_individual_data_set}{Individual\+Data\+Set} \&individual\+Data\+Set) +\begin{DoxyCompactList}\small\item\em Saves output to a file. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\subsection{Detailed Description} +A class to score users based on their phenotypes and a generated weight. + +Weights are typically generated via the H\+CA process. + +\subsection{Constructor \& Destructor Documentation} +\mbox{\Hypertarget{class_scorer_a984c76c1948b49e8d347af14db720c17}\label{class_scorer_a984c76c1948b49e8d347af14db720c17}} +\index{Scorer@{Scorer}!Scorer@{Scorer}} +\index{Scorer@{Scorer}!Scorer@{Scorer}} +\subsubsection{\texorpdfstring{Scorer()}{Scorer()}} +{\footnotesize\ttfamily Scorer\+::\+Scorer (\begin{DoxyParamCaption}\item[{\hyperlink{class_option}{Option} \&}]{new\+Option, }\item[{arma\+::mat \&}]{phen, }\item[{arma\+::mat \&}]{trait }\end{DoxyParamCaption})} + + + +Constructor. + +Also generates scores inline. + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/\+Users/danielruskin/src/hca-\/dev/src/Scorer.\+h\item +/\+Users/danielruskin/src/hca-\/dev/src/Scorer.\+cpp\end{DoxyCompactItemize} diff --git a/docs/latex/class_scorer__coll__graph.md5 b/docs/latex/class_scorer__coll__graph.md5 new file mode 100644 index 0000000..cbbb579 --- /dev/null +++ b/docs/latex/class_scorer__coll__graph.md5 @@ -0,0 +1 @@ +dbe1aef189c84e43e2c62c700f773f03 \ No newline at end of file diff --git a/docs/latex/class_scorer__coll__graph.pdf b/docs/latex/class_scorer__coll__graph.pdf new file mode 100644 index 0000000..be82045 Binary files /dev/null and b/docs/latex/class_scorer__coll__graph.pdf differ diff --git a/docs/latex/class_snp_kinship.tex b/docs/latex/class_snp_kinship.tex new file mode 100644 index 0000000..b603ce4 --- /dev/null +++ b/docs/latex/class_snp_kinship.tex @@ -0,0 +1,60 @@ +\hypertarget{class_snp_kinship}{}\section{Snp\+Kinship Class Reference} +\label{class_snp_kinship}\index{Snp\+Kinship@{Snp\+Kinship}} + + +A class to generate a kinship matrix from S\+NP data. + + + + +{\ttfamily \#include $<$Snp\+Kinship.\+h$>$} + + + +Inheritance diagram for Snp\+Kinship\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=150pt]{class_snp_kinship__inherit__graph} +\end{center} +\end{figure} + + +Collaboration diagram for Snp\+Kinship\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=150pt]{class_snp_kinship__coll__graph} +\end{center} +\end{figure} +\subsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +void \hyperlink{class_snp_kinship_a8317540d3eaac3cc2d21f2db47306649}{construct} (\hyperlink{class_option}{Option} \&option, arma\+::mat \&ped, std\+::vector$<$ int $>$ \&chr, arma\+::mat \&new\+Geno) +\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_snp_kinship_aed018b6a8b40696d6124edef49732b58}\label{class_snp_kinship_aed018b6a8b40696d6124edef49732b58}} +arma\+::mat \& \hyperlink{class_snp_kinship_aed018b6a8b40696d6124edef49732b58}{get\+AN} () +\begin{DoxyCompactList}\small\item\em Returns AN matrix, which represents the number of S\+N\+Ps that were used to calculate the G\+RM (on a per-\/individual basis). \end{DoxyCompactList}\end{DoxyCompactItemize} +\subsection*{Additional Inherited Members} + + +\subsection{Detailed Description} +A class to generate a kinship matrix from S\+NP data. + +\subsection{Member Function Documentation} +\mbox{\Hypertarget{class_snp_kinship_a8317540d3eaac3cc2d21f2db47306649}\label{class_snp_kinship_a8317540d3eaac3cc2d21f2db47306649}} +\index{Snp\+Kinship@{Snp\+Kinship}!construct@{construct}} +\index{construct@{construct}!Snp\+Kinship@{Snp\+Kinship}} +\subsubsection{\texorpdfstring{construct()}{construct()}} +{\footnotesize\ttfamily void Snp\+Kinship\+::construct (\begin{DoxyParamCaption}\item[{\hyperlink{class_option}{Option} \&}]{option, }\item[{arma\+::mat \&}]{ped, }\item[{std\+::vector$<$ int $>$ \&}]{chr, }\item[{arma\+::mat \&}]{new\+Geno }\end{DoxyParamCaption})} + + + +Constructor. + +Also generates G\+RM inline. + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/\+Users/danielruskin/src/hca-\/dev/src/Snp\+Kinship.\+h\item +/\+Users/danielruskin/src/hca-\/dev/src/Snp\+Kinship.\+cpp\end{DoxyCompactItemize} diff --git a/docs/latex/class_snp_kinship__coll__graph.md5 b/docs/latex/class_snp_kinship__coll__graph.md5 new file mode 100644 index 0000000..6c4b4ea --- /dev/null +++ b/docs/latex/class_snp_kinship__coll__graph.md5 @@ -0,0 +1 @@ +8ede571e13f8703dbc452a09f9718eb1 \ No newline at end of file diff --git a/docs/latex/class_snp_kinship__coll__graph.pdf b/docs/latex/class_snp_kinship__coll__graph.pdf new file mode 100644 index 0000000..1b83bad Binary files /dev/null and b/docs/latex/class_snp_kinship__coll__graph.pdf differ diff --git a/docs/latex/class_snp_kinship__inherit__graph.md5 b/docs/latex/class_snp_kinship__inherit__graph.md5 new file mode 100644 index 0000000..5ecac28 --- /dev/null +++ b/docs/latex/class_snp_kinship__inherit__graph.md5 @@ -0,0 +1 @@ +21aae14dd779fe4e5ef249dac018a353 \ No newline at end of file diff --git a/docs/latex/class_snp_kinship__inherit__graph.pdf b/docs/latex/class_snp_kinship__inherit__graph.pdf new file mode 100644 index 0000000..1b83bad Binary files /dev/null and b/docs/latex/class_snp_kinship__inherit__graph.pdf differ diff --git a/docs/latex/class_util.tex b/docs/latex/class_util.tex new file mode 100644 index 0000000..58429e0 --- /dev/null +++ b/docs/latex/class_util.tex @@ -0,0 +1,35 @@ +\hypertarget{class_util}{}\section{Util Class Reference} +\label{class_util}\index{Util@{Util}} + + +Collaboration diagram for Util\+:\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=194pt]{class_util__coll__graph} +\end{center} +\end{figure} +\subsection*{Static Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{class_util_a6caf10ede2d5def19c796a0eb393a5dc}\label{class_util_a6caf10ede2d5def19c796a0eb393a5dc}} +static std\+::vector$<$ std\+::string $>$ \hyperlink{class_util_a6caf10ede2d5def19c796a0eb393a5dc}{split\+By\+Delimeter} (std\+::string data, std\+::string delim) +\begin{DoxyCompactList}\small\item\em Splits a string by delimiter, and returns a vector swith the result. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_util_ac3e250bcab768a533f66cc889cf26081}\label{class_util_ac3e250bcab768a533f66cc889cf26081}} +static double \hyperlink{class_util_ac3e250bcab768a533f66cc889cf26081}{parse\+To\+Double} (std\+::string data) +\begin{DoxyCompactList}\small\item\em Parses a string to a double, raising an error if the data is invalid. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_util_a9db3b3d53006aca617f7474d13bdb7fb}\label{class_util_a9db3b3d53006aca617f7474d13bdb7fb}} +static int \hyperlink{class_util_a9db3b3d53006aca617f7474d13bdb7fb}{parse\+To\+Int} (std\+::string data) +\begin{DoxyCompactList}\small\item\em Parses a string to an integer, raising an error if the data is invalid. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_util_a6806b203dcf18d526886ce3d12150620}\label{class_util_a6806b203dcf18d526886ce3d12150620}} +static arma\+::mat \hyperlink{class_util_a6806b203dcf18d526886ce3d12150620}{invert\+Matrix} (arma\+::mat \&m, std\+::string name, bool already\+Added=false) +\begin{DoxyCompactList}\small\item\em Inverts the matrix via arma\+::inv, adding values to diagonals should inversion fail. If values are added to diagonals, outputs a warning with the \char`\"{}name\char`\"{} variable. \end{DoxyCompactList}\item +\mbox{\Hypertarget{class_util_a93fb79235b84e39bcb78b97179c722b4}\label{class_util_a93fb79235b84e39bcb78b97179c722b4}} +static arma\+::mat \hyperlink{class_util_a93fb79235b84e39bcb78b97179c722b4}{invert\+Matrix\+Sympd} (arma\+::mat \&m, std\+::string name, bool already\+Added=false) +\begin{DoxyCompactList}\small\item\em Inverts the matrix via arma\+::inv\+\_\+sympd, adding values to diagonals should inversion fail. If values are added to diagonals, outputs a warning with the \char`\"{}name\char`\"{} variable. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/\+Users/danielruskin/src/hca-\/dev/src/Util.\+h\item +/\+Users/danielruskin/src/hca-\/dev/src/Util.\+cpp\end{DoxyCompactItemize} diff --git a/docs/latex/class_util__coll__graph.md5 b/docs/latex/class_util__coll__graph.md5 new file mode 100644 index 0000000..c5daf41 --- /dev/null +++ b/docs/latex/class_util__coll__graph.md5 @@ -0,0 +1 @@ +f2fd165933f58b02852619851e1e87a9 \ No newline at end of file diff --git a/docs/latex/class_util__coll__graph.pdf b/docs/latex/class_util__coll__graph.pdf new file mode 100644 index 0000000..4c6e01e Binary files /dev/null and b/docs/latex/class_util__coll__graph.pdf differ diff --git a/docs/latex/dir_5a38eadd9c55c6fb727a5803bb09c43f.tex b/docs/latex/dir_5a38eadd9c55c6fb727a5803bb09c43f.tex new file mode 100644 index 0000000..4733b49 --- /dev/null +++ b/docs/latex/dir_5a38eadd9c55c6fb727a5803bb09c43f.tex @@ -0,0 +1,5 @@ +\hypertarget{dir_5a38eadd9c55c6fb727a5803bb09c43f}{}\section{/\+Users/danielruskin/src/hca-\/dev Directory Reference} +\label{dir_5a38eadd9c55c6fb727a5803bb09c43f}\index{/\+Users/danielruskin/src/hca-\/dev Directory Reference@{/\+Users/danielruskin/src/hca-\/dev Directory Reference}} +\subsection*{Directories} +\begin{DoxyCompactItemize} +\end{DoxyCompactItemize} diff --git a/docs/latex/dir_60a4da173fca05b90d61823adfb03c66.tex b/docs/latex/dir_60a4da173fca05b90d61823adfb03c66.tex new file mode 100644 index 0000000..d580625 --- /dev/null +++ b/docs/latex/dir_60a4da173fca05b90d61823adfb03c66.tex @@ -0,0 +1,2 @@ +\hypertarget{dir_60a4da173fca05b90d61823adfb03c66}{}\section{/\+Users/danielruskin Directory Reference} +\label{dir_60a4da173fca05b90d61823adfb03c66}\index{/\+Users/danielruskin Directory Reference@{/\+Users/danielruskin Directory Reference}} diff --git a/docs/latex/dir_68267d1309a1af8e8297ef4c3efbcdba.tex b/docs/latex/dir_68267d1309a1af8e8297ef4c3efbcdba.tex new file mode 100644 index 0000000..a1e2c7d --- /dev/null +++ b/docs/latex/dir_68267d1309a1af8e8297ef4c3efbcdba.tex @@ -0,0 +1,2 @@ +\hypertarget{dir_68267d1309a1af8e8297ef4c3efbcdba}{}\section{/\+Users/danielruskin/src Directory Reference} +\label{dir_68267d1309a1af8e8297ef4c3efbcdba}\index{/\+Users/danielruskin/src Directory Reference@{/\+Users/danielruskin/src Directory Reference}} diff --git a/docs/latex/dir_8a990246551b69b640aea526aed19dbb.tex b/docs/latex/dir_8a990246551b69b640aea526aed19dbb.tex new file mode 100644 index 0000000..4de0a50 --- /dev/null +++ b/docs/latex/dir_8a990246551b69b640aea526aed19dbb.tex @@ -0,0 +1,2 @@ +\hypertarget{dir_8a990246551b69b640aea526aed19dbb}{}\section{/\+Users/danielruskin/src/hca-\/dev/src Directory Reference} +\label{dir_8a990246551b69b640aea526aed19dbb}\index{/\+Users/danielruskin/src/hca-\/dev/src Directory Reference@{/\+Users/danielruskin/src/hca-\/dev/src Directory Reference}} diff --git a/docs/latex/dir_95cb54157f2bc20483fe55d9ab58fd27.tex b/docs/latex/dir_95cb54157f2bc20483fe55d9ab58fd27.tex new file mode 100644 index 0000000..94b6353 --- /dev/null +++ b/docs/latex/dir_95cb54157f2bc20483fe55d9ab58fd27.tex @@ -0,0 +1,2 @@ +\hypertarget{dir_95cb54157f2bc20483fe55d9ab58fd27}{}\section{/\+Users/danielruskin/src/hca-\/dev/src Directory Reference} +\label{dir_95cb54157f2bc20483fe55d9ab58fd27}\index{/\+Users/danielruskin/src/hca-\/dev/src Directory Reference@{/\+Users/danielruskin/src/hca-\/dev/src Directory Reference}} diff --git a/docs/latex/dir_b41b214f44b1d1e2573f3fffd563b69b.tex b/docs/latex/dir_b41b214f44b1d1e2573f3fffd563b69b.tex new file mode 100644 index 0000000..a3550b9 --- /dev/null +++ b/docs/latex/dir_b41b214f44b1d1e2573f3fffd563b69b.tex @@ -0,0 +1,5 @@ +\hypertarget{dir_b41b214f44b1d1e2573f3fffd563b69b}{}\section{/\+Users/danielruskin/src/hca-\/dev Directory Reference} +\label{dir_b41b214f44b1d1e2573f3fffd563b69b}\index{/\+Users/danielruskin/src/hca-\/dev Directory Reference@{/\+Users/danielruskin/src/hca-\/dev Directory Reference}} +\subsection*{Directories} +\begin{DoxyCompactItemize} +\end{DoxyCompactItemize} diff --git a/docs/latex/dir_d522931ffa1371640980b621734a4381.tex b/docs/latex/dir_d522931ffa1371640980b621734a4381.tex new file mode 100644 index 0000000..c9f048e --- /dev/null +++ b/docs/latex/dir_d522931ffa1371640980b621734a4381.tex @@ -0,0 +1,2 @@ +\hypertarget{dir_d522931ffa1371640980b621734a4381}{}\section{/\+Users Directory Reference} +\label{dir_d522931ffa1371640980b621734a4381}\index{/\+Users Directory Reference@{/\+Users Directory Reference}} diff --git a/docs/latex/dir_df4e26f2ffd11e56f607d6303fce6b11.tex b/docs/latex/dir_df4e26f2ffd11e56f607d6303fce6b11.tex new file mode 100644 index 0000000..d45ae36 --- /dev/null +++ b/docs/latex/dir_df4e26f2ffd11e56f607d6303fce6b11.tex @@ -0,0 +1,2 @@ +\hypertarget{dir_df4e26f2ffd11e56f607d6303fce6b11}{}\section{/\+Users/danielruskin/src Directory Reference} +\label{dir_df4e26f2ffd11e56f607d6303fce6b11}\index{/\+Users/danielruskin/src Directory Reference@{/\+Users/danielruskin/src Directory Reference}} diff --git a/docs/latex/doxygen.sty b/docs/latex/doxygen.sty new file mode 100644 index 0000000..e457acc --- /dev/null +++ b/docs/latex/doxygen.sty @@ -0,0 +1,503 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{doxygen} + +% Packages used by this style file +\RequirePackage{alltt} +\RequirePackage{array} +\RequirePackage{calc} +\RequirePackage{float} +\RequirePackage{ifthen} +\RequirePackage{verbatim} +\RequirePackage[table]{xcolor} +\RequirePackage{longtable} +\RequirePackage{tabu} +\RequirePackage{tabularx} +\RequirePackage{multirow} + +%---------- Internal commands used in this style file ---------------- + +\newcommand{\ensurespace}[1]{% + \begingroup% + \setlength{\dimen@}{#1}% + \vskip\z@\@plus\dimen@% + \penalty -100\vskip\z@\@plus -\dimen@% + \vskip\dimen@% + \penalty 9999% + \vskip -\dimen@% + \vskip\z@skip% hide the previous |\vskip| from |\addvspace| + \endgroup% +} + +\newcommand{\DoxyLabelFont}{} +\newcommand{\entrylabel}[1]{% + {% + \parbox[b]{\labelwidth-4pt}{% + \makebox[0pt][l]{\DoxyLabelFont#1}% + \vspace{1.5\baselineskip}% + }% + }% +} + +\newenvironment{DoxyDesc}[1]{% + \ensurespace{4\baselineskip}% + \begin{list}{}{% + \settowidth{\labelwidth}{20pt}% + \setlength{\parsep}{0pt}% + \setlength{\itemsep}{0pt}% + \setlength{\leftmargin}{\labelwidth+\labelsep}% + \renewcommand{\makelabel}{\entrylabel}% + }% + \item[#1]% +}{% + \end{list}% +} + +\newsavebox{\xrefbox} +\newlength{\xreflength} +\newcommand{\xreflabel}[1]{% + \sbox{\xrefbox}{#1}% + \setlength{\xreflength}{\wd\xrefbox}% + \ifthenelse{\xreflength>\labelwidth}{% + \begin{minipage}{\textwidth}% + \setlength{\parindent}{0pt}% + \hangindent=15pt\bfseries #1\vspace{1.2\itemsep}% + \end{minipage}% + }{% + \parbox[b]{\labelwidth}{\makebox[0pt][l]{\textbf{#1}}}% + }% +} + +%---------- Commands used by doxygen LaTeX output generator ---------- + +% Used by
     ... 
    +\newenvironment{DoxyPre}{% + \small% + \begin{alltt}% +}{% + \end{alltt}% + \normalsize% +} + +% Used by @code ... @endcode +\newenvironment{DoxyCode}{% + \par% + \scriptsize% + \begin{alltt}% +}{% + \end{alltt}% + \normalsize% +} + +% Used by @example, @include, @includelineno and @dontinclude +\newenvironment{DoxyCodeInclude}{% + \DoxyCode% +}{% + \endDoxyCode% +} + +% Used by @verbatim ... @endverbatim +\newenvironment{DoxyVerb}{% + \footnotesize% + \verbatim% +}{% + \endverbatim% + \normalsize% +} + +% Used by @verbinclude +\newenvironment{DoxyVerbInclude}{% + \DoxyVerb% +}{% + \endDoxyVerb% +} + +% Used by numbered lists (using '-#' or
      ...
    ) +\newenvironment{DoxyEnumerate}{% + \enumerate% +}{% + \endenumerate% +} + +% Used by bullet lists (using '-', @li, @arg, or
      ...
    ) +\newenvironment{DoxyItemize}{% + \itemize% +}{% + \enditemize% +} + +% Used by description lists (using
    ...
    ) +\newenvironment{DoxyDescription}{% + \description% +}{% + \enddescription% +} + +% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc +% (only if caption is specified) +\newenvironment{DoxyImage}{% + \begin{figure}[H]% + \begin{center}% +}{% + \end{center}% + \end{figure}% +} + +% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc +% (only if no caption is specified) +\newenvironment{DoxyImageNoCaption}{% + \begin{center}% +}{% + \end{center}% +} + +% Used by @attention +\newenvironment{DoxyAttention}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @author and @authors +\newenvironment{DoxyAuthor}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @date +\newenvironment{DoxyDate}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @invariant +\newenvironment{DoxyInvariant}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @note +\newenvironment{DoxyNote}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @post +\newenvironment{DoxyPostcond}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @pre +\newenvironment{DoxyPrecond}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @copyright +\newenvironment{DoxyCopyright}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @remark +\newenvironment{DoxyRemark}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @return and @returns +\newenvironment{DoxyReturn}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @since +\newenvironment{DoxySince}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @see +\newenvironment{DoxySeeAlso}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @version +\newenvironment{DoxyVersion}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @warning +\newenvironment{DoxyWarning}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @internal +\newenvironment{DoxyInternal}[1]{% + \paragraph*{#1}% +}{% +} + +% Used by @par and @paragraph +\newenvironment{DoxyParagraph}[1]{% + \begin{list}{}{% + \settowidth{\labelwidth}{40pt}% + \setlength{\leftmargin}{\labelwidth}% + \setlength{\parsep}{0pt}% + \setlength{\itemsep}{-4pt}% + \renewcommand{\makelabel}{\entrylabel}% + }% + \item[#1]% +}{% + \end{list}% +} + +% Used by parameter lists +\newenvironment{DoxyParams}[2][]{% + \tabulinesep=1mm% + \par% + \ifthenelse{\equal{#1}{}}% + {\begin{longtabu} spread 0pt [l]{|X[-1,l]|X[-1,l]|}}% name + description + {\ifthenelse{\equal{#1}{1}}% + {\begin{longtabu} spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + name + desc + {\begin{longtabu} spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + type + name + desc + } + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu}% + \vspace{6pt}% +} + +% Used for fields of simple structs +\newenvironment{DoxyFields}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu} spread 0pt [l]{|X[-1,r]|X[-1,l]|X[-1,l]|}% + \multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu}% + \vspace{6pt}% +} + +% Used for fields simple class style enums +\newenvironment{DoxyEnumFields}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu} spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu}% + \vspace{6pt}% +} + +% Used for parameters within a detailed function description +\newenvironment{DoxyParamCaption}{% + \renewcommand{\item}[2][]{\\ \hspace*{2.0cm} ##1 {\em ##2}}% +}{% +} + +% Used by return value lists +\newenvironment{DoxyRetVals}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu} spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu}% + \vspace{6pt}% +} + +% Used by exception lists +\newenvironment{DoxyExceptions}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu} spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu}% + \vspace{6pt}% +} + +% Used by template parameter lists +\newenvironment{DoxyTemplParams}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu} spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu}% + \vspace{6pt}% +} + +% Used for member lists +\newenvironment{DoxyCompactItemize}{% + \begin{itemize}% + \setlength{\itemsep}{-3pt}% + \setlength{\parsep}{0pt}% + \setlength{\topsep}{0pt}% + \setlength{\partopsep}{0pt}% +}{% + \end{itemize}% +} + +% Used for member descriptions +\newenvironment{DoxyCompactList}{% + \begin{list}{}{% + \setlength{\leftmargin}{0.5cm}% + \setlength{\itemsep}{0pt}% + \setlength{\parsep}{0pt}% + \setlength{\topsep}{0pt}% + \renewcommand{\makelabel}{\hfill}% + }% +}{% + \end{list}% +} + +% Used for reference lists (@bug, @deprecated, @todo, etc.) +\newenvironment{DoxyRefList}{% + \begin{list}{}{% + \setlength{\labelwidth}{10pt}% + \setlength{\leftmargin}{\labelwidth}% + \addtolength{\leftmargin}{\labelsep}% + \renewcommand{\makelabel}{\xreflabel}% + }% +}{% + \end{list}% +} + +% Used by @bug, @deprecated, @todo, etc. +\newenvironment{DoxyRefDesc}[1]{% + \begin{list}{}{% + \renewcommand\makelabel[1]{\textbf{##1}}% + \settowidth\labelwidth{\makelabel{#1}}% + \setlength\leftmargin{\labelwidth+\labelsep}% + }% +}{% + \end{list}% +} + +% Used by parameter lists and simple sections +\newenvironment{Desc} +{\begin{list}{}{% + \settowidth{\labelwidth}{20pt}% + \setlength{\parsep}{0pt}% + \setlength{\itemsep}{0pt}% + \setlength{\leftmargin}{\labelwidth+\labelsep}% + \renewcommand{\makelabel}{\entrylabel}% + } +}{% + \end{list}% +} + +% Used by tables +\newcommand{\PBS}[1]{\let\temp=\\#1\let\\=\temp}% +\newenvironment{TabularC}[1]% +{\tabulinesep=1mm +\begin{longtabu} spread 0pt [c]{*#1{|X[-1]}|}}% +{\end{longtabu}\par}% + +\newenvironment{TabularNC}[1]% +{\begin{tabu} spread 0pt [l]{*#1{|X[-1]}|}}% +{\end{tabu}\par}% + +% Used for member group headers +\newenvironment{Indent}{% + \begin{list}{}{% + \setlength{\leftmargin}{0.5cm}% + }% + \item[]\ignorespaces% +}{% + \unskip% + \end{list}% +} + +% Used when hyperlinks are turned off +\newcommand{\doxyref}[3]{% + \textbf{#1} (\textnormal{#2}\,\pageref{#3})% +} + +% Used to link to a table when hyperlinks are turned on +\newcommand{\doxytablelink}[2]{% + \ref{#1}% +} + +% Used to link to a table when hyperlinks are turned off +\newcommand{\doxytableref}[3]{% + \ref{#3}% +} + +% Used by @addindex +\newcommand{\lcurly}{\{} +\newcommand{\rcurly}{\}} + +% Colors used for syntax highlighting +\definecolor{comment}{rgb}{0.5,0.0,0.0} +\definecolor{keyword}{rgb}{0.0,0.5,0.0} +\definecolor{keywordtype}{rgb}{0.38,0.25,0.125} +\definecolor{keywordflow}{rgb}{0.88,0.5,0.0} +\definecolor{preprocessor}{rgb}{0.5,0.38,0.125} +\definecolor{stringliteral}{rgb}{0.0,0.125,0.25} +\definecolor{charliteral}{rgb}{0.0,0.5,0.5} +\definecolor{vhdldigit}{rgb}{1.0,0.0,1.0} +\definecolor{vhdlkeyword}{rgb}{0.43,0.0,0.43} +\definecolor{vhdllogic}{rgb}{1.0,0.0,0.0} +\definecolor{vhdlchar}{rgb}{0.0,0.0,0.0} + +% Color used for table heading +\newcommand{\tableheadbgcolor}{lightgray}% + +% Version of hypertarget with correct landing location +\newcommand{\Hypertarget}[1]{\Hy@raisedlink{\hypertarget{#1}{}}} + +% Define caption that is also suitable in a table +\makeatletter +\def\doxyfigcaption{% +\refstepcounter{figure}% +\@dblarg{\@caption{figure}}} +\makeatother diff --git a/docs/latex/files.tex b/docs/latex/files.tex new file mode 100644 index 0000000..fee9da8 --- /dev/null +++ b/docs/latex/files.tex @@ -0,0 +1,26 @@ +\section{File List} +Here is a list of all files with brief descriptions\+:\begin{DoxyCompactList} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_data_8cpp}{Data.\+cpp} }{\pageref{_data_8cpp}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_data_8h}{Data.\+h} }{\pageref{_data_8h}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_given_kinship_8cpp}{Given\+Kinship.\+cpp} }{\pageref{_given_kinship_8cpp}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_given_kinship_8h}{Given\+Kinship.\+h} }{\pageref{_given_kinship_8h}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_individual_data_8cpp}{Individual\+Data.\+cpp} }{\pageref{_individual_data_8cpp}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_individual_data_8h}{Individual\+Data.\+h} }{\pageref{_individual_data_8h}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_individual_data_set_8cpp}{Individual\+Data\+Set.\+cpp} }{\pageref{_individual_data_set_8cpp}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_individual_data_set_8h}{Individual\+Data\+Set.\+h} }{\pageref{_individual_data_set_8h}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_kinship_8cpp}{Kinship.\+cpp} }{\pageref{_kinship_8cpp}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_kinship_8h}{Kinship.\+h} }{\pageref{_kinship_8h}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{main_8cpp}{main.\+cpp} }{\pageref{main_8cpp}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_option_8cpp}{Option.\+cpp} }{\pageref{_option_8cpp}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_option_8h}{Option.\+h} }{\pageref{_option_8h}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_reml_h2r_est_8cpp}{Reml\+H2r\+Est.\+cpp} }{\pageref{_reml_h2r_est_8cpp}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_reml_h2r_est_8h}{Reml\+H2r\+Est.\+h} }{\pageref{_reml_h2r_est_8h}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_reml_hca_8cpp}{Reml\+Hca.\+cpp} }{\pageref{_reml_hca_8cpp}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_reml_hca_8h}{Reml\+Hca.\+h} }{\pageref{_reml_hca_8h}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_scorer_8cpp}{Scorer.\+cpp} }{\pageref{_scorer_8cpp}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_scorer_8h}{Scorer.\+h} }{\pageref{_scorer_8h}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_snp_kinship_8cpp}{Snp\+Kinship.\+cpp} }{\pageref{_snp_kinship_8cpp}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{_snp_kinship_8h}{Snp\+Kinship.\+h} }{\pageref{_snp_kinship_8h}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{util_8cpp}{util.\+cpp} }{\pageref{util_8cpp}}{} +\item\contentsline{section}{/\+Users/danielruskin/src/hca-\/dev/src/\hyperlink{util_8h}{util.\+h} }{\pageref{util_8h}}{} +\end{DoxyCompactList} diff --git a/docs/latex/hierarchy.tex b/docs/latex/hierarchy.tex new file mode 100644 index 0000000..1a58bc1 --- /dev/null +++ b/docs/latex/hierarchy.tex @@ -0,0 +1,22 @@ +\section{Class Hierarchy} +This inheritance list is sorted roughly, but not completely, alphabetically\+:\begin{DoxyCompactList} +\item \contentsline{section}{Data}{\pageref{class_data}}{} +\item \contentsline{section}{H2r\+Est}{\pageref{class_h2r_est}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Reml\+H2r\+Est}{\pageref{class_reml_h2r_est}}{} +\end{DoxyCompactList} +\item \contentsline{section}{Hca}{\pageref{class_hca}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Reml\+Hca}{\pageref{class_reml_hca}}{} +\end{DoxyCompactList} +\item \contentsline{section}{Individual\+Data}{\pageref{class_individual_data}}{} +\item \contentsline{section}{Individual\+Data\+Set}{\pageref{class_individual_data_set}}{} +\item \contentsline{section}{Kinship}{\pageref{class_kinship}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Given\+Kinship}{\pageref{class_given_kinship}}{} +\item \contentsline{section}{Snp\+Kinship}{\pageref{class_snp_kinship}}{} +\end{DoxyCompactList} +\item \contentsline{section}{Option}{\pageref{class_option}}{} +\item \contentsline{section}{Scorer}{\pageref{class_scorer}}{} +\item \contentsline{section}{Util}{\pageref{class_util}}{} +\end{DoxyCompactList} diff --git a/docs/latex/index.tex b/docs/latex/index.tex new file mode 100644 index 0000000..4fd8f89 --- /dev/null +++ b/docs/latex/index.tex @@ -0,0 +1,110 @@ +This repository represents a pipeline that performs three primary functions\+: + + +\begin{DoxyEnumerate} +\item Heritable Component Analysis +\item Heritability Estimation +\item \hyperlink{class_kinship}{Kinship} Matrix Generation +\end{DoxyEnumerate} + +The pipeline accepts genotypic and phenotypic data, as well as covariates, and generates a highly-\/heritable trait. It can then estimate the heritability of that trait via the second function above. If the user already has a kinship matrix available (i.\+e. from G\+C\+TA), the program can accept this matrix. Alternatively, it can use genotypic data to generate the kinship matrix. + +\section*{Usage} + +Running the program without any options will trigger the help function, which will show all options that are available. The program takes a command ({\ttfamily kinship}, {\ttfamily h2r}, {\ttfamily hca}, or {\ttfamily score}), as well as a set of options for each command. + +Generally speaking, one can follow the below guidelines when using this program\+: + + +\begin{DoxyEnumerate} +\item Obtain the following data\+: phenotypic data, quantitative and discrete covariates (optional), kinship file (optional), genotypic data (required if kinship data is not present). Ensure that individual I\+Ds are present in all of these files, and are common across each file. If an individual ID is missing from one file but present in another, it will not be included in analysis. +\item Determine the parameters for your analysis. These are specified in the “heritable component analysis” help section. There are a few options that you must consider\+: “num\+Splits” and “lambda\+Vec\+File”. “num\+Splits” controls the cross-\/validation functionality; if this is set to 1 (default), cross-\/validation will not be performed. If this is set to a value of 2 or more, cross-\/validation will be performed (see the cross-\/validation section). “lambda\+Vec\+File” must point to a file with lambda values to use during the H\+CA process; each line must represent one lambda value. +\item Determine if you would like to save output data to disk; if so, specify the “out\+Dir” parameter (set this to “.\+” to save to the current directory). In addition, specify the “num\+Threads” option (default 2) to enable multi-\/thread functionality. +\item Run H\+CA with the parameters chosen, and observe the output. Analysis may take a long time depending on the size of your dataset. +\end{DoxyEnumerate} + +Additional options are present, but are not required. Review the documentation and help output for more details. + +\section*{H\+CA Cross-\/\+Validation and Lambda Tuning} + +If “num\+Splits” is equal to one, the following process will be used for lambda tuning\+: + + +\begin{DoxyEnumerate} +\item H\+CA will be run with each lambda value. +\item For each Lambda value, Heritability analysis will be run with the generated trait. +\item The Lambda value that generates the most heritable trait trait will be saved as a result of the analysis. +\end{DoxyEnumerate} + +If the “num\+Splits” option is greater than one, the dataset will be split randomly into “num\+Splits” splits. The following process will then occur\+: + + +\begin{DoxyEnumerate} +\item The code will iterate through each lambda value. +\item For each lambda value, the code will iterate through each split. On each iteration, the chosen split will be used as cross-\/validation data; all other data will be marked as training data. H\+CA will be run with the training data and the current lambda value. Once H\+CA has been run with all splits, the average heritability score for the current lambda value will be calculated. +\item The lambda with the highest average heritability score will be considered the best. H\+CA and heritability estimation will be re-\/performed with this lambda value, on the full data set. This will be considered the final result set. +\end{DoxyEnumerate} + +\section*{Outputs} + +In addition to outputting data to the C\+LI, if an {\ttfamily out\+Dir} parameter is specified, some data will also be saved. For all analysis, if a G\+RM was generated (non-\/pregiven), that G\+RM will be saved to \char`\"{}kinship.\+csv\char`\"{}. The following analysis-\/specific data will also be saved\+: + +\subsection*{H\+CA} + +When H\+CA is run, the final weights will be saved to \char`\"{}trait\+\_\+hca.\+csv\char`\"{}. Indiviudals will be scored with these weights, and the output from the \char`\"{}\+Scoring\char`\"{} section will be saved. In addition, the output from the \char`\"{}\+Heritability Analysis\char`\"{} section will be saved for the final weights. + +\subsection*{Heritability Analysis} + +When heritability analysis is run, statistics regarding the analysis will be saved to \char`\"{}h2r\+\_\+est.\+txt\char`\"{}. + +\subsection*{Scoring} + +When scoring is run, the calculated scores will be saved to \char`\"{}scores.\+txt\char`\"{}. + +\subsection*{\hyperlink{class_kinship}{Kinship} Generation} + +When kinship generation is run, the kinship file will be saved to \char`\"{}kinship.\+txt\char`\"{}. + +\section*{Special Note on Heritability Estimation} + +In the event that the variance-\/covariance matrix is non-\/invertible during heritability estimation, small values will be added to the matrix diagonals. This will generally resolve the invertibility error, but may adversely affect the results. A warning will be outputted in the event that the add-\/to-\/diagonals approach is used. + +\section*{Documentation} + +Further documentation is available in the {\ttfamily docs} folder. + +\section*{Dependencies} + +The Linux binary should work automatically on most Linux distributions. If not, compile it for your architecture. + +The O\+SX binary requires G\+CC version 6. Install it by running {\ttfamily brew install gcc6 -\/-\/without-\/multilib} on your machine. + +\section*{Compiling} + +To compile on most Linux distributions and O\+SX, follow these steps\+: + + +\begin{DoxyEnumerate} +\item Install the Armadillo matrix library (download \href{http://arma.sourceforge.net/download.html}{\tt here} and run {\ttfamily cmake . \&\& make \&\& sudo make install}) +\item Install the N\+L\+Opt optimization library (download \href{http://ab-initio.mit.edu/nlopt/}{\tt here} and run {\ttfamily ./configure \&\& make \&\& sudo make install}) +\item Install the Open\+B\+L\+AS library \href{https://github.com/xianyi/OpenBLAS/wiki/Installation-Guide}{\tt from source}. Make sure to specify {\ttfamily D\+Y\+N\+A\+M\+I\+C\+\_\+\+A\+R\+CH=1} when running {\ttfamily make} and {\ttfamily make install}, if you plan on using the binary across multiple architectures. +\item If on Linux, run (i.\+e. {\ttfamily sudo apt-\/get install liblapack-\/dev}). If on Mac, run {\ttfamily brew install gcc6 -\/-\/without-\/multilib} and {\ttfamily brew install lapack}. +\item Run {\ttfamily make -\/-\/file Makefile\+\_\+osx} or {\ttfamily make -\/-\/file Makefile\+\_\+linux}, depending on your platform. +\end{DoxyEnumerate} + +\section*{References} + +The following references were used while preparing this program\+: + + +\begin{DoxyCode} +Sun J, Kranzler HR, Bi J. Refining multivariate disease phenotypes for high chip heritability. BMC Medical + Genomics. 2015;8(Suppl 3):S3. doi:10.1186/1755-8794-8-S3-S3. + +Yang J, Lee SH, Goddard ME, Visscher PM. GCTA: A Tool for Genome-wide Complex Trait Analysis. American + Journal of Human Genetics. 2011;88(1):76-82. doi:10.1016/j.ajhg.2010.11.011. + +Yang J, Benyamin B, McEvoy BP, et al. Common SNPs explain a large proportion of heritability for human + height. Nature genetics. 2010;42(7):565-569. doi:10.1038/ng.608. +\end{DoxyCode} + \ No newline at end of file diff --git a/docs/latex/main_8cpp.tex b/docs/latex/main_8cpp.tex new file mode 100644 index 0000000..998466f --- /dev/null +++ b/docs/latex/main_8cpp.tex @@ -0,0 +1,33 @@ +\hypertarget{main_8cpp}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/main.cpp File Reference} +\label{main_8cpp}\index{/\+Users/danielruskin/src/hca-\/dev/src/main.\+cpp@{/\+Users/danielruskin/src/hca-\/dev/src/main.\+cpp}} +{\ttfamily \#include \char`\"{}Option.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Data.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Reml\+H2r\+Est.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Reml\+Hca.\+h\char`\"{}}\newline +{\ttfamily \#include $<$cblas.\+h$>$}\newline +Include dependency graph for main.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{main_8cpp__incl} +\end{center} +\end{figure} +\subsection*{Functions} +\begin{DoxyCompactItemize} +\item +int \hyperlink{main_8cpp_a3c04138a5bfe5d72780bb7e82a18e627}{main} (int argc, char $\ast$$\ast$argv) +\begin{DoxyCompactList}\small\item\em Main method. Runs all analysis. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\subsection{Function Documentation} +\mbox{\Hypertarget{main_8cpp_a3c04138a5bfe5d72780bb7e82a18e627}\label{main_8cpp_a3c04138a5bfe5d72780bb7e82a18e627}} +\index{main.\+cpp@{main.\+cpp}!main@{main}} +\index{main@{main}!main.\+cpp@{main.\+cpp}} +\subsubsection{\texorpdfstring{main()}{main()}} +{\footnotesize\ttfamily int main (\begin{DoxyParamCaption}\item[{int}]{argc, }\item[{char $\ast$$\ast$}]{argv }\end{DoxyParamCaption})} + + + +Main method. Runs all analysis. + diff --git a/docs/latex/main_8cpp__incl.md5 b/docs/latex/main_8cpp__incl.md5 new file mode 100644 index 0000000..e30bfe4 --- /dev/null +++ b/docs/latex/main_8cpp__incl.md5 @@ -0,0 +1 @@ +a5e5490e082aa76af63e3e1a862d094c \ No newline at end of file diff --git a/docs/latex/main_8cpp__incl.pdf b/docs/latex/main_8cpp__incl.pdf new file mode 100644 index 0000000..39a2cf5 Binary files /dev/null and b/docs/latex/main_8cpp__incl.pdf differ diff --git a/docs/latex/md___users_danielruskin_src_hca-dev__r_e_a_d_m_e.tex b/docs/latex/md___users_danielruskin_src_hca-dev__r_e_a_d_m_e.tex new file mode 100644 index 0000000..4fd8f89 --- /dev/null +++ b/docs/latex/md___users_danielruskin_src_hca-dev__r_e_a_d_m_e.tex @@ -0,0 +1,110 @@ +This repository represents a pipeline that performs three primary functions\+: + + +\begin{DoxyEnumerate} +\item Heritable Component Analysis +\item Heritability Estimation +\item \hyperlink{class_kinship}{Kinship} Matrix Generation +\end{DoxyEnumerate} + +The pipeline accepts genotypic and phenotypic data, as well as covariates, and generates a highly-\/heritable trait. It can then estimate the heritability of that trait via the second function above. If the user already has a kinship matrix available (i.\+e. from G\+C\+TA), the program can accept this matrix. Alternatively, it can use genotypic data to generate the kinship matrix. + +\section*{Usage} + +Running the program without any options will trigger the help function, which will show all options that are available. The program takes a command ({\ttfamily kinship}, {\ttfamily h2r}, {\ttfamily hca}, or {\ttfamily score}), as well as a set of options for each command. + +Generally speaking, one can follow the below guidelines when using this program\+: + + +\begin{DoxyEnumerate} +\item Obtain the following data\+: phenotypic data, quantitative and discrete covariates (optional), kinship file (optional), genotypic data (required if kinship data is not present). Ensure that individual I\+Ds are present in all of these files, and are common across each file. If an individual ID is missing from one file but present in another, it will not be included in analysis. +\item Determine the parameters for your analysis. These are specified in the “heritable component analysis” help section. There are a few options that you must consider\+: “num\+Splits” and “lambda\+Vec\+File”. “num\+Splits” controls the cross-\/validation functionality; if this is set to 1 (default), cross-\/validation will not be performed. If this is set to a value of 2 or more, cross-\/validation will be performed (see the cross-\/validation section). “lambda\+Vec\+File” must point to a file with lambda values to use during the H\+CA process; each line must represent one lambda value. +\item Determine if you would like to save output data to disk; if so, specify the “out\+Dir” parameter (set this to “.\+” to save to the current directory). In addition, specify the “num\+Threads” option (default 2) to enable multi-\/thread functionality. +\item Run H\+CA with the parameters chosen, and observe the output. Analysis may take a long time depending on the size of your dataset. +\end{DoxyEnumerate} + +Additional options are present, but are not required. Review the documentation and help output for more details. + +\section*{H\+CA Cross-\/\+Validation and Lambda Tuning} + +If “num\+Splits” is equal to one, the following process will be used for lambda tuning\+: + + +\begin{DoxyEnumerate} +\item H\+CA will be run with each lambda value. +\item For each Lambda value, Heritability analysis will be run with the generated trait. +\item The Lambda value that generates the most heritable trait trait will be saved as a result of the analysis. +\end{DoxyEnumerate} + +If the “num\+Splits” option is greater than one, the dataset will be split randomly into “num\+Splits” splits. The following process will then occur\+: + + +\begin{DoxyEnumerate} +\item The code will iterate through each lambda value. +\item For each lambda value, the code will iterate through each split. On each iteration, the chosen split will be used as cross-\/validation data; all other data will be marked as training data. H\+CA will be run with the training data and the current lambda value. Once H\+CA has been run with all splits, the average heritability score for the current lambda value will be calculated. +\item The lambda with the highest average heritability score will be considered the best. H\+CA and heritability estimation will be re-\/performed with this lambda value, on the full data set. This will be considered the final result set. +\end{DoxyEnumerate} + +\section*{Outputs} + +In addition to outputting data to the C\+LI, if an {\ttfamily out\+Dir} parameter is specified, some data will also be saved. For all analysis, if a G\+RM was generated (non-\/pregiven), that G\+RM will be saved to \char`\"{}kinship.\+csv\char`\"{}. The following analysis-\/specific data will also be saved\+: + +\subsection*{H\+CA} + +When H\+CA is run, the final weights will be saved to \char`\"{}trait\+\_\+hca.\+csv\char`\"{}. Indiviudals will be scored with these weights, and the output from the \char`\"{}\+Scoring\char`\"{} section will be saved. In addition, the output from the \char`\"{}\+Heritability Analysis\char`\"{} section will be saved for the final weights. + +\subsection*{Heritability Analysis} + +When heritability analysis is run, statistics regarding the analysis will be saved to \char`\"{}h2r\+\_\+est.\+txt\char`\"{}. + +\subsection*{Scoring} + +When scoring is run, the calculated scores will be saved to \char`\"{}scores.\+txt\char`\"{}. + +\subsection*{\hyperlink{class_kinship}{Kinship} Generation} + +When kinship generation is run, the kinship file will be saved to \char`\"{}kinship.\+txt\char`\"{}. + +\section*{Special Note on Heritability Estimation} + +In the event that the variance-\/covariance matrix is non-\/invertible during heritability estimation, small values will be added to the matrix diagonals. This will generally resolve the invertibility error, but may adversely affect the results. A warning will be outputted in the event that the add-\/to-\/diagonals approach is used. + +\section*{Documentation} + +Further documentation is available in the {\ttfamily docs} folder. + +\section*{Dependencies} + +The Linux binary should work automatically on most Linux distributions. If not, compile it for your architecture. + +The O\+SX binary requires G\+CC version 6. Install it by running {\ttfamily brew install gcc6 -\/-\/without-\/multilib} on your machine. + +\section*{Compiling} + +To compile on most Linux distributions and O\+SX, follow these steps\+: + + +\begin{DoxyEnumerate} +\item Install the Armadillo matrix library (download \href{http://arma.sourceforge.net/download.html}{\tt here} and run {\ttfamily cmake . \&\& make \&\& sudo make install}) +\item Install the N\+L\+Opt optimization library (download \href{http://ab-initio.mit.edu/nlopt/}{\tt here} and run {\ttfamily ./configure \&\& make \&\& sudo make install}) +\item Install the Open\+B\+L\+AS library \href{https://github.com/xianyi/OpenBLAS/wiki/Installation-Guide}{\tt from source}. Make sure to specify {\ttfamily D\+Y\+N\+A\+M\+I\+C\+\_\+\+A\+R\+CH=1} when running {\ttfamily make} and {\ttfamily make install}, if you plan on using the binary across multiple architectures. +\item If on Linux, run (i.\+e. {\ttfamily sudo apt-\/get install liblapack-\/dev}). If on Mac, run {\ttfamily brew install gcc6 -\/-\/without-\/multilib} and {\ttfamily brew install lapack}. +\item Run {\ttfamily make -\/-\/file Makefile\+\_\+osx} or {\ttfamily make -\/-\/file Makefile\+\_\+linux}, depending on your platform. +\end{DoxyEnumerate} + +\section*{References} + +The following references were used while preparing this program\+: + + +\begin{DoxyCode} +Sun J, Kranzler HR, Bi J. Refining multivariate disease phenotypes for high chip heritability. BMC Medical + Genomics. 2015;8(Suppl 3):S3. doi:10.1186/1755-8794-8-S3-S3. + +Yang J, Lee SH, Goddard ME, Visscher PM. GCTA: A Tool for Genome-wide Complex Trait Analysis. American + Journal of Human Genetics. 2011;88(1):76-82. doi:10.1016/j.ajhg.2010.11.011. + +Yang J, Benyamin B, McEvoy BP, et al. Common SNPs explain a large proportion of heritability for human + height. Nature genetics. 2010;42(7):565-569. doi:10.1038/ng.608. +\end{DoxyCode} + \ No newline at end of file diff --git a/docs/latex/refman.tex b/docs/latex/refman.tex new file mode 100644 index 0000000..234d124 --- /dev/null +++ b/docs/latex/refman.tex @@ -0,0 +1,171 @@ +\documentclass[twoside]{book} + +% Packages required by doxygen +\usepackage{fixltx2e} +\usepackage{calc} +\usepackage{doxygen} +\usepackage[export]{adjustbox} % also loads graphicx +\usepackage{graphicx} +\usepackage[utf8]{inputenc} +\usepackage{makeidx} +\usepackage{multicol} +\usepackage{multirow} +\PassOptionsToPackage{warn}{textcomp} +\usepackage{textcomp} +\usepackage[nointegrals]{wasysym} +\usepackage[table]{xcolor} + +% Font selection +\usepackage[T1]{fontenc} +\usepackage[scaled=.90]{helvet} +\usepackage{courier} +\usepackage{amssymb} +\usepackage{sectsty} +\renewcommand{\familydefault}{\sfdefault} +\allsectionsfont{% + \fontseries{bc}\selectfont% + \color{darkgray}% +} +\renewcommand{\DoxyLabelFont}{% + \fontseries{bc}\selectfont% + \color{darkgray}% +} +\newcommand{\+}{\discretionary{\mbox{\scriptsize$\hookleftarrow$}}{}{}} + +% Page & text layout +\usepackage{geometry} +\geometry{% + a4paper,% + top=2.5cm,% + bottom=2.5cm,% + left=2.5cm,% + right=2.5cm% +} +\tolerance=750 +\hfuzz=15pt +\hbadness=750 +\setlength{\emergencystretch}{15pt} +\setlength{\parindent}{0cm} +\setlength{\parskip}{3ex plus 2ex minus 2ex} +\makeatletter +\renewcommand{\paragraph}{% + \@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{% + \normalfont\normalsize\bfseries\SS@parafont% + }% +} +\renewcommand{\subparagraph}{% + \@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{% + \normalfont\normalsize\bfseries\SS@subparafont% + }% +} +\makeatother + +% Headers & footers +\usepackage{fancyhdr} +\pagestyle{fancyplain} +\fancyhead[LE]{\fancyplain{}{\bfseries\thepage}} +\fancyhead[CE]{\fancyplain{}{}} +\fancyhead[RE]{\fancyplain{}{\bfseries\leftmark}} +\fancyhead[LO]{\fancyplain{}{\bfseries\rightmark}} +\fancyhead[CO]{\fancyplain{}{}} +\fancyhead[RO]{\fancyplain{}{\bfseries\thepage}} +\fancyfoot[LE]{\fancyplain{}{}} +\fancyfoot[CE]{\fancyplain{}{}} +\fancyfoot[RE]{\fancyplain{}{\bfseries\scriptsize Generated by Doxygen }} +\fancyfoot[LO]{\fancyplain{}{\bfseries\scriptsize Generated by Doxygen }} +\fancyfoot[CO]{\fancyplain{}{}} +\fancyfoot[RO]{\fancyplain{}{}} +\renewcommand{\footrulewidth}{0.4pt} +\renewcommand{\chaptermark}[1]{% + \markboth{#1}{}% +} +\renewcommand{\sectionmark}[1]{% + \markright{\thesection\ #1}% +} + +% Indices & bibliography +\usepackage{natbib} +\usepackage[titles]{tocloft} +\setcounter{tocdepth}{3} +\setcounter{secnumdepth}{5} +\makeindex + +% Hyperlinks (required, but should be loaded last) +\usepackage{ifpdf} +\ifpdf + \usepackage[pdftex,pagebackref=true]{hyperref} +\else + \usepackage[ps2pdf,pagebackref=true]{hyperref} +\fi +\hypersetup{% + colorlinks=true,% + linkcolor=blue,% + citecolor=blue,% + unicode% +} + +% Custom commands +\newcommand{\clearemptydoublepage}{% + \newpage{\pagestyle{empty}\cleardoublepage}% +} + +\usepackage{caption} +\captionsetup{labelsep=space,justification=centering,font={bf},singlelinecheck=off,skip=4pt,position=top} + +%===== C O N T E N T S ===== + +\begin{document} + +% Titlepage & ToC +\hypersetup{pageanchor=false, + bookmarksnumbered=true, + pdfencoding=unicode + } +\pagenumbering{alph} +\begin{titlepage} +\vspace*{7cm} +\begin{center}% +{\Large H\+CA }\\ +\vspace*{1cm} +{\large Generated by Doxygen 1.8.13}\\ +\end{center} +\end{titlepage} +\clearemptydoublepage +\pagenumbering{roman} +\tableofcontents +\clearemptydoublepage +\pagenumbering{arabic} +\hypersetup{pageanchor=true} + +%--- Begin generated contents --- +\chapter{Heritable Component Analysis Pipeline} +\label{index}\hypertarget{index}{}\input{index} +\chapter{Hierarchical Index} +\input{hierarchy} +\chapter{Class Index} +\input{annotated} +\chapter{Class Documentation} +\input{class_data} +\input{class_given_kinship} +\input{class_h2r_est} +\input{class_hca} +\input{class_individual_data} +\input{class_individual_data_set} +\input{class_kinship} +\input{class_option} +\input{class_reml_h2r_est} +\input{class_reml_hca} +\input{class_scorer} +\input{class_snp_kinship} +\input{class_util} +%--- End generated contents --- + +% Index +\backmatter +\newpage +\phantomsection +\clearemptydoublepage +\addcontentsline{toc}{chapter}{Index} +\printindex + +\end{document} diff --git a/docs/latex/util_8cpp.tex b/docs/latex/util_8cpp.tex new file mode 100644 index 0000000..827bb94 --- /dev/null +++ b/docs/latex/util_8cpp.tex @@ -0,0 +1,11 @@ +\hypertarget{util_8cpp}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/util.cpp File Reference} +\label{util_8cpp}\index{/\+Users/danielruskin/src/hca-\/dev/src/util.\+cpp@{/\+Users/danielruskin/src/hca-\/dev/src/util.\+cpp}} +{\ttfamily \#include \char`\"{}util.\+h\char`\"{}}\newline +Include dependency graph for util.\+cpp\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=200pt]{util_8cpp__incl} +\end{center} +\end{figure} diff --git a/docs/latex/util_8cpp__incl.md5 b/docs/latex/util_8cpp__incl.md5 new file mode 100644 index 0000000..1bdc9fa --- /dev/null +++ b/docs/latex/util_8cpp__incl.md5 @@ -0,0 +1 @@ +b8e4db3e4cb78af37acab63f8a425a22 \ No newline at end of file diff --git a/docs/latex/util_8cpp__incl.pdf b/docs/latex/util_8cpp__incl.pdf new file mode 100644 index 0000000..02cdad9 Binary files /dev/null and b/docs/latex/util_8cpp__incl.pdf differ diff --git a/docs/latex/util_8h.tex b/docs/latex/util_8h.tex new file mode 100644 index 0000000..10ea53c --- /dev/null +++ b/docs/latex/util_8h.tex @@ -0,0 +1,24 @@ +\hypertarget{util_8h}{}\section{/\+Users/danielruskin/src/hca-\/dev/src/util.h File Reference} +\label{util_8h}\index{/\+Users/danielruskin/src/hca-\/dev/src/util.\+h@{/\+Users/danielruskin/src/hca-\/dev/src/util.\+h}} +{\ttfamily \#include $<$armadillo$>$}\newline +Include dependency graph for util.\+h\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=190pt]{util_8h__incl} +\end{center} +\end{figure} +This graph shows which files directly or indirectly include this file\+: +\nopagebreak +\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[width=350pt]{util_8h__dep__incl} +\end{center} +\end{figure} +\subsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \hyperlink{class_util}{Util} +\end{DoxyCompactItemize} diff --git a/docs/latex/util_8h__dep__incl.md5 b/docs/latex/util_8h__dep__incl.md5 new file mode 100644 index 0000000..9a537a8 --- /dev/null +++ b/docs/latex/util_8h__dep__incl.md5 @@ -0,0 +1 @@ +92024445c05e375b309e59ba10468a3f \ No newline at end of file diff --git a/docs/latex/util_8h__dep__incl.pdf b/docs/latex/util_8h__dep__incl.pdf new file mode 100644 index 0000000..24ee08e Binary files /dev/null and b/docs/latex/util_8h__dep__incl.pdf differ diff --git a/docs/latex/util_8h__incl.md5 b/docs/latex/util_8h__incl.md5 new file mode 100644 index 0000000..8198213 --- /dev/null +++ b/docs/latex/util_8h__incl.md5 @@ -0,0 +1 @@ +07d28f69ab25c49a5c38520afde58716 \ No newline at end of file diff --git a/docs/latex/util_8h__incl.pdf b/docs/latex/util_8h__incl.pdf new file mode 100644 index 0000000..f4c931f Binary files /dev/null and b/docs/latex/util_8h__incl.pdf differ diff --git a/docs/uml/UML.png b/docs/uml/UML.png new file mode 100644 index 0000000..91be8f2 Binary files /dev/null and b/docs/uml/UML.png differ diff --git a/docs/uml/draw_io_UML.xml b/docs/uml/draw_io_UML.xml new file mode 100644 index 0000000..5131377 --- /dev/null +++ b/docs/uml/draw_io_UML.xml @@ -0,0 +1 @@ +7Z1rc9u20sc/jWfcM5Mz4k2Xl740qad26tZ90nNeZWgRlthSpEpRdtxPfwCSoHhZWpDF3ThPttNpLYqkJP5/ABaLxe6Jc7H68iH118ubJBDRiT0Kvpw4lye2bXtTR/5PHXkujlgT1yqOLNIwKI/tDtyF/4jy4Kg8ug0DsWmcmCVJlIXr5sF5EsdinjWO+WmaPDVPe0ii5qeu/YXoHLib+1H36B9hkC2Lo1NvtDv+kwgXS/3J1qh8596f/7VIk21cft6J7Tzk/xRvr3x9r/L8zdIPkqfaIefHE+ciTZKs+Gv15UJE6uHqx1Zc977n3ep7pyLOTC5Q76krHv1oW/72Sz/zyy+XPesHsnkKV5Efy1fny2wVyYOW/PMhibO78qSRfD1fhlFw7T8nW/Xhm0w+DP3qfJmk4T/yfF9fLN9Os1J6e6zuFkbRRRIlqTwQJ8VnVRfdqZuVH5OKjbzsVv9Iqzp07W8y/VWSKPLXm/A+/3LqlJWfLsL4PMmyZFWepH/V+9on7xRzzrtPs3zAjyLNxJfaofLpfhDJSmTpszylfHdaCq1bwmhavH7aYeVoGJY1pMaaKL9EeVHdeien/KNUtEddp6PuiX2uGlPqh/KDzvLmsvLVX86ZhLOju/yVWVPzTZYmf4mWToB0fhQuYvkyEg/qDuqJhbKBnZWHs2Stbrb252G8uM7PuXR3R34rn4Q69LQMM3Enj6vv9CR7HHkskfd7iPKWswyDQMSKgSST6N5XNK6TMM7yp+edy3/l87wY/ds78eTvupCvrd1r+a86Pc0uknijnk0ut5A0PQlFFABC1XD2k1BKLxk3Ul6fd5Twbo/wYRyEj2Gw9SPVzO9ECcFV5zCDgAaCZxOC4PWAEPmr+8D/JOYFAJssKDqBRzmcSvXssb9SjzdSPzpItuph6mOL4kGMi/fCR/ln49B92j4iv2XjPGYLi62J4fAyCFtjgC2ACoXbZp6kIt0YwHaXnwnDxhxRcWSNXDqQHKiT6gFJjU+nv6yzMIlP1PcpMSn+m+THf2BcyHFxRoS4TM1xiRI/YFzeHC4eoS1sjaBZUIeXd2r2niTqyrkfX0tu3vur07l6CvIQI/TWEJoSWtHWqGvqvKtIiO836n+PiTy96HEOIocZQZtxmzpbhmHEaFjqYNPsc26XIk6413mzRDmEZrFlGdnFe4j69SJ5ZKDeLFBjQsPZsiC34H6gaiMb0/SmaZpS2tWWqV39Uvd0wUC9YaAci9LK1h9maGUfhg5DggaJQ2lmW1YHEqPZ/N3HW+5n3ixCY0q7ejQ71gximN4yTDNSm3o0gBX0u4rHYKLeKlGuRWpXTw4ygw5khylBo8SlNJbtIfqdax0F8j6MBPc/b5asMamFfbR5xFh9G1jNCK1uu7s80ow67CjNMcc1EQ+JObYmOni4PyrMHQE6TyfW8UJbk66XudNZrFOxCB9F/CFdXQVFVJhCnBu7aWOfGkPRH34MMjBEWx93PcPKIROLJ9abSm8gyhhNb2vS7dy7TV4ELD2J9Kbd/TDSG8xW5S/V0lexv/KYfPqMAR4GUAwvIgcGIVLxdnUTbjbycX8QcfJJnbnhHoECBSA+FxGFbtwKNBq8eucJc4LGCRCYi8hJ19HQ5WSpnhuD8tZAAcJvEUEB5xNNUP6+SB4ZlDcHChSDiwiKvR+UOYPyJkEBQmvxQKmcanUfd0vcKGz7HgtxdUYI61XKrqQe6hO0lL8rpS/fWR25na7cDiBj5N+L6DbZhLlz3blMi3Nb8tJ4mAyNzOnxAjrQ6tf569r0aCGyWxGc8uIoKhyE44ALte5j6JBGKOOBigewFAXjMUDnodfph8IjD4pnPBDxcPTwvBeP2QB49GXNeSUeF4wHNh6eRTi49KVUKQMgNiK7U/7u046re5T7wT+KJ4YBEwa9IkECA5QDpdFXVOIvNBesPqL6rt7tT7LOvXcWwurTqq/Hf5K23135bA8Et/Uwl9N8kUteziMAMgWeR0gBtO2/SLWXlbPHBgSsPKbyU0pDEIqTbbb/j2XEEzd9qqinEaHx5/UN/1XTr/Rn0TFFdwhtPq/Pt1gb9VWkGzd5KvU9QptPR1W+MNrn4rPimIpPCe07r2+GXxvlgbC2svlDEW/cIeDiMbYIjUCvzwjc2QAQHQwAJgAOpRHYN/8r+wc/COSQkKetZdExRR9TGoF7XD+p2BSrxqw7uu5TQvNvvMf4V42dVSdQfWIRmoDjPqN/p7oKAWDV0VV3CS07a7K/sV+w7BSyjwntOQea77W0/b4jQ4+tgWWbFgsYINRr3A3W2F/riBMPvFJoa+Q0pQZ2onpjQGlrMrOPF9sGEib3JcCpJSA4k71gwP23afOvmtQxqQdACgZJMwLkOO5lQASsPbL2QBoCRO0N9olVftlbEUjxNiw+nvim3f8w4ndnab0NX87RueUjiw+lH0BUvztZe6HpS/257SPLD1j5iPJ3QzH6Gr/aKMyNH1t9IJEAnvpAQuf+xq9cddz4keUH0gMgym+QfUrnPeXGTzDfA/b8I6pvkICqavwX3Pjx5Qd28iPKb5B3Sjf+ZcptH93XQ2n2jQwcfru2v0y56SOrDxSgQlTf3NW3EHHCbR9ZfahaFKL6Bs6+KuV4Uv7B4qOJD1SBQhPfmhkYfXfx+ucw3izDtRK99oIhQIMAqOOE2AMYeHz9dOUXW3FXfh6Qm66u4pCTjWJCANRfQoTAwPELQMAA4AEAlUtCHAoMXL8vZm7JJwittC1yqsiEIBIClEpCJOQ144ScMPBAgUwBkBMOkQKD2SJEAROASACQ9g2RAANXYTVSrOQzbQwTnZwu8gNH7RJGrWEkbLx9Fdz4PP1ADTYitDytmYHzsYImCjdZk6eTWpqgVDwI+cPn4rN6+GvRslD2ULYHu+v8o5k6NOpcUnPXwO31orlb5w56v9PP7aNts47C7NZPs6uAneuYnOns5iSc6W11vA9iQAVnhgbvADsfpq/KYgrMhRu1Ok+KjKbLlHc8YYIyHhEOKTpWp0NKazYEgKAyGjAJqCQ4hJ3+tOtLLUioVlEzHT/FqqOq7hF6RqZdB2o3hcnd9v5POV5w5hJc3aeE/pBpd/5q2u+ffWQOUDfOWISOjGnXLWbKgcpsr/PcfVFzQ3X1aMRsYLLhUNqGfYlu9rORF01hOIjh0LlKKOAA6je2siDNk3geRoIHC9xdloTGIlDpu50OsQi6O61i71q9QxGKx0kQcaGYWoSWJFADvA2F8hTkmXL2DhxxItkoVtcODtvYpdss8iwyYpiIuYRGKlBevI1YVqbY5IRM6MqPCU1QoJp4W/mLZZqLfqxre75MeVxCRkcHY5Gg0w35aWdwk09Z08O6I+o+syiN1L61LyBzX7dUkzplr/UBl/vrdCjlpzBamGi5lE7TvvmPgUOEV02QQZhQek37nB+kwTcAZne1cBzmDZW3GaEZDGxzaPFGGWIIcLe7gwo4ZPJwc2vZhGb0+OW5dyuEPrepueQBCQUuoVE96wsOGTRk/sWO5cZfM1G4RE0IbenxHrdxrXRK/yytWGFcq6pbg03b1sWnMmqYqFkjU2t9MgBq+6v0qFGLa3eQKG938/njdTJ7FqnrJVtQfUHr8lOYLVS2vG4ZKDw/Y9+crNGrcG0YGuV1OAqJ8vtrw/xK4mH+mz3MBGxVieZI2LJNehUuPUSjvNMtOYXnU+5brzTYiZOuONiSHA6P0JB1vZ5AiKb/Tb4ufC9rP5Z/58PGHnz0JfIb1K+C7lSQ9keYLZNtsdJwwMWnB5xbRGuYnt3C/oArDzn3h95zuY31t7FOe4Ka3QttbEpo0Lu91b6N9kLU2wX3xtSkOCPCCYDbVwKYuDdWvgvujrk7JmtkDuFMyLa63XEn2UnTg7sr68cTI9zyPmPTidEA7nvb7s6JXwChTsGe3jYWTx9UNtC97pg9kTkdgyBdXQW8/wAXQcqNT7tyqEYI7hatrx4+JlmRM6HrCWyBEwZMDCYxLuWuKNvuLg/0ETNPhZ8JTqeCTwDlpiXbAguTjRqi3/iyM5iLDdA7ZM9rMfzQFAZFRsBd9ESewe2K+x5c8ig3TdmWQU20BoYcnY4OAOXWJ9syqJDRHHx4yoRdE5NyD5SrM0G0xp4XRxJ4sqR9OiqCpXQyMSVoHhaPcjuTOzaY1RyJTNM9yeTgkUO5/8kddxerj+xf5skjQ4IOCeWmJXcMZqs+EhLuUIhYGWu3Kw0rYD79Y1hZpCuGBB0Syk1ILrAX7XhIuEOhYoVye5EL7C9SrLSL/Cgb9f1WXcrKoyk/Md7tM4jysN+1rby0JVh4bOFtUnsTdHt2hJd9PguPLbxHaTxqI6QmpggW4q58KX/sMlkksR/9uDsqH+E2VjXBiwdYU13+yPT5P+q4fGLly/+Wp/0psuz5LvxH3dbfZomSp7r7dZIXK7FOIJdh+RAzP10I/du1s0d92dpZ3ceaisjPwkfRuBX0yMpLb5NibacU0NX9ry7S6jmtx75JtulclJftnnznTu+scetWM133W9+q+IWdW52lqf9cO60ktvc7y09y4S+9o6K4546R6okZYjP7ZrAp9CmxsR2AJR28OjBLh8rmag+DVm0yaah28AVHy1w9rtqw0FcNfPMUriK/XdfoIYkzDYVSc74Mo+Daf5azBnlkk/nzv/Sr82WShv/I8/3dGOKnWSm97OzA8WN30Z26WfkxqdjIy241DFZ16NpXHXXxVZIo8tebsBgJ1CkrCUUYnydZlqzKk/Svel/75BPbecj/eYk6g+UN/a7lNVV0XdNQQdfuR9A82gLaPON00pO0LIHVZy4GfcCq164lGS97Udp/8tYmEGzlL3Xsz4X+8VUcPDIBiARQGoLVTRoEFHHiQfi4ixHvQHFUXrYw+CTmtXj0xkcxWmhoTSgjQF0orWhL3O+7JOIrFLRGhi7BAWoiVrHo+zoH1aRLA/H0B27W5M3askiHDCg50B4qAI+SfEgHpkKDShiEcVAPzSytk2NjQIsBilH+Cig7pJsUoGxHMMovzot6MgwwQF8BoDHlmpkHzaJNABp085TIrlR/xbx9Dd5mhCt1tgOl0GLeviPeqk2+NHO4bv/2QW0VZXfwwO7gd5X7t9TZHXmGO4YtaxClwXCyZidS2NiRfHpn83myjTMRvE9SlUmWG7xhg68a1Nt0CLvQ3I59NscpaOrQHcJl45rPaKp9lflv384zYEvlX0U/L+Vs76xsnxIG6iS2COg7iDGlAeoZGaB9W+c2/qO4Ck5z4kCY2hv84+DqkpmiZ2pKOegAWcTu4jWbmAObmLbVtjD1YEFjYQIpwKBgw7PPH7lpGzftqu28TXvSY3tyeAUp7UmP7cnvrYMgtSfHr3Vo7l+BOfvIDsqvgA+p6QhsmP1lnffQbDYO5pnUKxxVCEp3ibY6p67wbPpCrLS5xODG+W6EojUuIxTnqxV7JM1b+HiIEFVQ/2FauIFfumtErD7fyyYhblPxEH5hGBBhAIxRRBgMEtxCMKiyL+9zm5NJQCMBCC5FJMEgXxdEwpxJwCcBClJFRMEgdx+EQjnRZBqwaXC6E0pEGsC97MY0XF0yD9g8eJT2I1B00IiHPM0Fo4CMwpTSegSqEBqhoH5+xixgzypN3QrDsGDvZ6EId6qGhrt0zgBgAuBQWo0TMNVeEwBdU1QysPIfLrZZ8vDACKB6lihNxYmBZ7GOQLjZyOeuqg4wCvgoAOsIiCi8yssY+av7wP8k5mwcINPgADscEWkwcDOW+w23RcrMDauPqT6wKRBR/Ve6FpNtdhmmDAImCMDmPkQQ4Ox4elog2/7vy1T4ATd+VM2BDXaImhu4D0sA/C9XmUh/mvssP6L8LrDfDU/+qYG3sCm/zT0+qvw62RmN/FC0Y0vd7zxc9RUSjg2ttyHiVWfdBgwED5aRqvKHbURZedxPF/MiJHW+9GWbHv3rX/LQI5d4QkVjQtm5z7r+f4CNWiyZKlO/WuWF3kblniWGAS+SaETZ1evqci/D0J3nSSZ+LWNImAuiCDPK2f8Mylp3fgLtVFDdA6NAioJHOf+fQcl9elH4eRdOxDTQ0DCl9AzMoFy5+2gowomYBxIexiNSaxLKnNvLw20ZTsQo0KDgkNqSUJ7UXhR+1+FEzAINCx6p/QjteC4ylWaNoeEunTMANABMSa1GyIeoAKhCSSQDNzqciBGg2ZtiEZqKzqjHCdlEoB1OxCjQoOAQWonOqMfnCJsGv+QhBAwCDQhjQhvR0c7NfrvgYxVPwAAQbVgkNAyd0UGOxet6aCHzQMLD1CK0E51Rn3ex3iEUwYWsP43+LqmR2OdPrPS/qSKMGAAaAMakpmGfA7EDgM0mIREAelWYBgCDQOP7JFHXLJ/VflQgodqGA1QwgZhZpCbiqzIZ5FFMH6XoZSRT2JdZLykzY+3KJXHQ09dgyqU0M4E6r7+JVSTHlB+BwYSzpNUUNBJVZ0mbteo32C6wndWbADJ7jjeEzgY72HRqvHaa7QROmceNvqfR7xrVUVl3IRiGafMG+9faaZdbSChzg4FABAJK4osHhIGluQcIrvuNywNUmhePBwNDcw8P84SrgGPyABb6xQPCYNtbG4hHP52vuvUZGIIBIQBSp+FBABQX3AvBhvMeoAIA5ErDAwDIpt0BQGdUlw891vnUK1dDLd16/X3omqoOpekFzZKVdQcH5acaX6hDPQ7/JF2DGjpgerOHMM7n0ioxRc9F3GrxWi2Q1g6x1drcarnVcqs92kUDJCDEa7Vut9V21P2+t5q/RkJTn+sAW80dtyegp9nz7pztp33u11g8/VJbmtkz8ZZn3+bOObNzPyi/jdmpFwmv/ODiCSSzQOxhegKMwFQIUph5GWfAACCuApAOMT0RRr2lWX/ZZuttxgzgMjCjdOy5e3cpVsZ1j50OvV+ZyS/bvkBRtveVicuYoWLm2JSuQ/eQnIkQUXA5Pw1WKo2osysVC+crO+l0jy2TRMEnP71QzmkDy+e2OKvamxMli2tmE5VNl9Kr6b5isUsB9+MNFnBMFypdOrc/DV2H1Js5vOdbp+K3bfyTiNaCjXNkbmaUxrl3SF2aw7kJdddVosMd2LcDomtTzhC8Q6rivKoDuzqMRR1XYADiXGXfkhMK5hGVR49yKqED417isVFpXv7qTzkyh4BVWfsq0FFezgShEgTk+UQkyCCModxXE27k75a/YyGCAbsl2ec9foJgC655bokdVwtkEcVDDagumC/4AEnheWtFTb5DtlZYuijUSzsrxpDEznSInRUmZQN5Z8VADb5qUMfsrABhGKa9Gxgnl/JxdUkI8qPMARoHwIYKRA4MTAzjFZa1H/asrwC2xr5wo6Im2a3UL5EXxnOOz8WEDti1gQjdIfUK7+WvLJPISHuBGcBjANqpgQiBwT7P9vREsaCyjsYi+INRwEQB2K+BiAJXq0GQENhxAUo4RAghUG6qL4Rw7pvGD8L2pzxJvcHOB1R4gPqEeO1/alTPpvSV5r+ZVxBx5QdKFSLK352LcnjfV2fABuoVIjJgFONbTzt8Xp8XMAu4LADx3ogsGIX7wu6EeojmeW22wIAg+y4p/QfTnljgttvKl7Kc1Fatkvs/xTwLH8X7bTzPw+HKTITHBQkX//3Sylb2+jstUj8oblaOef9aPX9+kF/5c8CGLzbIQFA7Isg99Vb2gVzFC2TfGslMMDbBULw8IsHw+kH/9uL2mkJ3zaA1sNfjDlq05c/wjzBb3vqpv9qc7iLfd/7i/pWHylRY9+1CbJ+YpwoyCJtYpKsfeOPzV0AfCMfHQx8ovHo3T1KRdjTmiImaegdFTDjO6N9O7Z9WakrbscwEt8ZDeDmBkqocQIHV/Kvm9TYDKICaqvtzTKnugRFARIA0dgKskMfLVscpaBqIMEh/3lPhrtmKi0HddNFqXx/QjrA1zYChHnjGMydM9KaE44fbV1rvUCdnTid7N1HBsCzCYcXtq7S3bznsKg7CxzDY+pFaH78TQCcStk9hblC5cQi94i5QheX/srAbMsez0Zp2B81GPR3mov0NFlCovWf+6QygsGXUM1Tu4hcduJ2qKi3f2kYVbDt/vhRRKL+otH+6ZViKSHC4REugruPexbh32bXeNznddfUIeOhKRV7T5/fkMn/dwxBjgokJ5ZTYtYxSCVaYFMWbSkau4owB+QqAUIb+u/Zh/Uh7UhyqPa7ZjS/p+NLe59qeHK36xqbYX5VbUsrNs36kqhU/n0nBlE2df63Rgx9tBJOHSR7phgPXPqxvegm9u+fVurPPmvn75vij3OXgWlCwR7FIrCZfDZnHf28T/ca7TT6xOpMnuNP1l92bek25jJO/itfbrLbsXNzUeNk5n3bVxPK3WVJ8cv72IfSU7mi3I/nlMBOxd+NZcyHwHSCk7QJC6vOOExLy+w8o5J2crPkL8V1IOZnsV9IZoSkJLQAMoeRZ7EfPm3DzXWj4zrLspmNEjuxdo9KCSoMOIqMN+dKHkPHnMN4sw/X3oaLXKvzp2NOueWaB6SkGERFybtUDyV4ronKChlkojqhF8Q3JaLntIJmZXuakkbEbF3FTpJEZncaJaovP+cpEuFpHYiV/pwi6Ri67qF+p/nRsULzX1ic1ivdOBhDf7XbEN1WFZtafoHpzVfvuRQDA6s2DAGB3tBTBQmjV5IRumSwSaRz9uDsqp4nbWM18i6dUE1w+h/T5P+q4nBWWL/9bnvanyLLnUk/VHaspaHX36yTvZa2XHuom2aZzob93eVBCshC6O9RdmfoFLz78VES+2lbSuD/0HPNLz9LUf66dUA4DuzvfJoVfVGtaNauqOEwZ9vi+74pxO9NU6wr5R/EtdqpWP8dQaGdQob+EWU1n+eq/bwKB6skPh4B5U+raQ1zrfuDe0mvNPuUcxTPrLXWvepzE3jfaW7pAbzn5ik1l/P/nObrDjzrmz7Fru3OXM2yX0/ZcglsYEHucrg/6VgQ/X5VuDjbR6ado7sjt+srwpmjesIYbVV9ZLcE0zbMJUV8pX6aJ8irt7OXUXy9vkkCoM/4H \ No newline at end of file diff --git a/src/Data.cpp b/src/Data.cpp new file mode 100644 index 0000000..f8e0fdd --- /dev/null +++ b/src/Data.cpp @@ -0,0 +1,404 @@ +#include "Data.h" +#include +#include +#include + +#include "SnpKinship.h" +#include "GivenKinship.h" + +//! A constructor. +Data::Data(Option &option) +{ + load(option); +} + +//! Loads data based on the provided option argument. +/*! + Loads the following individual-specific data: + 1. FAM data + 2. SNP data + 3. Phenotype data + 4. Covariate data (quantitative and categorial/discrete) + + Loads the following non-individual-specific data: + 1. Trait file (for scoring) + 2. Lambda vector file +*/ +void Data::load(Option &option) +{ + // Load individual data + if(canLoadFam(option)) { + individualDataSet.addingPedData(); + individualDataSet.addingPhenData(); + loadFam(option); + } + if(canLoadSNP(option)) { + individualDataSet.settingGenoData(); + loadSNP(option); + } + if(canLoadPheno(option)) { + individualDataSet.addingPhenData(); + loadPheno(option); + } + if(canLoadQCov(option)) { + individualDataSet.addingQCovData(); + loadQCov(option); + } + if(canLoadCCov(option)) { + individualDataSet.addingCCovData(); + loadCCov(option); + } + individualDataSet.setOption(option); + individualDataSet.reconcile(); + + // Load non-individual-specific data + if(!individualDataSet.getPhen(-1).empty() && canLoadTrait(option)) { + loadTrait(option); + + // This is a hack to let us store a Scorer object on the class + // (which contains references) + scorers.push_back(Scorer(option, individualDataSet.getPhen(-1), trait)); + } + if(canLoadLambdaVecFile(option)) { + loadLambdaVecFile(option); + } +} + +//! Returns true if the FAM file can be loaded. +bool Data::canLoadFam(const Option &option) { + std::ifstream famFile ((option.getBFilePrefix() + ".fam").c_str(), std::ios::binary); + return !!famFile; +} + +//! Loads data from the FAM file. +void Data::loadFam(const Option &option) { + std::cout << "Loading FAM file..." << std::endl; + + std::ifstream famFile ((option.getBFilePrefix() + ".fam").c_str(), std::ios::binary); + famFile.seekg(std::ios::beg); + std::string read; + + int at = 0; + while(getline(famFile,read)) + { //create ped and phen arrays, gets col and rows of .fam file + std::vector sep = Util::splitByDelimeter(read, " "); + std::string idStd = sep[0] + ":" + sep[1]; + + std::vector pedData; + pedData.push_back(Util::parseToDouble(sep[4].c_str())); + + if(pedData[0] != 0 && pedData[0] != 1 && pedData[0] != 2) { + throw(std::runtime_error("Found invalid PED value! Please make sure your FAM file is valid.")); + } + + std::vector phenData; + try { + phenData.push_back(Util::parseToDouble(sep[5].c_str())); + } catch(std::runtime_error &e) { + std::string msg = e.what(); + + if(msg.find("non-numeric") != std::string::npos) { + // Error here means that the data is missing + phenData.push_back(-9); + } else { + // Some other irrelevant error + throw; + } + } + + individualDataSet.addPedData(idStd, at, pedData); + individualDataSet.addPhenData(idStd, phenData); + + at = at + 1; + } + +} + +//! Returns true if the phenotype file can be loaded. +bool Data::canLoadPheno(const Option &option) { + std::ifstream phenFile ((option.getPhenFile()).c_str(), std::ios::binary); + return !!phenFile; +} + +//! Loads data from the phenotype file. +void Data::loadPheno(const Option &option) { + std::cout << "Loading phenotype file..." << std::endl; + + std::ifstream phenFile ((option.getPhenFile()).c_str(), std::ios::binary); + std::string read; + + while(phenFile >> read) + { + std::vector sep = Util::splitByDelimeter(read, ","); + + if(sep.size() < 2) { + throw(std::runtime_error("Unable to find individual IDs in phenotype file column! Verify your file is valid.")); + } + + std::string idStd = sep[0] + ":" + sep[1]; + std::vector phenData; + for(unsigned int i = 2; i < sep.size(); i++) { + phenData.push_back(Util::parseToDouble(sep[i].c_str())); + } + + individualDataSet.addPhenData(idStd, phenData); + } +} + +//! Returns true if the quantatative covariate file can be loaded. +bool Data::canLoadQCov(const Option &option) { + std::ifstream covFile ((option.getQCovFile()).c_str(), std::ios::binary); + + return !!covFile; +} + +//! Loads data from the quantatative covariate file. +void Data::loadQCov(const Option &option) { + std::cout << "Loading quantatative covariate file..." << std::endl; + + std::ifstream covFile ((option.getQCovFile()).c_str(), std::ios::binary); + std::string read; + + while(covFile >> read) + { + std::vector sep = Util::splitByDelimeter(read, ","); + + if(sep.size() < 2) { + throw(std::runtime_error("Unable to find individual IDs in quantatative covariate file column! Verify your file is valid.")); + } + + std::string idStd = sep[0] + ":" + sep[1]; + std::vector covData; + for(unsigned int i = 2; i < sep.size(); i++) { + covData.push_back(Util::parseToDouble(sep[i].c_str())); + } + + individualDataSet.addQCovData(idStd, covData); + } +} + +//! Returns true if the categorical covariate file can be loaded. +bool Data::canLoadCCov(const Option &option) { + std::ifstream covFile ((option.getCCovFile()).c_str(), std::ios::binary); + + return !!covFile; +} + +//! Loads data from the categorical covariate file. +void Data::loadCCov(const Option &option) { + std::cout << "Loading categorial covariate file..." << std::endl; + + std::ifstream covFile ((option.getCCovFile()).c_str(), std::ios::binary); + std::string read; + + std::vector > rowIds; + while(covFile >> read) + { + std::vector sep = Util::splitByDelimeter(read, ","); + + if(sep.size() < 2) { + throw(std::runtime_error("Unable to find individual IDs in categorical covariate file column! Verify your file is valid.")); + } + + std::string idStd = sep[0] + ":" + sep[1]; + + std::vector covData; + for(unsigned int i = 2; i < sep.size(); i++) { + // Get existing possible values, or create a new vector to hold them. + std::vector currRowIds; + unsigned int at = i - 2; + if(rowIds.size() > at) { + currRowIds = rowIds[at]; + } + + double value; + auto idStrFound = std::find(currRowIds.begin(), currRowIds.end(), sep[i]); + + if(idStrFound == currRowIds.end()) { + value = currRowIds.size(); + currRowIds.push_back(sep[i]); + + // Replace vector in rowIds storage to reflect new + // possible value. + if(rowIds.size() > at) { + rowIds[at] = currRowIds; + } else { + rowIds.push_back(currRowIds); + } + } else { + value = std::distance(currRowIds.begin(), idStrFound); + } + + covData.push_back(value); + } + + individualDataSet.addCCovData(idStd, covData); + } +} + +//! Returns true if the BIM and BED files can be loaded. +bool Data::canLoadSNP(const Option &option) { + std::ifstream bimFile((option.getBFilePrefix() + ".bim").c_str(), std::ios::binary); + std::ifstream genoFile((option.getBFilePrefix() + ".bed").c_str(), std::ios::binary); + + return !!bimFile && !!genoFile; +} + +//! Loads data from the BIM and BED files. +void Data::loadSNP(const Option &option) { + std::cout << "Loading BIM/BED files..." << std::endl; + std::ifstream bimFile((option.getBFilePrefix() + ".bim").c_str(), std::ios::binary); + std::ifstream genoFile((option.getBFilePrefix() + ".bed").c_str(), std::ios::binary); + + // Figure out how many SNPs we have from BIM file, + // and read in chromosomes. + int snpCount = 0; + std::string line; + std::vector data; + std::vector m_chr; + while(getline(bimFile, line)) { + snpCount = snpCount + 1; + data = Util::splitByDelimeter(line, "\t"); + + m_chr.push_back(Util::parseToInt(data[0].c_str())); + } + + // Read and validate first three bytes of the BED file + char * memblock = new char [3]; + genoFile.read(memblock, 3); + if(memblock[0] == 108 && memblock[1] == 27) //"magic" numbers at beginning of .bed file + { + if(memblock[2] != 1) + { + std::cout << "Error: Data is not in SNP-major mode." << std::endl; + } + } + else + { + std::cout << "Error: Data is not a proper .bed file." << std::endl; + } + + // Pull in genetic data + int numSubjects = individualDataSet.getNumSubjects(); + std::vector numMissingValues(numSubjects); + arma::mat m_geno(numSubjects, snpCount); + for(int snpIndx = 0; snpIndx < snpCount; snpIndx++) { + int indiIndx = 0; + while(indiIndx < numSubjects) { + genoFile.read(memblock, 1); + if(!genoFile) { + throw(std::runtime_error("Error reading BED file! Make sure your file is not corrupted.")); + } + std::bitset<8> b = memblock[0]; + + int bitIndex = 0; + while(bitIndex < 7 && indiIndx < numSubjects) { + bool b2 = !b[bitIndex++]; + bool b1 = !b[bitIndex++]; + + if(!b1 || b2) { + double snpVal = b1 + b2; + m_geno(indiIndx, snpIndx) = snpVal; + } + else { + numMissingValues[indiIndx] += 1; + m_geno(indiIndx, snpIndx) = 1e6; + } + + indiIndx++; + } + } + } + + individualDataSet.setChrData(m_chr); + individualDataSet.setGenoData(m_geno, numMissingValues); +} + +//! Returns true if the trait file can be loaded. +bool Data::canLoadTrait(const Option &option) { + std::ifstream traitFile(option.getTraitFile().c_str(), std::ios::binary); + + return !!traitFile; +} + +//! Loads data from the trait file. +void Data::loadTrait(const Option &option) { + std::cout << "Loading trait file..." << std::endl; + std::ifstream traitFile(option.getTraitFile().c_str(), std::ios::binary); + std::string read; + + // When we have a trait file, we will always have a phenotype file. + // Figure out how many rows we're expecting from the phenotype file. + std::list< std::reference_wrapper >::iterator iter = individualDataSet.getIndividualList().begin(); + IndividualData firstIndividual = *iter; + trait.resize(firstIndividual.getPhen().size(), 1); + + // Load trait file + unsigned int at = 0; + while(getline(traitFile,read)) { + trait(at, 0) = Util::parseToDouble(read.c_str()); + at = at + 1; + } + + if(at != firstIndividual.getPhen().size()) { + throw(std::runtime_error("The number of rows in the trait file differs from the number of phenotypes!")); + } +} + +//! Returns true if the lambda vector file can be loaded. +bool Data::canLoadLambdaVecFile(const Option &option) { + std::ifstream lambdaVecFile(option.getLambdaVecFile().c_str(), std::ios::binary); + + return !!lambdaVecFile; +} + +//! Loads data from the lambda vector file. +void Data::loadLambdaVecFile(const Option &option) { + std::cout << "Loading lambda vec file..." << std::endl; + std::ifstream lambdaVecFile(option.getLambdaVecFile().c_str(), std::ios::binary); + std::string read; + + // Load trait file + while(getline(lambdaVecFile,read)) { + lambdaVec.push_back(Util::parseToDouble(read.c_str())); + } +} + +//! Writes the Kinship file to disk. +void Data::writeKinship(std::string outDir) +{ + arma::mat& grm = individualDataSet.getGrm(-1); + arma::mat& AN = individualDataSet.getAN(); + std::list< std::reference_wrapper > individualList = individualDataSet.getIndividualList(); + + // Output kinship file + std::filebuf fb; + fb.open (outDir.c_str(),std::ios::out); + std::ostream os(&fb); + os.precision(7); + for(int i=0; i >::iterator iter = individualList.begin(); + while(iter != individualList.end()) { + IndividualData& individual = (*iter).get(); + std::vector idSplit = Util::splitByDelimeter(individual.getStrId(), ":"); + + osId << idSplit[0] << "\t" << idSplit[1]; + osId << std::endl; + + iter++; + } + fbId.close(); +} diff --git a/src/Data.h b/src/Data.h new file mode 100644 index 0000000..a6ab4bf --- /dev/null +++ b/src/Data.h @@ -0,0 +1,56 @@ +/* + * data.h + * + * Created on: Feb 10, 2016 + * Author: Joey + */ + +#ifndef DATA_H_ +#define DATA_H_ + +#include +#include +#include +#include +#include +#include + +#include "IndividualDataSet.h" +#include "Option.h" +#include "Scorer.h" + +//! A class to load all relevant data. Responsible solely for loading data - not for reconciling missing individuals. +/*! + Loads data into the userDataSet, trait, lambdaVec, and scorers fields. +*/ +class Data +{ + public: + Data(Option &option); + void load(Option &option); + void writeKinship(std::string outDir); + + IndividualDataSet individualDataSet; + arma::mat trait; + std::vector lambdaVec; + std::vector scorers; + + private: + bool canLoadFam(const Option &option); + void loadFam(const Option &option); + bool canLoadPheno(const Option &option); + void loadPheno(const Option &option); + bool canLoadQCov(const Option &option); + void loadQCov(const Option &option); + bool canLoadCCov(const Option &option); + void loadCCov(const Option &option); + bool canLoadSNP(const Option &option); + void loadSNP(const Option &option); + bool canLoadTrait(const Option &option); + void loadTrait(const Option &option); + bool canLoadLambdaVecFile(const Option &option); + void loadLambdaVecFile(const Option &option); +}; + + +#endif /* DATA_H_ */ diff --git a/src/GivenKinship.cpp b/src/GivenKinship.cpp new file mode 100644 index 0000000..cb533b6 --- /dev/null +++ b/src/GivenKinship.cpp @@ -0,0 +1,76 @@ +/* + * GivenKinship.cpp + * + * Created on: Jan 25, 2017 + * Author: Daniel + */ + +#include "GivenKinship.h" + +//! Constructor. Loads and parses the kinship file into a matrix. +void GivenKinship::construct(std::string kinshipfile, std::string kinshipidfile) +{ + std::cout << "Loading kinship file..." << std::endl; + + // Part 1: Save IDs from kinship ID file + std::string data; + + std::ifstream kinshipIdFile (kinshipidfile, std::ios::binary); + kinshipIdFile.seekg(std::ios::beg); + + while(getline(kinshipIdFile, data)) { + // Break if empty line + if(data.empty()) { + break; + } + + // Split by delimiter, and get various relevant values + std::vector splitData = Util::splitByDelimeter(data, " "); + + std::string familyId = splitData[0]; + std::string indId = splitData[1]; + + std::string canonicalId = familyId + ":" + indId; + saveId(canonicalId); + } + + kinshipIdFile.clear(); + kinshipIdFile.close(); + + // Part 2: Generate GRM with kinship file + m_grm.set_size(idVec.size(), idVec.size()); + + std::ifstream kinshipFile (kinshipfile, std::ios::binary); + kinshipFile.seekg(std::ios::beg); + + while(getline(kinshipFile, data)) { + // Break if empty line + if(data.empty()) { + break; + } + + // Split by delimiter, and get various relevant values + std::vector splitData = Util::splitByDelimeter(data, " "); + + std::string indOneIdStr = splitData[0]; + std::string indTwoIdStr = splitData[1]; + int indOneId = Util::parseToInt(indOneIdStr.c_str()) - 1; + int indTwoId = Util::parseToInt(indTwoIdStr.c_str()) - 1; + + std::string relStr = splitData[3]; + float rel = Util::parseToDouble(relStr.c_str()); + + m_grm(indOneId, indTwoId) = m_grm(indTwoId, indOneId) = rel; + } + + kinshipFile.clear(); + kinshipFile.close(); +} + +//! Keeps track of individual IDs as they are seen in the individual ID file. +/*! + Saves individual IDs to the idVec. +*/ +void GivenKinship::saveId(const std::string &indId) { + idVec.push_back(indId); +} diff --git a/src/GivenKinship.h b/src/GivenKinship.h new file mode 100644 index 0000000..c07cbc8 --- /dev/null +++ b/src/GivenKinship.h @@ -0,0 +1,30 @@ +/* + * givenkinship.h + * + * Created on: Jan 25, 2017 + * Author: Daniel + */ + +#ifndef GIVENKINSHIP_H_ +#define GIVENKINSHIP_H_ + +#include +#include "Kinship.h" +#include +#include "Util.h" + +//! A class to load a pregiven kinship matrix. +/*! + Used if ksSrc is pregiven. +*/ +class GivenKinship : public Kinship +{ + public: + void construct(std::string kinshipfile, std::string kinshipidfile); + private: + int lastAccountedForId = 0; + void saveId(const std::string &indID); +}; + + +#endif /* GIVENKINSHIP_H_ */ diff --git a/src/H2rEst.h b/src/H2rEst.h new file mode 100644 index 0000000..0b279d1 --- /dev/null +++ b/src/H2rEst.h @@ -0,0 +1,24 @@ +/* + * H2rEst.h + * + * Created on: April 17, 2017 + * Author: Daniel + */ + +#ifndef H2REST_H_ +#define H2REST_H_ + +#include +#include +#include +#include +#include + +//! A class used to perform heritability analysis. +class H2rEst +{ + +}; + + +#endif /* H2REST_H_ */ diff --git a/src/Hca.h b/src/Hca.h new file mode 100644 index 0000000..0721084 --- /dev/null +++ b/src/Hca.h @@ -0,0 +1,24 @@ +/* + * Hca.h + * + * Created on: April 17, 2017 + * Author: Daniel + */ + +#ifndef HCA_H_ +#define HCA_H_ + +#include +#include +#include +#include +#include + +//! A class used to perform heritable component analysis. +class Hca +{ + +}; + + +#endif /* HCA_H_ */ diff --git a/src/IndividualData.cpp b/src/IndividualData.cpp new file mode 100644 index 0000000..0ccae13 --- /dev/null +++ b/src/IndividualData.cpp @@ -0,0 +1,111 @@ +/* + * IndividualData.cpp + * + * Created on: March 22, 2017 + * Author: Daniel + */ + +#include "IndividualData.h" + +//! Returns PED data for this individual. +std::vector& IndividualData::getPed() { + return ped; +} + +//! Returns phenotypic data for this individual. +std::vector& IndividualData::getPhen() { + return phen; +} + +//! Returns quantitative covariate data for this individual. +std::vector& IndividualData::getQCov() { + return qCov; +} + +//! Returns categorical covariate data for this individual. +std::vector& IndividualData::getCCov() { + return cCov; +} + +//! Sets the string ID for this individual (i.e. the ID provided in input files). +void IndividualData::setStrId(std::string strIdNew) { + strId = strIdNew; +} + +//! Returns the string ID for this individual. +std::string IndividualData::getStrId() const { + return strId; +} + +//! Sets the number of missing genotypic values for this individual. +void IndividualData::setNumMissingGenoValues(int numMissingGenoValuesNew) { + numMissingGenoValues = numMissingGenoValuesNew; +} + +//! Returns the number of missing genotypic values for this individual. +int IndividualData::getNumMissingGenoValues() { + return numMissingGenoValues; +} + +//! Sets this individual's position in the pregiven GRM. +void IndividualData::setPregivenGrmId(int idNew) { + pregivenGrmId = idNew; +} + +//! Returns this individual's position in the pregiven GRM. +int IndividualData::getPregivenGrmId() const { + return pregivenGrmId; +} + +//! Sets this individual's position in the final GRM. +void IndividualData::setNewGrmId(int idNew) { + newGrmId = idNew; +} + +//! Returns this individual's position in the final GRM. +int IndividualData::getNewGrmId() const { + return newGrmId; +} + +//! Sets this individual's position in the genotypic data matrix. +void IndividualData::setPedId(int idNew) { + pedId = idNew; +} + +//! Returns this individual's position in the genotypic data matrix. +int IndividualData::getPedId() const { + return pedId; +} + +//! Adds data from the PED file to this individual. +void IndividualData::addPedData(std::vector& pedNew) { + for(unsigned int i = 0; i < pedNew.size(); i++) { + ped.push_back(pedNew[i]); + } +} + +//! Deletes all phenotypic data on this individual. +void IndividualData::resetPhenData() { + phen.resize(0); +} + +//! Adds phenotypic data to this individual. +void IndividualData::addPhenData(std::vector& phenNew) { + for(unsigned int i = 0; i < phenNew.size(); i++) { + phen.push_back(phenNew[i]); + } +} + +//! Adds quantitative covariate data to this individual. +void IndividualData::addQCovData(std::vector& qCovNew) { + for(unsigned int i = 0; i < qCovNew.size(); i++) { + qCov.push_back(qCovNew[i]); + } +} + +//! Adds categorical covariate data to this individual. +void IndividualData::addCCovData(std::vector& cCovNew) { + for(unsigned int i = 0; i < cCovNew.size(); i++) { + cCov.push_back(cCovNew[i]); + } +} diff --git a/src/IndividualData.h b/src/IndividualData.h new file mode 100644 index 0000000..38c8925 --- /dev/null +++ b/src/IndividualData.h @@ -0,0 +1,66 @@ +/* + * IndividualData.h + * + * Created on: March 22, 2017 + * Author: Daniel + */ + +#ifndef INDIVIDUAL_DATA_H_ +#define INDIVIDUAL_DATA_H_ + +#include +#include +#include + +//! A class to represent data associated with a given individual. +/*! + IndividualData objects are generally kept track of with a IndividualDataSet. +*/ +class IndividualData +{ + public: + std::vector& getPed(); + std::vector& getPhen(); + std::vector& getQCov(); + std::vector& getCCov(); + + void setStrId(std::string strIdNew); + std::string getStrId() const; + + void setPregivenGrmId(int idNew); + int getPregivenGrmId() const; + + void setNewGrmId(int idNew); + int getNewGrmId() const; + + void setPedId(int idNew); + int getPedId() const; + + void setNumMissingGenoValues(int numMissingGenoValuesNew); + int getNumMissingGenoValues(); + + void addPedData(std::vector& pedNew); + + void resetPhenData(); + void addPhenData(std::vector& phenNew); + + void addQCovData(std::vector& qCovNew); + + void addCCovData(std::vector& cCovNew); + + private: + int pregivenGrmId = -1; + int newGrmId = -1; + int pedId = -1; + std::string strId; + + int numMissingGenoValues = -1; + + std::vector ped; + std::vector phen; + std::vector qCov; + std::vector cCov; +}; + + +#endif /* INDIVIDUAL_DATA_H_ */ diff --git a/src/IndividualDataSet.cpp b/src/IndividualDataSet.cpp new file mode 100644 index 0000000..cab7b83 --- /dev/null +++ b/src/IndividualDataSet.cpp @@ -0,0 +1,505 @@ +/* + * IndividualDataSet.cpp + * + * Created on: March 22, 2017 + * Author: Daniel + */ + +#include "IndividualDataSet.h" + +//! Indicate that a pregiven GRM will be added to this IndividualDataSet. +void IndividualDataSet::addingPregivenGrm() { + pregivenGrmAdded = true; +} + +//! Add a pregiven GRM to this IndividualDataSet. +void IndividualDataSet::addPregivenGrm(arma::mat& newGrm, std::vector& grmIds) { + // This will copy the GRM. + grmInit = newGrm; + + for(unsigned int i = 0; i < grmIds.size(); i++) { + addIndividualIfNotAdded(grmIds[i]); + individualDataIdMap[grmIds[i]].setPregivenGrmId(i); + } +} + +//! Indicate that PED data will be added to this IndividualDataSet. +void IndividualDataSet::addingPedData() { + pedAdded = true; +} + +//! Add PED data to this IndividualDataSet, for the provided individual ID. +void IndividualDataSet::addPedData(std::string id, int pedId, std::vector& pedData) { + addIndividualIfNotAdded(id); + individualDataIdMap[id].addPedData(pedData); + individualDataIdMap[id].setPedId(pedId); + + if(numPedCols == -1) { + numPedCols = pedData.size(); + } else if((unsigned)numPedCols != pedData.size()) { + throw(std::runtime_error("PED column number mismatch! Make sure all individuals have the same amount of columns in your PLINK data files.")); + } +} + +//! Indicate that phenotypic data will be added to this IndividualDataSet. +/*! + Wipes any existing phenotypic data. +*/ +void IndividualDataSet::addingPhenData() { + if(phenAdded) { + // Reset existing phen data + std::list< std::reference_wrapper >::iterator iter = individualDataList.begin(); + int at = 0; + while(iter != individualDataList.end()) { + IndividualData individual = *iter; + + // Set it in the ID map so it persists + individualDataIdMap[individual.getStrId()].resetPhenData(); + + iter++; + at = at + 1; + } + } + + phenAdded = true; +} + +//! Add phenotypic data to this IndividualDataSet, for the provided individual ID. +void IndividualDataSet::addPhenData(std::string id, std::vector& phenData) { + addIndividualIfNotAdded(id); + individualDataIdMap[id].addPhenData(phenData); + + if(option.getCmmd() == 2) { + for(unsigned int i = 0; i < phenData.size(); i++) { + if(phenData[i] == -9) { + throw(std::runtime_error("Phenotypic data is missing on an individual! HCA analysis cannot be performed. Please impute or clean your data.")); + } + } + } +} + +//! Indicate that quantitative covariate data will be added to this IndividualDataSet. +void IndividualDataSet::addingQCovData() { + qCovAdded = true; +} + +//! Add quantitative covariate data to this IndividualDataSet, for the provided individual ID. +void IndividualDataSet::addQCovData(std::string id, std::vector& qCovData) { + addIndividualIfNotAdded(id); + individualDataIdMap[id].addQCovData(qCovData); + + if(numQCovCols == -1) { + numQCovCols = qCovData.size(); + } else if((unsigned)numQCovCols != qCovData.size()) { + throw(std::runtime_error("Quantitative covariate column number mismatch! Make sure all individuals have the same amount of columns in your quantitative covariate file.")); + } +} + +//! Indicate that categorical covariate data will be added to this IndividualDataSet. +void IndividualDataSet::addingCCovData() { + cCovAdded = true; +} + +//! Add categorical covariate data to this IndividualDataSet, for the provided individual ID. +void IndividualDataSet::addCCovData(std::string id, std::vector& cCovData) { + addIndividualIfNotAdded(id); + individualDataIdMap[id].addCCovData(cCovData); + + if(numCCovCols == -1) { + numCCovCols = cCovData.size(); + } else if((unsigned)numCCovCols != cCovData.size()) { + throw(std::runtime_error("Categorical covariate column number mismatch! Make sure all individuals have the same amount of columns in your categorical covariate file.")); + } +} + +//! Indicate that chromsome data will be added to this IndividualDataSet. +void IndividualDataSet::addingChrData() { + chrAdded = true; +} + +//! Add chromosome data to this IndividualDataSet. +void IndividualDataSet::setChrData(std::vector& chrData) { + chr = chrData; +} + +//! Indicate that genotypic data will be added to this IndividualDataSet. +void IndividualDataSet::settingGenoData() { + genoAdded = true; +} + +//! Add genotypic data to this IndividualDataSet. +void IndividualDataSet::setGenoData(arma::mat& genoNew, std::vector numMissingValues) { + if(individualDataIdMap.size() != genoNew.n_rows) { + throw("Unable to add geno data before individual data is populated!"); + } + genoInit = genoNew; + + // Geno data is always in same order as list (insertion order from PED data). + // So iterate through and add the numMissingValues data to each individual. + std::list< std::reference_wrapper >::iterator iter = individualDataList.begin(); + int at = 0; + while(iter != individualDataList.end()) { + IndividualData individual = *iter; + + // Set it in the ID map so it persists + individualDataIdMap[individual.getStrId()].setNumMissingGenoValues(numMissingValues[at]); + + iter++; + at = at + 1; + } +} + +//! Sets the Option object on this individualDataSet. +void IndividualDataSet::setOption(Option &optionNew) { + option = optionNew; +} + +//! Creates a IndividualData instance for the provided ID, if one is not yet present. +/*! + Note that IndividualData instances are stored in two places: + 1. A std::vector (maintains insertion order; used when one wants to iterate through individuals in the same order as the generated matrices) + 2. A std::map (allows for key-based access) + + Both data structures are used for different purposes. Both contain the same objects (the vector contains references to objects in the map). If you are editing data, take care that you do not inadvertently copy from the map/vector (you want to edit the referenced objects directly). +*/ +void IndividualDataSet::addIndividualIfNotAdded(std::string &id) { + std::map::iterator result = individualDataIdMap.find(id); + + if(result == individualDataIdMap.end()) { + IndividualData newIndividualData; + newIndividualData.setStrId(id); + individualDataIdMap.insert(std::make_pair(id, newIndividualData)); + individualDataList.push_back(std::ref(individualDataIdMap[id])); + } +} + +//! Reconciles data by removing individuals with missing data. +/*! + Once data is reconciled, also generates final matrices with all individuals that are still included. + + Generates several matrix formats, including: + 1. The "full" matrix, with all individuals included. + 2. If splitting is enabled: one matrix for each split of the data + 3. If splitting is enabled: one matrix with all information except for a single split of the data - this is run with respect to *every* split. +*/ +void IndividualDataSet::reconcile() { + // Load pregiven GRM if needed + if(option.getKinshipSrc() == 2 && option.getCmmd() != 3) { + std::cout << "Reconciling data (loading GRM)..." << std::endl; + + GivenKinship givenKinship; + givenKinship.construct(option.getKinshipFile(), option.getKinshipIDFile()); + + arma::mat& givenGrm = givenKinship.getGrm(); + std::vector& givenIdVec = givenKinship.getIdVec(); + + addingPregivenGrm(); + addPregivenGrm(givenGrm, givenIdVec); + } + + // Remove any individuals with missing data + std::cout << "Reconciling data (checking for missing individuals)..." << std::endl; + std::list< std::reference_wrapper >::iterator iter = individualDataList.begin(); + while(iter != individualDataList.end()) { + IndividualData individual = *iter; + + // Erase individual if any data is missing + bool shouldErase = false; + shouldErase = shouldErase || (pregivenGrmAdded && individual.getPregivenGrmId() == -1); + shouldErase = shouldErase || (pedAdded && individual.getPed().empty()); + shouldErase = shouldErase || (phenAdded && individual.getPhen().empty()); + shouldErase = shouldErase || (cCovAdded && individual.getCCov().empty()); + shouldErase = shouldErase || (qCovAdded && individual.getQCov().empty()); + shouldErase = shouldErase || (genoAdded && individual.getPed().empty()); // Geno data always has same indiv as PED data + + // We may also want to erase if a pregiven GRM was not provided, + // and a significant portion of the individual's genotype is missing. + if(!pregivenGrmAdded && option.getMissingGenoCutoff() != -1) { + shouldErase = shouldErase || ((double) individual.getNumMissingGenoValues()) / genoInit.n_cols >= option.getMissingGenoCutoff(); + } + + // We may also want to erase if the primary command is h2r, + // and the phenotypic data in the first col is missing. + if(option.getCmmd() == 1 && phenAdded && individual.getPhen().size() >= 1) { + shouldErase = shouldErase || individual.getPhen()[0] == -9; + } + + if(shouldErase) { + // Erase returns next iterator to look at + individualDataIdMap.erase(individual.getStrId()); + iter = individualDataList.erase(iter); + continue; + } + + iter++; + } + std::cout << "Reconciling data: keeping " << individualDataList.size() << " individuals!" << std::endl; + + if(individualDataList.size() == 0) { + throw(std::runtime_error("Error: no individuals are included in the analysis!")); + } + + std::vector idVec; + for(std::list< std::reference_wrapper >::iterator iter = individualDataList.begin(); iter != individualDataList.end(); iter++) { + IndividualData& individual = *iter; + idVec.push_back(individual.getStrId()); + } + + if(genoAdded) { + createGeno(); + } + if(pedAdded) { + createPed(); + } + if(!pregivenGrmAdded) { + snpKinship.construct(option, ped, chr, geno); + grmInit = snpKinship.getGrm(); + } + + if(option.getNumSplits() != 1) { + std::random_shuffle(idVec.begin(), idVec.end()); + + std::vector newVec; + + std::size_t splitSize = idVec.size() / option.getNumSplits(); + std::vector::iterator iter = idVec.begin(); + std::vector currVec; + unsigned int at = 0; + while(iter != idVec.end()) { + currVec.push_back(*iter); + + if(currVec.size() > splitSize || at == idVec.size() - 1) { + splitPartIds.push_back(currVec); + currVec.clear(); + } + + iter++; + at = at + 1; + } + + for(int i = 0; i < option.getNumSplits(); i++) { + createMatrices("split", splitPartIds[i], i); + + std::vector withoutSplitIdVec; + for(int j = 0; j < option.getNumSplits(); j++) { + if(i != j) { + withoutSplitIdVec.insert(std::end(withoutSplitIdVec), std::begin(splitPartIds[j]), std::end(splitPartIds[j])); + } + } + createMatrices("withoutSplit", withoutSplitIdVec, i); + } + } + createMatrices("full", idVec, -1); +} + +//! Creates a matrix for the genotypic data. +/*! + Although a genotypic data matrix may have been provided, we need to re-create it to reflect deleted individuals. +*/ +void IndividualDataSet::createGeno() { + std::cout << "Reconciling data (creating geno matrix)..." << std::endl; + + arma::mat newGeno(individualDataIdMap.size(), genoInit.n_cols); + + unsigned int at = 0; + std::list< std::reference_wrapper >::iterator iter = individualDataList.begin(); + while(iter != individualDataList.end()) { + IndividualData& individual = *iter; + + newGeno.row(at) = genoInit.row(individual.getPedId()); + + at++; + iter++; + } + + geno = newGeno; +} + +//! Creates covariate and phenotypic matrices. +void IndividualDataSet::createMatrices(std::string type, std::vector& idVec, int splitId) { + std::cout << "Reconciling data (building matrices)..." << std::endl; + + IndividualData& firstIndividual = *individualDataList.begin(); + + arma::mat newCov; + arma::mat newPhen; + arma::mat newGrm(idVec.size(), idVec.size()); + + if(qCovAdded || cCovAdded) { + newCov.resize(idVec.size(), firstIndividual.getQCov().size() + firstIndividual.getCCov().size()); + } + if(phenAdded) { + newPhen.resize(idVec.size(), firstIndividual.getPhen().size()); + } + + for(unsigned int i = 0; i < idVec.size(); i++) { + IndividualData& outer = individualDataIdMap[idVec[i]]; + + if(qCovAdded || cCovAdded) { + arma::rowvec covIndividual(outer.getQCov()); + covIndividual = arma::join_horiz(covIndividual, arma::rowvec(outer.getCCov())); + + newCov.row(i) = covIndividual; + } + if(phenAdded) { + newPhen.row(i) = arma::rowvec(outer.getPhen()); + } + + for(unsigned int j = 0; j < idVec.size(); j++) { + IndividualData& inner = individualDataIdMap[idVec[j]]; + + double grmVal; + if(pregivenGrmAdded) { + grmVal = grmInit(outer.getPregivenGrmId(), inner.getPregivenGrmId()); + } else { + grmVal = grmInit(outer.getPedId(), inner.getPedId()); + } + + newGrm(i, j) = newGrm(j, i) = grmVal; + } + } + + if(type == "full") { + if(qCovAdded || cCovAdded) { + covFull = newCov; + } + if(phenAdded) { + phenFull = newPhen; + } + grmFull = newGrm; + } else if(type == "split") { + if(qCovAdded || cCovAdded) { + covSplit.push_back(newCov); + } + if(phenAdded) { + phenSplit.push_back(newPhen); + } + grmSplit.push_back(newGrm); + } else if(type == "withoutSplit") { + if(qCovAdded || cCovAdded) { + covWithoutSplit.push_back(newCov); + } + if(phenAdded) { + phenWithoutSplit.push_back(newPhen); + } + grmWithoutSplit.push_back(newGrm); + } +} + +//! Creates the PED matrix. +void IndividualDataSet::createPed() { + IndividualData& firstIndividual = *individualDataList.begin(); + arma::mat newPed(individualDataIdMap.size(), firstIndividual.getPed().size()); + + unsigned int at = 0; + std::list< std::reference_wrapper >::iterator iter = individualDataList.begin(); + while(iter != individualDataList.end()) { + IndividualData& individual = *iter; + + newPed.row(at) = arma::rowvec(individual.getPed()); + + at++; + iter++; + } + + ped = newPed; +} + +//! Returns the number of individuals currently being kept track of. +int IndividualDataSet::getNumSubjects() { + return individualDataIdMap.size(); +} + +//! Returns true if covariate data has been added. +bool IndividualDataSet::getCovAdded() { + return qCovAdded || cCovAdded; +} + +//! Returns the generated genotypic data matrix. +arma::mat& IndividualDataSet::getGeno() { + return geno; +} + +//! Returns the provided chromosome data. +std::vector& IndividualDataSet::getChr() { + return chr; +} + +//! Returns the generated genetic relationship matrix. +arma::mat& IndividualDataSet::getGrm(int idx) { + if(idx == -1) { + return grmFull; + } else { + return grmSplit[idx]; + } +} + +//! Returns the AN matrix (only available if the matrix was generated from SNP data). +arma::mat& IndividualDataSet::getAN() { + return snpKinship.getAN(); +} + +//! Returns the covariate data associated with the given index (based on split number). +arma::mat& IndividualDataSet::getCov(int idx) { + if(idx == -1) { + return covFull; + } else { + return covSplit[idx]; + } +} + +//! Returns the phenotypic data associated with the given index (based on split number). +arma::mat& IndividualDataSet::getPhen(int idx) { + if(idx == -1) { + return phenFull; + } else { + return phenSplit[idx]; + } +} + +//! Returns the covariates with all individuals EXCEPT for those in the provided split number. +arma::mat& IndividualDataSet::getCovWithoutSplit(int idx) { + if(idx == -1) { + return covFull; + } else { + return covWithoutSplit[idx]; + } +} + +//! Returns the phenotypic data with all individuals EXCEPT for those in the provided split number. +arma::mat& IndividualDataSet::getPhenWithoutSplit(int idx) { + if(idx == -1) { + return covFull; + } else { + return phenWithoutSplit[idx]; + } +} + +//! Returns the GRM data with all individuals EXCEPT for those in the provided split number. +arma::mat& IndividualDataSet::getGrmWithoutSplit(int idx) { + if(idx == -1) { + return grmFull; + } else { + return grmWithoutSplit[idx]; + } +} + +//! Returns the PED data associated with the given index (based on split number). +arma::mat& IndividualDataSet::getPed() { + return ped; +} + +//! Returns the IndividualData objects in a list data structure. +std::list< std::reference_wrapper >& IndividualDataSet::getIndividualList() { + return individualDataList; +} + +//! Returns the IndividualData objects in a map data structure. +std::map& IndividualDataSet::getIndividualMap() { + return individualDataIdMap; +} + +//! Returns the IDs associated with each "split". +std::vector< std::vector >& IndividualDataSet::getSplitPartIds() { + return splitPartIds; +} diff --git a/src/IndividualDataSet.h b/src/IndividualDataSet.h new file mode 100644 index 0000000..7a05c3b --- /dev/null +++ b/src/IndividualDataSet.h @@ -0,0 +1,105 @@ +/* + * UserDataSet.h + * + * Created on: March 22, 2017 + * Author: Daniel + */ + +#ifndef INDIVIDUAL_DATA_SET_H_ +#define INDIVIDUAL_DATA_SET_H_ + +#include "GivenKinship.h" +#include +#include + +#include "IndividualData.h" +#include "Option.h" +#include "SnpKinship.h" + +//! A class to keep track of and reconcile IndividualData objects. +class IndividualDataSet +{ + public: + void addingPedData(); + void addPedData(std::string id, int pedId, std::vector& pedData); + void addingPhenData(); + void addPhenData(std::string id, std::vector& phenData); + void addingQCovData(); + void addQCovData(std::string id, std::vector& qCovData); + void addingCCovData(); + void addCCovData(std::string id, std::vector& cCovData); + void addingChrData(); + void setChrData(std::vector& chrNew); + void settingGenoData(); + void setGenoData(arma::mat& genoNew, std::vector numMissingValues); + void setOption(Option &optionNew); + void reconcile(); + + int getNumSubjects(); + bool getCovAdded(); + + arma::mat& getGeno(); + std::vector& getChr(); + arma::mat& getAN(); + arma::mat& getGrm(int idx); + arma::mat& getCov(int idx); + arma::mat& getPhen(int idx); + arma::mat& getGrmWithoutSplit(int idx); + arma::mat& getCovWithoutSplit(int idx); + arma::mat& getPhenWithoutSplit(int idx); + arma::mat& getPed(); + std::vector< std::vector >& getSplitPartIds(); + std::list< std::reference_wrapper >& getIndividualList(); + std::map& getIndividualMap(); + + private: + bool pregivenGrmAdded = false; + bool pedAdded = false; + int numPedCols = -1; + bool phenAdded = false; + int numPhenCols = -1; + bool qCovAdded = false; + int numQCovCols = -1; + bool cCovAdded = false; + int numCCovCols = -1; + bool chrAdded = false; + int numChrCols = -1; + bool genoAdded = false; + + Option option; + + SnpKinship snpKinship; + arma::mat grmInit; + arma::mat ped; + + std::vector phenSplit; + std::vector phenWithoutSplit; + std::vector covSplit; + std::vector covWithoutSplit; + std::vector grmSplit; + std::vector grmWithoutSplit; + + arma::mat phenFull; + arma::mat covFull; + arma::mat grmFull; + + std::vector chr; + arma::mat genoInit; + arma::mat geno; + std::map individualDataIdMap; + std::list< std::reference_wrapper > individualDataList; + + std::vector< std::vector > splitPartIds; + + void addingPregivenGrm(); + void addPregivenGrm(arma::mat& newGrm, std::vector& grmIds); + + void addIndividualIfNotAdded(std::string &id); + + void createGeno(); + void createMatrices(std::string type, std::vector& idList, int splitId); + void createPed(); +}; + + +#endif /* INDIVIDUAL_DATA_SET_H_ */ diff --git a/src/Kinship.cpp b/src/Kinship.cpp new file mode 100644 index 0000000..8f44c49 --- /dev/null +++ b/src/Kinship.cpp @@ -0,0 +1,28 @@ +#include "Kinship.h" +#include + +//! Constructor. +Kinship::Kinship(): m_grm(), m_nIndv(0) +{ +} + +//! Constructor. +Kinship::Kinship(arma::mat grm, std::map ind, int nIndv, std::vector idVec): + m_grm(), m_nIndv(nIndv) +{ +} + +//! Returns the generated or parsed Genetic Relationship Matrix (GRM). +arma::mat& Kinship::getGrm() +{ + return m_grm; +} + +//! Returns the generated or parsed individual id vector. +/*! + Maintains insertion order. The first individual in idVec represents the first individual in the GRM. +*/ +std::vector& Kinship::getIdVec() +{ + return idVec; +} diff --git a/src/Kinship.h b/src/Kinship.h new file mode 100644 index 0000000..42e7e04 --- /dev/null +++ b/src/Kinship.h @@ -0,0 +1,34 @@ +/* + * Kinship.h + * + * Created on: Feb 12, 2016 + * Author: Joey + */ + +#ifndef KINSHIP_H_ +#define KINSHIP_H_ + +#include +#include +#include +#include +#include + +//! A class used to load or generate kinship data. This class must not be used directly; only subclasses should be used. +class Kinship +{ + public: + Kinship(); + Kinship(arma::mat grm,std::map ind, int nIndv, std::vector idVec); + //std::vector getGrm(); + arma::mat& getGrm(); + std::vector& getIdVec(); + + protected: + arma::mat m_grm; + uint32_t m_nIndv; + std::vector idVec; +}; + + +#endif /* KINSHIP_H_ */ diff --git a/src/Makefile_linux b/src/Makefile_linux new file mode 100644 index 0000000..7a60bf2 --- /dev/null +++ b/src/Makefile_linux @@ -0,0 +1,51 @@ +OUTPUT = hca + +CXX = g++ +CXXFLAGS = -static -w -O3 -fopenmp -std=c++0x -L/opt/OpenBLAS/lib -I/opt/OpenBLAS/include -DARMA_DONT_USE_WRAPPER -DARMA_USE_LAPACK -DARMA_USE_BLAS +LIBS = -llapack -lgfortran -lquadmath -lopenblas -lnlopt + +# define the C source files +HDR += Data.h \ + RemlH2rEst.h \ + IndividualData.h \ + GivenKinship.h \ + RemlHca.h \ + IndividualDataSet.h \ + Kinship.h \ + Scorer.h \ + Util.h \ + Option.h \ + SnpKinship.h \ + +SRC = Data.cpp \ + RemlH2rEst.cpp \ + IndividualData.cpp \ + GivenKinship.cpp \ + RemlHca.cpp \ + IndividualDataSet.cpp \ + Kinship.cpp \ + Scorer.cpp \ + main.cpp \ + Option.cpp \ + SnpKinship.cpp \ + Util.cpp \ + +OBJ = $(SRC:.cpp=.o) + +all : $(OUTPUT) + +$(OUTPUT) : + $(CXX) $(CXXFLAGS) -o $(OUTPUT) $(OBJ) $(LIBS) + +$(OBJ) : $(HDR) + +.cpp.o : + $(CXX) $(CXXFLAGS) -c $*.cpp +.SUFFIXES : .cpp .c .o $(SUFFIXES) + +$(OUTPUT) : $(OBJ) + +FORCE: + +clean: + rm -f *.o diff --git a/src/Makefile_osx b/src/Makefile_osx new file mode 100644 index 0000000..e43d2ec --- /dev/null +++ b/src/Makefile_osx @@ -0,0 +1,51 @@ +OUTPUT = hca + +CXX = g++-6 +CXXFLAGS = -I/usr/local/include -I/opt/OpenBLAS/include -std=c++0x -fopenmp -DARMA_NO_DEBUG -DARMA_DONT_USE_WRAPPER +LIBS = -llapack /usr/local/opt/openblas/lib/libopenblas.a -lgfortran /usr/local/lib/libnlopt.a + +# define the C source files +HDR += Data.h \ + RemlH2rEst.h \ + IndividualData.h \ + GivenKinship.h \ + RemlHca.h \ + IndividualDataSet.h \ + Kinship.h \ + Scorer.h \ + Util.h \ + Option.h \ + SnpKinship.h \ + +SRC = Data.cpp \ + RemlH2rEst.cpp \ + IndividualData.cpp \ + GivenKinship.cpp \ + RemlHca.cpp \ + IndividualDataSet.cpp \ + Kinship.cpp \ + Scorer.cpp \ + main.cpp \ + Option.cpp \ + SnpKinship.cpp \ + Util.cpp \ + +OBJ = $(SRC:.cpp=.o) + +all : $(OUTPUT) + +$(OUTPUT) : + $(CXX) $(CXXFLAGS) -o $(OUTPUT) $(OBJ) $(LIBS) + +$(OBJ) : $(HDR) + +.cpp.o : + $(CXX) $(CXXFLAGS) -c $*.cpp +.SUFFIXES : .cpp .c .o $(SUFFIXES) + +$(OUTPUT) : $(OBJ) + +FORCE: + +clean: + rm -f *.o diff --git a/src/Option.cpp b/src/Option.cpp new file mode 100644 index 0000000..613a442 --- /dev/null +++ b/src/Option.cpp @@ -0,0 +1,295 @@ +#include "Option.h" +#include "Data.h" + +//! Returns true if the string starts with two hyphens ("--"). +/*! + Used when parsing CLI arguments. +*/ +bool Option::hyphen(std::string s) +{ + if(s.size()>1 && s.substr(0,2) == "--") + { + return true; + } + else + { + return false; + } +} + +//! Returns the argument value associated with the given index. +std::string Option::parseNext(int i, std::string option, int argc, char **argv) +{ + if(i>=argc || hyphen(argv[i])) + { + throw(std::runtime_error(option + ": No argument supplied")); + } + else + { + return argv[i]; + } +} + +//! Parses all CLI options. +void Option::parse(int argc, char** argv) +{ + if(argc<2) + { + //print help, as the user might not know what commands to use + std::cout<< "You must specify a command."< +#include +#include + +//! A class to load all user options. +/*! + Note that this class does not load data: only options. The Data class is responsible for actually loading data. +*/ +class Option +{ + private: + uint16_t m_cmmd; + std::string m_bFilePrefix; + std::string m_qCovFile; + std::string m_cCovFile; + std::string m_kinshipFile; + std::string m_kinshipIDFile; + std::string m_phenFile; + std::string m_traitFile; + int m_kinshipSrc; + double m_mafCutoff = 0; + double m_missingGenoCutoff = -1; + std::string lambdaVecFile; + int numSplits = 1; + std::string m_outDir; + int m_numThreads = -1; + int maxIterHca = 200; + int maxIterH2r = 200; + + bool hyphen(std::string s); + std::string parseNext(int i, std::string option, int argc, char **argv); + + public: + void parse(int argc, char **argv); + + uint16_t getCmmd() const; + std::string getBFilePrefix() const; + std::string getQCovFile() const; + std::string getCCovFile() const; + std::string getKinshipFile() const; + std::string getKinshipIDFile() const; + std::string getPhenFile() const; + std::string getTraitFile() const; + int getKinshipSrc() const; + double getMafCutoff() const; + double getMissingGenoCutoff() const; + std::string getOutDir() const; + int getNumThreads() const; + std::string getLambdaVecFile() const; + int getNumSplits() const; + int getMaxIterHca() const; + int getMaxIterH2r() const; + +}; + +#endif /* OPTION_H_ */ diff --git a/src/RemlH2rEst.cpp b/src/RemlH2rEst.cpp new file mode 100644 index 0000000..1985cd1 --- /dev/null +++ b/src/RemlH2rEst.cpp @@ -0,0 +1,350 @@ +/* + * H2rEst.cpp + * + * Created on: Feb 12, 2016 + * Author: Joey + */ + +#include "RemlH2rEst.h" + +//! Constructor. +/*! + Raises an error if the provided phenotypic data has more than one column. +*/ +RemlH2rEst::RemlH2rEst(Option &newOption, arma::mat &newPhen, arma::mat &newGrm, arma::mat &newCov) : phen(newPhen), option(newOption), grm(newGrm), cov(newCov) +{ + if(phen.n_cols != 1) { + throw(std::runtime_error("More or less than one phenotype was received for heritability anaylsis! Exactly one phenotype must be used.")); + } +} + +//! Runs heritability analysis on the data. +void RemlH2rEst::calcH2r() { + std::cout << "Performing heritability estimation..." << std::endl; + + double prevLgL = -1e20; + double lgL = -1e20; + double dlogL = 1000; + + arma::mat AIFinal; + + std::vector preRunData = preRunHelper(); + arma::mat covFinal = preRunData[0]; + + arma::mat prevVarcmp = preRunData[1]; + arma::mat varcmp = preRunData[2]; + double phenVar = preRunData[3](0,0); + + // Do REML iterations + std::cout << "Performing REML..." << std::flush; + for (int iter = 0; iter < option.getMaxIterH2r(); iter++) { + std::vector helperData = preIterationHelper(varcmp, covFinal); + arma::mat viInv = helperData[0]; + arma::mat P = helperData[1]; + double logDetVi = helperData[2](0,0); + double logDetCovarTrViCovar = helperData[2](1,0); + + if (iter == 0) { + varcmp = remlEMIteration(varcmp, P); + } else { + std::vector result = remlAIIteration(varcmp, P, dlogL); + varcmp = result[0]; + AIFinal = result[1]; + } + + arma::mat transPhenPPhen = arma::trans(phen) * (P * phen); + arma::mat lgLMatrix = logDetCovarTrViCovar + logDetVi + transPhenPPhen; + lgL = -0.5 * lgLMatrix(0, 0); + + // Constrain varcmp + constrainVarcmp(varcmp, phenVar); + + // Check for convergence + if(isConverged(varcmp, prevVarcmp, lgL - prevLgL)) { + break; + } + + // Set prev values for next iter + for(int i = 0; i < 2; i++) { + prevVarcmp(i,0) = varcmp(i,0); + } + dlogL = lgL - prevLgL; + prevLgL = lgL; + } + + // Calculate various end values: + // Total variance (Vp) + double Vp = arma::accu(varcmp); + + // SE of Vp + double varVp = arma::accu(AIFinal); + double varVpSqrt = sqrt(varVp); + + // Heritability (V(G) / Vp) + double herit = varcmp(0,0) / Vp; + + // SE (sqrt(AIFinal)) + arma::mat SE = AIFinal; + arma::mat SESqrt = arma::sqrt(AIFinal); + + // SE of heritability (formula from GCTA) + double varHeritSqrt = sqrt((varcmp(0,0) / Vp) * (varcmp(0,0) / Vp) * (SE(0,0) / (varcmp(0,0) * varcmp(0,0)) + varVp / (Vp * Vp)-(2 * arma::accu(AIFinal.row(0))) / (varcmp(0,0) * Vp))); + + // Save results + std::vector vgVec; + vgVec.push_back(varcmp(0,0)); + vgVec.push_back(SESqrt(0,0)); + finalStats.push_back(vgVec); + std::vector veVec; + veVec.push_back(varcmp(1,0)); + veVec.push_back(SESqrt(1,1)); + finalStats.push_back(veVec); + std::vector vpVec; + vpVec.push_back(Vp); + vpVec.push_back(varVpSqrt); + finalStats.push_back(vpVec); + std::vector h2Vec; + h2Vec.push_back(herit); + h2Vec.push_back(varHeritSqrt); + finalStats.push_back(h2Vec); + + // Output results + std::cout << std::endl; + std::cout << "Done!" << std::endl; + std::cout << "Type: Variance, SE" << std::endl; + std::cout << "V(G): " << finalStats[0][0] << ", " << finalStats[0][1] << std::endl; + std::cout << "V(e): " << finalStats[1][0] << ", " << finalStats[1][1] << std::endl; + std::cout << "Vp: " << finalStats[2][0] << ", " << finalStats[2][1] << std::endl; + std::cout << "h^2: " << finalStats[3][0] << ", " << finalStats[3][1] << std::endl; + std::cout << std::endl; +} + +//! Helper function for heritability estimation calculation. +/*! + Runs the Average-Information REML Algorithm. +*/ +std::vector RemlH2rEst::remlAIIteration(arma::mat &oldVarCmp, arma::mat &P, double logL) { + std::vector helperData = iterationHelper(oldVarCmp, P); + + arma::mat avgInfoMatrix(2,2); + arma::mat tempVal; + tempVal = arma::trans(helperData[2].col(0)) * (P * helperData[2].col(0)); + avgInfoMatrix(0,0) = tempVal(0,0); + tempVal = arma::trans(helperData[2].col(1)) * (P * helperData[2].col(1)); + avgInfoMatrix(1,1) = tempVal(0,0); + tempVal = arma::trans(helperData[2].col(0)) * (P * helperData[2].col(1)); + avgInfoMatrix(0,1) = avgInfoMatrix(1,0) = tempVal(0,0); + avgInfoMatrix = 0.5 * avgInfoMatrix; + + arma::mat deltaL = -0.5 * (helperData[0] - helperData[3]); + + arma::mat avgInfoMatrixInv = Util::invertMatrixSympd(avgInfoMatrix, "average information matrix"); + + arma::mat deltaForVarCmp = avgInfoMatrixInv * deltaL; + + std::vector returnVal; + if (logL > 1.0) { + returnVal.push_back(oldVarCmp + 0.316 * deltaForVarCmp); + } else { + returnVal.push_back(oldVarCmp + deltaForVarCmp); + } + returnVal.push_back(avgInfoMatrixInv); + + return returnVal; +} + +//! Helper function for heritability estimation calculation. +/*! + Runs the Expected-Maximization REML Algorithm. +*/ +arma::mat RemlH2rEst::remlEMIteration(arma::mat &oldVarCmp, arma::mat &P) { + std::vector helperData = iterationHelper(oldVarCmp, P); + + arma::mat varCmp = oldVarCmp; + + for (int i = 0; i < 2; i++) { + varCmp(i, 0) = (oldVarCmp(i, 0) * grm.n_rows - oldVarCmp(i, 0) * oldVarCmp(i, 0) * helperData[0](i, 0) + oldVarCmp(i, 0) * oldVarCmp(i, 0) * helperData[3](i, 0)) / grm.n_rows; + } + + return varCmp; +} + +//! Helper function for heritability estimation calculation. +/*! + This is run before each REML iteration. +*/ +std::vector RemlH2rEst::iterationHelper(arma::mat &oldVarCmp, arma::mat &P) { + std::cout << "." << std::flush; + + std::vector result; + + // Note: the calculation of trPA differs from GCTA. + // GCTA uses element-wise multiplication of P * A, + // but this software uses the trace of P * A (as described in the paper). + arma::mat eyeMat = arma::eye(grm.n_rows, grm.n_cols); + arma::mat trPA(2,1); + trPA(0,0) = trace(P * grm); + trPA(1,0) = trace(P * eyeMat); + result.push_back(trPA); + + arma::mat Py = P * phen; + + arma::mat APy(grm.n_rows, 2); + APy.col(0) = grm * Py; + APy.col(1) = arma::eye(grm.n_rows, grm.n_cols) * Py; + result.push_back(Py); + result.push_back(APy); + + arma::mat R(2, 1); + R.row(0) = arma::trans(result[1]) * result[2].col(0); + R.row(1) = arma::trans(result[1]) * result[2].col(1); + result.push_back(R); + + return result; +} + +//! Helper function for heritability estimation calculation. +/*! + This is run before the analysis starts. +*/ +std::vector RemlH2rEst::preRunHelper() { + std::vector result; + arma::mat numericData(1,1); + + // Calculate cov with ones + arma::mat covOnes = arma::ones(grm.n_rows, 1); + arma::mat covFinal = arma::join_horiz(covOnes, cov); + result.push_back(covFinal); + + // Calculate initial variance components + arma::mat prevVarcmp(2,1); + arma::mat varcmp(2,1); + arma::mat phenMeanOne = arma::mean(phen); + arma::mat phenMeanTwo = arma::mean(phenMeanOne); + double phenMinusMeanNorm = arma::norm(phen - phenMeanTwo(0,0)); + numericData(0,0) = pow(phenMinusMeanNorm, 2) / (grm.n_rows - 1); + + arma::mat a = phen - phenMeanTwo(0,0); + + prevVarcmp.fill(numericData(0,0) / 2); + varcmp.fill(numericData(0,0) / 2); + result.push_back(varcmp); + result.push_back(prevVarcmp); + result.push_back(numericData); + + return result; +} + +//! Helper function for heritability estimation calculation. +/*! + This is run before each REML iteration. +*/ +std::vector RemlH2rEst::preIterationHelper(arma::mat &varcmp, arma::mat &covFinal) { + std::vector result; + arma::mat numericData(2,1); + + arma::mat vi = arma::zeros(grm.n_rows, grm.n_cols); + + vi += grm * varcmp(0,0); + vi += arma::eye(grm.n_rows, grm.n_cols) * varcmp(1,0); + + double val; + double sign; + log_det(val, sign, vi); + double logDetVi = val * sign; + + numericData(0,0) = logDetVi; + + arma::mat viInv = Util::invertMatrixSympd(vi, "variance-covariance"); + result.push_back(viInv); + + arma::mat viCovar = (viInv * covFinal); + arma::mat covarTrViCovar = arma::trans(covFinal) * viCovar; + arma::mat covarTrViCovarInv = Util::invertMatrix(covarTrViCovar, "heritability intermediate A"); + arma::mat P = viInv - viCovar * covarTrViCovarInv * arma::trans(viCovar); + result.push_back(P); + + log_det(val, sign, covarTrViCovar); + double logDetcovarTrViCovar = val * sign; + numericData(1,0) = logDetcovarTrViCovar; + + result.push_back(numericData); + + return result; +} + +//! Helper function for heritability estimation calculation. +/*! + Constrains the variance components should they become negative, and adjusts other variance components to compensate for this adjustment. +*/ +void RemlH2rEst::constrainVarcmp(arma::mat &varcmp, double phenVar) { + double delta = 0; + arma::mat constrained(2,1); + for(int i = 0; i < 2; i++) { + if(varcmp(i, 0) < 0) { + delta += phenVar * 1e-6 - varcmp(i, 0); + varcmp(i, 0) = phenVar * 1e-6; + + constrained(i, 0) = 1; + } else { + constrained(i, 0) = 0; + } + } + + // Subtract deltas we added above from non-constrained values + arma::mat numConstrained = arma::sum(constrained); + delta /= (2 - numConstrained(0,0)); + for(int i = 0; i < 2; i++) { + if(constrained(i, 0) == 0 && varcmp(i, 0) > delta) { + varcmp(i, 0) -= delta; + } + } +} + +//! Helper function for heritability estimation calculation. +/*! + Checks if the REML analysis has converged. +*/ +bool RemlH2rEst::isConverged(arma::mat &varcmp, arma::mat &prevVarcmp, double dLogL) { + double sqNormCurr = pow(arma::norm(varcmp), 2); + double sqNormDiff = pow(arma::norm(varcmp - prevVarcmp), 2); + + bool stopCondOne = (sqNormDiff / sqNormCurr) < 1e-8; + bool stopCondTwo = abs(dLogL) < 1e-4; + bool stopCondThree = abs(dLogL) < 1e-2 && dLogL < 0; + + return stopCondOne && (stopCondTwo || stopCondThree); +} + +//! Saves output to a file. +void RemlH2rEst::saveOutput() { + std::string fileName = option.getOutDir(); + + if(fileName.empty()) { + return; + } + + if(fileName.at(fileName.length() - 1) == '/') { + fileName = fileName + "h2r_est.txt"; + } else { + fileName = fileName + "/h2r_est.txt"; + } + + std::filebuf fb; + fb.open(fileName,std::ios::out); + std::ostream os(&fb); + os.precision(7); + + os << "Type,Variance,SE" << std::endl; + os << "Vg," << finalStats[0][0] << "," << finalStats[0][1] << std::endl; + os << "Ve," << finalStats[1][0] << "," << finalStats[1][1] << std::endl; + os << "Vp," << finalStats[2][0] << "," << finalStats[2][1] << std::endl; + os << "H2," << finalStats[3][0] << "," << finalStats[3][1] << std::endl; + + fb.close(); +} + +//! Returns the final stats from the REML analysis. +std::vector< std::vector >& RemlH2rEst::getFinalStats() { + return finalStats; +} diff --git a/src/RemlH2rEst.h b/src/RemlH2rEst.h new file mode 100644 index 0000000..b9d658c --- /dev/null +++ b/src/RemlH2rEst.h @@ -0,0 +1,50 @@ +/* + * H2rEst.h + * + * Created on: Feb 12, 2016 + * Author: Joey + */ + +#ifndef REMLH2REST_H_ +#define REMLH2REST_H_ + +#include "H2rEst.h" +#include "Option.h" +#include +#include +#include "Util.h" + +//! A class to perform heritability analysis on a given dataset. +/*! + Uses the REML algorithm. +*/ +class RemlH2rEst : public H2rEst +{ + public: + RemlH2rEst(Option &newOption, arma::mat &newPhen, arma::mat &newGrm, arma::mat &newCov); + void calcH2r(); + void saveOutput(); + std::vector< std::vector >& getFinalStats(); + + private: + std::vector< std::vector > finalStats; + + std::vector remlAIIteration(arma::mat &oldVarCmp, arma::mat &P, double logL); + arma::mat remlEMIteration(arma::mat &oldVarCmp, arma::mat &P); + std::vector preRunHelper(); + std::vector iterationHelper(arma::mat &oldVarCmp, arma::mat &P); + std::vector preIterationHelper(arma::mat &varcmp, arma::mat &covFinal); + void constrainVarcmp(arma::mat &varcmp, double phenVar); + bool isConverged(arma::mat &varcmp, arma::mat &prevVarcmp, double dLogL); + + Option &option; + arma::mat &phen; + arma::mat &grm; + arma::mat &cov; + + arma::mat varcmp; + arma::mat se; +}; + + +#endif /* H2REST_H_ */ diff --git a/src/RemlHca.cpp b/src/RemlHca.cpp new file mode 100644 index 0000000..2cd18c4 --- /dev/null +++ b/src/RemlHca.cpp @@ -0,0 +1,322 @@ +/* + * RemlHca.cpp + * + * Created on: Feb 17, 2016 + * Author: Joey + */ + +#include "RemlHca.h" + +//! Constructor. +RemlHca::RemlHca(Option &newOption, Data &newData) : option(newOption), data(newData) +{ + +} + +//! Runs the REML algorithm to obtain highly-heritable traits. +void RemlHca::train() +{ + std::cout << "Performing HCA..." << std::endl; + + if(option.getNumSplits() == 1) { + // Train w/o CV + double bestScore = -1; + double bestIndex = -1; + std::vector h2rEstVec; + for(unsigned int lambdaValIdx = 0; lambdaValIdx < data.lambdaVec.size(); lambdaValIdx++) { + double lambdaVal = data.lambdaVec[lambdaValIdx]; + + // Get cov data + arma::mat cov; + if(data.individualDataSet.getCovAdded()) { + cov = data.individualDataSet.getCov(-1); + } + + std::cout << "Performing REML for lambda val " << lambdaVal << " without cross-validation." << std::endl; + std::pair result = trainWithParams(lambdaVal, data.individualDataSet.getPhen(-1), cov, data.individualDataSet.getGrm(-1)); + + std::cout << "Scoring without cross-validation for lambda val " << lambdaVal << "..." << std::endl; + Scorer scorer(option, data.individualDataSet.getPhen(-1), result.first); + RemlH2rEst h2r(option, scorer.getScore(), data.individualDataSet.getGrm(-1), cov); + h2r.calcH2r(); + h2rEstVec.push_back(h2r); + double score = h2r.getFinalStats()[3][0]; + + if(bestScore == -1 || score > bestScore) { + bestScore = score; + bestIndex = lambdaValIdx; + bestLambdaVal = lambdaVal; + bestTrainedW = result.first; + } + } + + h2rEstVec[bestIndex].saveOutput(); + } else { + // Train with CV + std::map< double, double > totalValMap; // Map of lambdaVal -> totalTrainingVal (used for avg) + for(int cvSplitId = 0; cvSplitId < option.getNumSplits(); cvSplitId++) { + std::cout << "Creating matrices for cross-val split ID " << cvSplitId << "..." << std::endl; + + arma::mat cvPheno = data.individualDataSet.getPhen(cvSplitId); + arma::mat trainingPheno = data.individualDataSet.getPhenWithoutSplit(cvSplitId); + arma::mat cvCov = data.individualDataSet.getCov(cvSplitId); + arma::mat trainingCov = data.individualDataSet.getCovWithoutSplit(cvSplitId); + arma::mat cvGrm = data.individualDataSet.getGrm(cvSplitId); + arma::mat trainingGrm = data.individualDataSet.getGrmWithoutSplit(cvSplitId); + + for(unsigned int lambdaValIdx = 0; lambdaValIdx < data.lambdaVec.size(); lambdaValIdx++) { + double lambdaVal = data.lambdaVec[lambdaValIdx]; + std::cout << "Performing REML for lambda val " << lambdaVal << "; using split ID " << cvSplitId << " for cross-validation." << std::endl; + std::pair result = trainWithParams(lambdaVal, trainingPheno, trainingCov, trainingGrm); + + std::cout << "Performing cross-validation with split ID " << cvSplitId << "..." << std::endl; + Scorer scorer(option, cvPheno, result.first); + RemlH2rEst h2r(option, scorer.getScore(), cvGrm, cvCov); + h2r.calcH2r(); + double score = h2r.getFinalStats()[3][0]; + + if(totalValMap.count(lambdaVal) == 0) { + totalValMap[lambdaVal] = 0; + } + totalValMap[lambdaVal] += score; + } + } + + double bestIdx = -1; + double bestAvgH2r = 0; + + for(unsigned int lambdaValIdx = 0; lambdaValIdx < data.lambdaVec.size(); lambdaValIdx++) { + double avgVal = totalValMap[lambdaValIdx] / option.getNumSplits(); + if(bestAvgH2r == 0 || avgVal > bestAvgH2r) { + bestAvgH2r = avgVal; + bestIdx = lambdaValIdx; + } + } + + bestLambdaVal = data.lambdaVec[bestIdx]; + + std::cout << "Performing HCA with all data and best lambda..." << std::endl; + + // Do HCA + std::pair result = trainWithParams(bestLambdaVal, data.individualDataSet.getPhen(-1), data.individualDataSet.getCov(-1), data.individualDataSet.getGrm(-1)); + bestTrainedW = result.first; + + // Generate and save h2r output + std::cout << "Performing H2R with all data and best lambda..." << std::endl; + Scorer scorer(option, data.individualDataSet.getPhen(-1), bestTrainedW); + RemlH2rEst bestH2r(option, scorer.getScore(), data.individualDataSet.getGrm(-1), data.individualDataSet.getCov(-1)); + bestH2r.calcH2r(); + bestH2r.saveOutput(); + } + + std::cout << "HCA complete! Best lambda value: " << bestLambdaVal << "!" << std::endl; +} + +//! Helper function for HCA. +/*! + Performs HCA with a given Lambda value and (potentially partial) dataset. +*/ +std::pair RemlHca::trainWithParams(double lambdaVal, arma::mat& phen, arma::mat& cov, arma::mat &grm) { + // Init cov to ones, + any existing cov data + arma::mat covFinal = arma::ones(phen.n_rows, 1); + if(cov.n_rows > 0) { + covFinal = arma::join_horiz(covFinal, cov); + } + + // Some helpful data + int numSubjects = phen.n_rows; + int numPhenotypicFeatures = phen.n_cols; + + // Calculate H from paper + arma::mat H = join_horiz(phen, -1 * phen); + + // Calculate some terms common across several calculations + arma::mat grmInv = Util::invertMatrix(grm, "genetic relationship matrix"); + arma::mat covTranspose = trans(covFinal); + arma::mat commonTermTwo = covTranspose * grmInv; + arma::mat intermediateA = commonTermTwo * covFinal; + arma::mat commonTermThree = Util::invertMatrix(intermediateA, "HCA intermediate matrix A"); + + // Calculate J from paper + arma::mat iMatrix(numSubjects, numSubjects); + iMatrix.eye(); + arma::mat J = iMatrix - (covFinal * commonTermThree * covTranspose * grmInv); + + // Calculate P from paper + // This calculation is different from the paper, but comes out to the same result. + // Let A be (covFinal * commonTermThree * covTranspose * grmInv). + // In this specific case, grmInv * (grmInv - A) is the same as grmInv * (IdentityMatrix - A). + // The latter is used below, the former is used in the paper. + arma::mat P = grmInv * J; + + // Calculate Q from paper + arma::mat Q = (trans(J) * J) / numSubjects; + + // Initialize gamma + arma::mat uInit(numPhenotypicFeatures, 1); + uInit.fill(1); + arma::mat vInit(numPhenotypicFeatures, 1); + vInit.fill(0); + arma::mat gammaInitTermOne = join_vert(uInit, vInit); + + arma::mat gammaInitTermTwo = (trans(H) * Q * H); + arma::mat gammaInitTermThree = trans(gammaInitTermOne) * gammaInitTermTwo * gammaInitTermOne; + arma::mat gammaInitTermFour = sqrt(gammaInitTermThree); + double gammaInitTermFourVal = gammaInitTermFour(0,0); + arma::mat gammaInitFinal = gammaInitTermOne / gammaInitTermFourVal; + + std::vector optimizerGammaVector; + for(unsigned int i = 0; i < gammaInitFinal.n_rows; i++) { + optimizerGammaVector.push_back(gammaInitFinal(i, 0)); + } + + // Minimize function + // Pass along data with funcData + std::vector funcData; + arma::mat intData(4,1); + intData(0,0) = numPhenotypicFeatures; + intData(1,0) = numSubjects; + intData(2,0) = lambdaVal; + intData(3,0) = 1; // Output dot + funcData.push_back(H); + funcData.push_back(P); + funcData.push_back(Q); + funcData.push_back(trans(H) * P * H); + funcData.push_back(trans(H) * Q * H); + funcData.push_back(intData); + + std::cout << "Optimizing function..." << std::flush; + nlopt::opt optimizer(nlopt::LD_AUGLAG, gammaInitFinal.n_rows); + optimizer.set_maxeval(option.getMaxIterHca()); + optimizer.set_min_objective(objectiveFunction, ((void *) &funcData)); + optimizer.add_equality_constraint(constraintFunction, ((void *) &funcData), 0.00001); + optimizer.set_lower_bounds(0); + nlopt::opt optimizerLocal(nlopt::LD_SLSQP, gammaInitFinal.n_rows); + optimizerLocal.set_ftol_abs(0.000001); + optimizer.set_local_optimizer(optimizerLocal); + optimizer.set_ftol_abs(0.00001); + std::vector optimizerResultVector = optimizer.optimize(optimizerGammaVector); + + arma::mat optimizerResultMatrix = arma::mat(optimizerResultVector); + + // W from paper + arma::mat trainedW = optimizerResultMatrix.rows(0, numPhenotypicFeatures - 1) - optimizerResultMatrix.rows(numPhenotypicFeatures, optimizerResultMatrix.n_rows - 1); + + // Output result W + std::cout << std::endl; + std::cout << "Completed REML for lambda val " << lambdaVal << "! W:" << std::endl; + trainedW.print(); + std::cout << std::endl; + + // Output result function val + std::vector emptyVec; + funcData[5](3,0) = 0; // Don't output dot + double resultVal = objectiveFunction(optimizerResultVector, emptyVec, ((void *) &funcData)); + std::cout << "Function val @ W for lambda val " << lambdaVal << ": " << resultVal << std::endl; + + return std::make_pair(trainedW, resultVal); +} + +//! Objective function for the HCA minimization process. +double RemlHca::objectiveFunction(const std::vector &x, std::vector &grad, void *funcData) { + arma::mat xMatrix = arma::mat(x); + + // Pull necessary data out of func matrix + std::vector *funcDataPointer = (std::vector *) funcData; + std::vector funcDataMat = *funcDataPointer; + arma::mat H = funcDataMat[0]; + arma::mat P = funcDataMat[1]; + arma::mat Q = funcDataMat[2]; + arma::mat functionValCommonTerm = funcDataMat[3]; + int numPhenotypicFeatures = funcDataMat[5](0,0); + int numSubjects = funcDataMat[5](1,0); + int lambdaVal = funcDataMat[5](2,0); + int outputDot = funcDataMat[5](3,0); + + if(outputDot) { + std::cout << "." << std::flush; + } + + if(!grad.empty()) { + // Populate gradient + arma::mat gradMatrix = (2.0 / numSubjects) * functionValCommonTerm * xMatrix + (lambdaVal / numPhenotypicFeatures); + + for(unsigned int i = 0; i < xMatrix.n_rows; i++) { + grad[i] = gradMatrix(i, 0); + } + } + + double functionVal; + + // Populate function value + double functionValTermOne = (1.0 / numSubjects); + arma::mat gammaTrans = trans(xMatrix); + arma::mat functionValTermFourMat = (lambdaVal / numPhenotypicFeatures) * arma::sum(xMatrix); + double functionValTermFour = functionValTermFourMat(0,0); + arma::mat functionValMatrix = functionValTermOne * (gammaTrans * functionValCommonTerm * xMatrix) + functionValTermFour; + + functionVal = functionValMatrix(0,0); + return functionVal; +} + +//! Constraint function for the HCA minimization process. +/*! + Constrained to be equal to zero. +*/ +double RemlHca::constraintFunction(const std::vector &x, std::vector &grad, void *funcData) { + arma::mat xMatrix = arma::mat(x); + + // Pull necessary data out of func matrix + std::vector *funcDataPointer = (std::vector *) funcData; + std::vector funcDataMat = *funcDataPointer; + arma::mat H = funcDataMat[0]; + arma::mat P = funcDataMat[1]; + arma::mat Q = funcDataMat[2]; + arma::mat functionValCommonTerm = funcDataMat[4]; + + if(!grad.empty()) { + // Populate gradient + arma::mat gradMatrix = 2 * functionValCommonTerm * xMatrix; + + for(unsigned int i = 0; i < xMatrix.n_rows; i++) { + grad[i] = gradMatrix(i, 0); + } + } + + double functionVal; + + // Populate function value + arma::mat gammaTrans = trans(xMatrix); + arma::mat functionValMatrix = (gammaTrans * functionValCommonTerm * xMatrix) - 1; + functionVal = functionValMatrix(0,0); + + return functionVal; +} + +//! Saves output to a file. +void RemlHca::saveOutput() { + std::string fileName = option.getOutDir(); + + if(fileName.empty()) { + return; + } + + if(fileName.at(fileName.length() - 1) == '/') { + fileName = fileName + "trait_hca.csv"; + } else { + fileName = fileName + "/trait_hca.csv"; + } + + bestTrainedW.save(fileName, arma::csv_ascii); +} + +//! Returns the weights generated by the train function. +arma::mat& RemlHca::getBestTrainedW() { + return bestTrainedW; +} + +//! Return the best lambda value, found by the train function. +double RemlHca::getBestLambdaVal() { + return bestLambdaVal; +} + diff --git a/src/RemlHca.h b/src/RemlHca.h new file mode 100644 index 0000000..20e35c5 --- /dev/null +++ b/src/RemlHca.h @@ -0,0 +1,47 @@ +/* + * RemlHca.h + * + * Created on: Feb 17, 2016 + * Author: Joey + */ + +#ifndef REMLHCA_H_ +#define REMLHCA_H_ + +#include "Hca.h" +#include "Option.h" +#include "Data.h" +#include "RemlH2rEst.h" +#include +#include + +//! A class to perform heritable component analysis on a given dataset. +/*! + Uses the REML algorithm. +*/ +class RemlHca : public Hca +{ + public: + RemlHca(Option &newOption, Data &newData); + void train(); + void saveOutput(); + double getBestLambdaVal(); + arma::mat& getBestTrainedW(); + static double objectiveFunction(const std::vector &x, std::vector &grad, void *my_func_data); + static double constraintFunction(const std::vector &x, std::vector &grad, void *data); + + private: + std::pair trainWithParams(double lambdaVal, arma::mat& phen, arma::mat& cov, arma::mat &grm); + + Option &option; + Data &data; + + std::vector< std::pair > lambdaPerformance; + + double bestLambdaVal = -1; + arma::mat bestTrainedW; + +}; + + +#endif /* REMLHCA_H_ */ diff --git a/src/Scorer.cpp b/src/Scorer.cpp new file mode 100644 index 0000000..90b5fe7 --- /dev/null +++ b/src/Scorer.cpp @@ -0,0 +1,58 @@ +/* + * Scorer.cpp + * + * Created on: March 27, 2017 + * Author: Daniel + */ + +#include "Scorer.h" + +//! Constructor. +/*! + Also generates scores inline. +*/ +Scorer::Scorer(Option &newOption, arma::mat &phen, arma::mat &trait) : option(newOption) { + std::cout << "Scoring individuals..." << std::endl; + score = phen * trait; +} + +//! Returns the generated scores. +arma::mat& Scorer::getScore() { + return score; +} + +//! Saves output to a file. +void Scorer::saveOutput(IndividualDataSet &individualDataSet) { + std::cout << "Saving scores..." << std::endl; + + std::string fileName = option.getOutDir(); + + if(fileName.empty()) { + return; + } + + if(fileName.at(fileName.length() - 1) == '/') { + fileName = fileName + "scores.csv"; + } else { + fileName = fileName + "/scores.csv"; + } + + std::filebuf fb; + fb.open(fileName,std::ios::out); + std::ostream os(&fb); + os.precision(7); + + std::list< std::reference_wrapper >::iterator iter = individualDataSet.getIndividualList().begin(); + int at = 0; + while(iter != individualDataSet.getIndividualList().end()) { + IndividualData individual = *iter; + std::vector idSplit = Util::splitByDelimeter(individual.getStrId(), ":"); + + os << idSplit[0] << "," << idSplit[1] << "," << score(at) << std::endl; + + iter++; + at = at + 1; + } + fb.close(); +} + diff --git a/src/Scorer.h b/src/Scorer.h new file mode 100644 index 0000000..c6e66fe --- /dev/null +++ b/src/Scorer.h @@ -0,0 +1,34 @@ +/* + * Scorer.h + * + * Created on: March 27, 2017 + * Author: Daniel + */ + +#ifndef SCORER_H_ +#define SCORER_H_ + +#include "Option.h" +#include +#include +#include "IndividualData.h" +#include "IndividualDataSet.h" + +//! A class to score users based on their phenotypes and a generated weight. +/*! + Weights are typically generated via the HCA process. +*/ +class Scorer +{ + private: + Option &option; + arma::mat score; + + public: + Scorer(Option &newOption, arma::mat &phen, arma::mat &trait); + arma::mat& getScore(); + void saveOutput(IndividualDataSet &individualDataSet); +}; + + +#endif /* SCORER_H */ diff --git a/src/SnpKinship.cpp b/src/SnpKinship.cpp new file mode 100644 index 0000000..ef6e1cb --- /dev/null +++ b/src/SnpKinship.cpp @@ -0,0 +1,163 @@ +/* + * SnpKinship.cpp + * + * Created on: Feb 12, 2016 + * Author: Joey + */ + +#include "SnpKinship.h" + +//! Constructor. +/*! + Also generates GRM inline. +*/ +void SnpKinship::construct(Option &option, arma::mat &ped, std::vector &chr, arma::mat &newGeno) +{ + std::cout << "Generating GRM from SNPs..." << std::endl; + + arma::mat geno = newGeno; + + // Calculate normalization factor for avg, for each individual + std::vector facAuto; + std::vector facX; + std::vector facNorm; + for(unsigned int i = 0; i < geno.n_rows; i++) { + facAuto.push_back(1.0); + facNorm.push_back(0.5); + + if(ped(i, 0) == 1) { + facX.push_back(0.5); + } else if(ped(i, 0) == 2) { + facX.push_back(1); + } + } + + // Calculate normalization factor for avg, for each SNP + std::vector< std::vector > normFactor; + for(unsigned int i = 0; i < chr.size(); i++) { + if(chr[i] < 23) { + normFactor.push_back(facAuto); + } else if (chr[i] == 23) { + normFactor.push_back(facX); + } else { + normFactor.push_back(facNorm); + } + } + + // Calculate average for each SNP, store in avg array + // Also calculate avgSnpSd value. + arma::vec avgSnp(geno.n_cols); + arma::vec avgSnpSd(geno.n_cols); + for(unsigned int snp = 0; snp < geno.n_cols; snp++) { + int numIndivAdded = 0; + for(unsigned int indiv = 0; indiv < geno.n_rows; indiv++) { + if(geno(indiv, snp) < 1e5) { + avgSnp(snp) += normFactor[snp][indiv] * geno(indiv, snp); + numIndivAdded++; + } + } + + if (numIndivAdded > 0) { + avgSnp(snp) /= numIndivAdded; + } + + double avgSnpSdVal = avgSnp(snp) * (1 - 0.5 * avgSnp(snp));; + if(fabs(avgSnpSdVal) < 1.0e-50) { + avgSnpSd(snp) = 0; + } else { + avgSnpSd(snp) = sqrt(1 / avgSnpSdVal); + } + } + + // Filter based on MAF, if a minimum MAF is specified + if(option.getMafCutoff() != 0) { + double mafCutoff = option.getMafCutoff(); + std::cout << "Filtering SNPs by MAF (start: " << geno.n_cols << " cols)..." << std::endl; + + std::vector colsToInclude; + for(unsigned int i = 0; i < geno.n_cols; i++) { + if(avgSnp(i) * 0.5 <= mafCutoff || (1 - (avgSnp(i) * 0.5)) <= mafCutoff) { + continue; + } else { + colsToInclude.push_back(i); + } + } + + // Copy to array for use with armadillo + arma::uvec colsToIncludeVec(colsToInclude); + geno = geno.cols(colsToIncludeVec); + avgSnp = avgSnp.rows(colsToIncludeVec); + avgSnpSd = avgSnpSd.rows(colsToIncludeVec); + + std::cout << "MAF filtering complete (end: " << geno.n_cols << " cols)." << std::endl; + } + + // 1. Count number of missing SNPs. + // 2. Standardize. Subtract average from each member of column, + // and multiply by avgSnpSd. + std::vector< std::vector > missingPos; + missingPos.resize(geno.n_rows); + arma::mat missingGeno(geno.n_rows, geno.n_cols); + for(unsigned int i = 0; i < missingGeno.n_rows; i++) { + for(unsigned int j = 0; j < missingGeno.n_cols; j++) { + if(geno(i, j) < 1e5) { + missingGeno(i, j) = 0; + + geno(i, j) -= avgSnp(j); + geno(i, j) *= avgSnpSd(j); + } else { + missingPos[i].push_back(j); + missingGeno(i, j) = 1; + + geno(i, j) = 0; + } + } + } + + // Calculate A_N matrix + A_N.resize(geno.n_rows, geno.n_rows); + for(unsigned int i = 0; i < missingGeno.n_rows; i++) { + for(unsigned int j = 0; j < missingGeno.n_rows; j++) { + // Count number of SNPs missing for indiv I + int missingInI = missingPos[i].size(); + + // Count number of SNPs missing for indiv J, but present + // for indiv I. + int missingInJPresentInI = 0; + for(unsigned int jMissingPosIndx = 0; jMissingPosIndx < missingPos[j].size(); jMissingPosIndx++) { + if (missingGeno(i, missingPos[j][jMissingPosIndx]) == 0) { + missingInJPresentInI++; + } + } + + // Set value in matrix + A_N(i, j) = A_N(j, i) = geno.n_cols - missingInI - missingInJPresentInI; + } + } + + // Calculate WW' + m_grm = geno * arma::trans(geno); + + // Adjust for missing SNPs + for(unsigned int i = 0; i < m_grm.n_rows; i++) { + for(unsigned int j = 0; j <= i; j++) { + if(A_N(i, j) > 0) { + m_grm(i,j) = m_grm(i,j) / A_N(i,j); + } + else { + m_grm(i,j) = 0; + } + m_grm(j,i) = m_grm(i,j); + } + } + + // Output results + std::cout << "GRM estimation complete!" << std::endl; +} + +//! Returns AN matrix, which represents the number of SNPs that were used to calculate the GRM (on a per-individual basis). +arma::mat& SnpKinship::getAN() { + return A_N; +} + + diff --git a/src/SnpKinship.h b/src/SnpKinship.h new file mode 100644 index 0000000..8a34fd8 --- /dev/null +++ b/src/SnpKinship.h @@ -0,0 +1,26 @@ +/* + * SnpKinship.h + * + * Created on: Feb 17, 2016 + * Author: Joey + */ + +#ifndef SNPKINSHIP_H_ +#define SNPKINSHIP_H_ + +#include "Kinship.h" +#include "Option.h" +#include + +//! A class to generate a kinship matrix from SNP data. +class SnpKinship : public Kinship +{ + public: + void construct(Option &option, arma::mat &ped, std::vector &chr, arma::mat &newGeno); + arma::mat& getAN(); + private: + arma::mat A_N; +}; + + +#endif /* SNPKINSHIP_H_ */ diff --git a/src/Util.cpp b/src/Util.cpp new file mode 100644 index 0000000..f1969b0 --- /dev/null +++ b/src/Util.cpp @@ -0,0 +1,95 @@ +#include "Util.h" + +//! Splits a string by delimiter, and returns a vector swith the result. +std::vector Util::splitByDelimeter(std::string data, std::string delim) { + std::string dataNew = data; + std::vector vec; + + size_t pos = 0; + std::string part; + while ((pos = dataNew.find_first_of(delim.c_str())) != std::string::npos) { + vec.push_back(dataNew.substr(0, pos)); + dataNew.erase(0, pos + 1); + } + vec.push_back(dataNew); // Final str will be after the last comma was removed + + return vec; +} + +//! Parses a string to a double, raising an error if the data is invalid. +double Util::parseToDouble(std::string data) { + char* p; + double converted = strtod(data.c_str(), &p); + + if (*p) { + throw(std::runtime_error("Invalid value (non-numeric) found! Make sure your data files are valid.")); + } + else { + return converted; + } +} + +//! Parses a string to an integer, raising an error if the data is invalid. +int Util::parseToInt(std::string data) { + char* p; + double converted = strtod(data.c_str(), &p); + + if (*p) { + throw(std::runtime_error("Invalid value (non-numeric) found! Make sure your data files are valid.")); + } + else { + return (int)converted; + } +} + +//! Inverts the matrix via arma::inv, adding values to diagonals should inversion fail. If values are added to diagonals, outputs a warning with the "name" variable. +arma::mat Util::invertMatrix(arma::mat& m, std::string name, bool alreadyAdded) { + try { + return arma::inv(m); + } catch(std::runtime_error& e) { + if(alreadyAdded) { + throw; + } + + // Only handle singular matrix errors here + std::string msg = e.what(); + if(msg.find("matrix seems singular") == std::string::npos && msg.find("matrix is singular") == std::string::npos) { + throw; + } + + // Add small amount to diagonals, then invert + // If it still throws an error, allow the program to crash. + std::cout << "Warning: unable to invert variance-covariance matrix. Adding small amount to the diagonals. The results may not be reliable." << std::endl; + double amount_to_add = arma::mean(m.diag()) * 0.01; + for(unsigned int i = 0; i < m.n_rows; i++) { + m(i,i) += amount_to_add; + } + return invertMatrix(m, name, true); + } +} + +//! Inverts the matrix via arma::inv_sympd, adding values to diagonals should inversion fail. If values are added to diagonals, outputs a warning with the "name" variable. +arma::mat Util::invertMatrixSympd(arma::mat& m, std::string name, bool alreadyAdded) { + try { + return arma::inv_sympd(m); + } catch(std::runtime_error& e) { + if(alreadyAdded) { + throw; + } + + // Only handle singular matrix errors here + std::string msg = e.what(); + if(msg.find("matrix seems singular") == std::string::npos && msg.find("matrix is singular") == std::string::npos) { + throw; + } + + // Add small amount to diagonals, then invert + // If it still throws an error, allow the program to crash. + std::cout << "Warning: unable to invert matrix: " + name + ". Adding small amount to the diagonals. The results may not be reliable." << std::endl; + double amount_to_add = arma::mean(m.diag()) * 0.01; + for(unsigned int i = 0; i < m.n_rows; i++) { + m(i,i) += amount_to_add; + } + return invertMatrix(m, name, true); + } +} diff --git a/src/Util.h b/src/Util.h new file mode 100644 index 0000000..a07f2a7 --- /dev/null +++ b/src/Util.h @@ -0,0 +1,24 @@ +/* + * SnpKinship.h + * + * Created on: Feb 17, 2016 + * Author: Joey + */ + +#ifndef UTIL_H_ +#define UTIL_H_ + +#include + +class Util +{ + public: + static std::vector splitByDelimeter(std::string data, std::string delim); + static double parseToDouble(std::string data); + static int parseToInt(std::string data); + static arma::mat invertMatrix(arma::mat& m, std::string name, bool alreadyAdded = false); + static arma::mat invertMatrixSympd(arma::mat& m, std::string name, bool alreadyAdded = false); +}; + + +#endif /* UTIL_H_ */ diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..b88ecaa --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,111 @@ +#include "Option.h" +#include "Data.h" +#include "RemlH2rEst.h" +#include "RemlHca.h" +#include + +//! Main method. Runs all analysis. +int main(int argc, char **argv) +{ + try { + Option option; + option.parse(argc,argv); + + Data data(option); + + // Set num threads + if(option.getNumThreads() != -1) { + goto_set_num_threads(option.getNumThreads()); + } + std::cout << "Using " << openblas_get_num_threads() << " threads." << std::endl; + + // Perform some input validation + if(option.getCmmd() == 0) { + if(data.individualDataSet.getGeno().empty()) { + throw(std::runtime_error("Error: genotypic data was not provided! Make sure to pass a valid 'data' parameter.")); + } + } + else if(option.getCmmd() == 1 || option.getCmmd() == 2) { + if(data.individualDataSet.getPhen(-1).empty() && data.scorers.size() < 1) { + throw(std::runtime_error("Error: phenotypic data was not provided! Make sure to pass a valid 'phenotype' parameter (and an optional 'trait').")); + } + + if(data.individualDataSet.getGrm(-1).empty()) { + throw(std::runtime_error("Error: GRM was not provided. Make sure to pass in a pregiven GRM or genotypic data.")); + } + + if(option.getCmmd() == 2 && data.lambdaVec.size() == 0) { + throw(std::runtime_error("Error: a lambda file is required for HCA")); + } + } + else if(option.getCmmd() == 3) { + if(data.trait.empty()) { + throw(std::runtime_error("Error: unable to generate score! Make sure to pass in 'trait' and 'phenotype' parameters.")); + } + } + if(option.getCmmd() != 2 && option.getNumSplits() != 1) { + throw(std::runtime_error("Error: splitting data is only supported during HCA!")); + } + + if(option.getCmmd() == 1) //h2r + { + // Make sure to never pass null reference + arma::mat covEmpty; + arma::mat &cov = covEmpty; + if(data.individualDataSet.getCovAdded()) { + cov = data.individualDataSet.getCov(-1); + } + + if(data.scorers.size() >= 1) { + RemlH2rEst h2r(option, data.scorers[0].getScore(), data.individualDataSet.getGrm(-1), cov); + h2r.calcH2r(); + if(option.getOutDir() != "") { + h2r.saveOutput(); + } + } else { + RemlH2rEst h2r(option, data.individualDataSet.getPhen(-1), data.individualDataSet.getGrm(-1), cov); + h2r.calcH2r(); + if(option.getOutDir() != "") { + h2r.saveOutput(); + } + } + } + else if(option.getCmmd() == 2) //hca + { + RemlHca hca(option, data); + hca.train(); + std::cout << "Saving trait..." << std::endl; + + Scorer scorer(option, data.individualDataSet.getPhen(-1), hca.getBestTrainedW()); + + if(option.getOutDir() != "") { + hca.saveOutput(); + scorer.saveOutput(data.individualDataSet); + } + } + else if(option.getCmmd() == 3) //score + { + if(option.getOutDir() != "") { + data.scorers[0].saveOutput(data.individualDataSet); + } + } + + // If we generated a kinship file, save it. + if(option.getOutDir() != "" && option.getKinshipSrc() != 2) { + data.writeKinship(option.getOutDir() + "/kinship.txt"); + } + + return 0; + } catch(std::runtime_error& e) { + std::string msg = e.what(); + + // Some error handling + if(msg.find("matrix seems singular") != std::string::npos) { + std::cout << "Error: a matrix appears to be singular. Make sure the data you are passing in is valid, and check the documentation for expected formats." << std::endl; + } else { + std::cout << msg << std::endl; + } + + return 1; + } +}