diff --git a/README.md b/README.md index 5d8ac7b..1e6e5ba 100644 --- a/README.md +++ b/README.md @@ -1,100 +1,154 @@ # Heritable Component Analysis Pipeline -This repository represents a pipeline that performs three primary functions: +This program includes three tools for analyzing genetic data: -1. Heritable Component Analysis +1. GRM generation from SNP data. -2. Heritability Estimation +2. Heritability analysis for a given phenotype. -3. Kinship Matrix Generation +3. Heritable component analysis for a given set of phenotypic features. -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. +# Program I/O -# Usage +The file formats used in this program are explained below. See the `example_data` folder for example files. -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. +1. SNP data is accepted in PLINK binary format (BED/BIM/FAM files); use PLINK to convert from other formats into the efficient binary format. -Generally speaking, one can follow the below guidelines when using this program: +2. Pregiven kinship matrices (GRMs) are accepted in the GCTA GRM format. Likewise, GRMs generated from SNP data are saved in this format. -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. +3. Phenotypic and covariate data are accepted in the following CSV format: `family_id,individual_id,feature_1,feature_2,feature_n`. Do not include a header. -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. +All program output is saved to a directory with the following name: `hca-run-{epoch_timestamp}`. If the `output_file_prefix` option is specified, it must be a directory. Then, program output will be saved to the following directory: `{output_file_prefix}/hca-run-{epoch_timestamp}`. -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. +Output is generally in CSV format. The only exception to this rule is kinship matrices; these are outputted in the GCTA GRM format. All program outputs are below: -4. Run HCA with the parameters chosen, and observe the output. Analysis may take a long time depending on the size of your dataset. +| File Path (relative to output directory) | File Format | Tool | File Purpose | +|------------------------------------------|-------------|-------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `/score/scores.csv` | CSV | `score` | The generated scores will be saved in this file. | +| `/hca/cv_{n}_result.csv` | CSV | `hca` | This file will be created for every CV repeat; `n` will represent the CV repeat iteration. This file will include the `h^2` scores for each lambda, for each testing fold. | +| `/hca/weights_final.csv` | CSV | `hca` | This file will include the final weights generated by HCA. | +| `/h2r/result.csv` | CSV | `h2r`, `hca` | If running `h2r`, this file will represent the heritability analysis results. If running `hca`, this file will represent the heritability analysis results of the FINAL weights, with the full dataset. | +| `/kinship/grm.kinship` | GCTA GRM | `h2r`, `hca`, `kinship` | This file will include the generated kinship matrix (GRM). | +| `/kinship/grm.kinship_id` | GCTA GRM ID | `h2r`, `hca`, `kinship` | This file will include individual metadata for the GRM. | +# Usage -Additional options are present, but are not required. Review the documentation and help output for more details. +To run the program, you first need to choose a program command (specified via the `program_command` option). The available commands are: -# HCA Cross-Validation and Lambda Tuning +1. `hca` (heritable component analysis) -If “numSplits” is equal to one or is not set, the following process will be used for lambda tuning: +2. `h2r` (heritability analysis) -1. HCA will be run with each lambda value. +3. `kinship` (GRM generation) -2. For each Lambda value, Heritability analysis will be run with the generated trait. +4. `score` (score a phenotype with a HCA-generated trait) -3. The Lambda value that generates the most heritable trait trait will be saved as a result of the analysis. +If you see a warning related to matrix inversion, note the following. If matrix inversion fails, small values will be added to the matrix diagonals. This will generally resolve the invertibility error, but may adversely affect the results. As such, if this warning appears, note that your results may be unstable. -If the “numSplits” option is greater than one, the dataset will be split randomly into “numSplits” splits. The following process will then occur: +# HCA Documentation -1. The code will iterate through each lambda value. +## HCA Cross-Validation -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. +If cross-validation is not used (`hca_cv_folds` == 1), the following process will be used for lambda tuning: -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 +1. HCA will be run with each lambda value. -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: +2. For each Lambda value, Heritability analysis will be run with the generated trait. -## HCA +3. The Lambda value that generates the most heritable trait trait will be saved as a result of the analysis. -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. +If cross-validation is used (`hca_cv_folds` != 1), the following process will be used for lambda tuning: -## Heritability Analysis +1. The data will be split into `hca_cv_folds` folds. -When heritability analysis is run, statistics regarding the analysis will be saved to "h2r_est.txt". +2. HCA will be run for each lambda value `hca_cv_folds` times. Each time, one fold will be chosen for testing data, and the rest of the folds will be used for training data. HCA will be run with the training data, and the result will be scored via heritability analysis (with the testing data). The resulting `h^2` will be saved. -## Scoring +3. Steps 1-2 will be repeated `hca_cv_repeats` times, if `hca_cv_repeats` is greater than 1. -When scoring is run, the calculated scores will be saved to "scores.txt". +4. Each lambda value will have been used `hca_cv_folds * hca_cv_repeats` times. The average `h^2` value from all of these iterations will be taken. The lambda value with the best average `h^2` will be chosen as the best. -## Kinship Generation +5. HCA/heritability analysis will be run again to get the final result. All data will be used for both the training and testing stages (there will be no separate test set for this stage). -When kinship generation is run, the kinship file will be saved to "kinship.txt". +When cross-validation is used, the data gleaned from each CV repeat will be saved in a CSV file. This file will include the `h^2` scores for each run in that repeat. You may find this information helpful when troubleshooting. -# Special Note on Heritability Estimation +Note that some datasets may be particularly sensitive to removing subjects from training data. Cross-validation will remove subjects from training data for the sake of creating a test set. If you find that results are unstable with cross-validation, consider running the program without this functionality. -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. +# Example Commands -# Documentation +Examples for each `program_command` are included below: -Further documentation is available in the `docs` folder. +`hca`: `./hca-dev-new --program_command hca --kinship_src pregiven --given_kinship_file ../example_data/kinship/data.grm --given_kinship_id_file ../example_data/kinship/id.grm --phen_file ../example_data/phenotypic_data/data.csv --c_cov_file ../example_data/categorial_covariates/data.csv --hca_lambda_values_file lambda.txt` -# Dependencies +`h2r:` `./hca-dev-new --program_command h2r --kinship_src pregiven --given_kinship_file ../example_data/kinship/data.grm --given_kinship_id_file ../example_data/kinship/id.grm --phen_file ../example_data/phenotypic_data/data.csv --c_cov_file ../example_data/categorial_covariates/data.csv` -The Linux binary should work automatically on most Linux distributions. If not, compile it for your architecture. +`kinship`: `./hca-dev-new --program_command kinship --geno_fam_file ../example_data/snp_data/fam.fam --geno_bim_file ../example_data/snp_data/bim.bim --geno_bed_file ../example_data/snp_data/bed.bed --snps_in_memory 10000 --num_threads 40` -The OSX binary requires GCC version 6. Install it by running `brew install gcc6 --without-multilib` on your machine. +`score`: `./hca-dev-new --program_command score --trait_file ../example_data/weights_final.csv --phen_file ../example_data/phenotypic_data/data.csv` # 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. +To compile on most Linux distributions, follow these steps: + +1. Install g++-5: `apt-get install g++-5` + +2. Install the Armadillo matrix library (download [here](http://arma.sourceforge.net/download.html) and run `cmake . && make && sudo make install`) + +3. Install the NLOpt optimization library (download [here](http://ab-initio.mit.edu/nlopt/) and run `./configure && make && sudo make install`) + +4. 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. + +5. Install Boost: `sudo apt-get install libboost-all-dev`. + +6. Install lapack: `sudo apt-get install liblapack-dev`. + +7. Run `make --file Makefile_linux` in the `src` directory. + +# Options + +| Name | Relevant Tools | Required? | Allowed Values | Default | Description | +|-------------------------- |---------------------------------- |------------------------------------------------------------------------------------------------------------------------------------------ |------------------------------------- |----------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `program_command` | `hca`, `h2r`, `kinship`, `score` | Yes | `hca`, `h2r`, `kinship`, `score` | | Program command. | +| `num_threads` | `hca`, `h2r`, `kinship`, `score` | No | Integer | 1 | Number of threads to use. | +| `output_file_prefix` | `hca`, `h2r`, `kinship`, `score` | No | String (directory) | | Prefix for data output. Will be interpreted as directory. Default: current directory. | +| `log_level` | `hca`, `h2r`, `kinship`, `score` | No | `info`, `warning`, `debug`, `error` | `info` | Log level. | +| `snp_missing_handler` | `hca`, `h2r`, `kinship` | No | `deleteMissing`, `fillMean` | `deleteMissing` | How to handle missing data when creating a GRM from SNP data. | +| `maf_cutoff` | `hca`, `h2r`,`kinship` | No | Double | | MAF cutoff. Include if you want to exclude SNPs based on MAF. | +| `hwe_cutoff` | `hca`, `h2r`,`kinship` | No | Double | | HWE cutoff. Include if you want to exclude SNPs based on MAF. | +| `snps_in_memory` | `hca`, `h2r`, `kinship` | No | Integer | 1000 | Number of SNPs to keep in memory at a time. | +| `all_snps_in_memory` | `hca`, `h2r`, `kinship` | No | Boolean (`true`, `false`) | `false` | Whether or not to perform GRM generation with all data in memory. This is significantly faster than the iterative approach, but may not be feasible for large datasets. | +| `kinship_src` | `hca`, `h2r` | Yes (for `hca`, `h2r`) | `pregiven`, `snp` | | Where to get kinship from. If `pregiven`, must provide kinship files. If `snp`, must provide geno data. | +| `indv_whitelist_file` | `hca`, `h2r`, `kinship` | No | String (file) | | Whitelist individuals for analysis. NOTE: this option has not yet been implemented and currently has no effect. If you need to remove any individuals from analysis, simply remove them from at least one file in the input dataset. | +| `indv_blacklist_file` | `hca`, `h2r`, `kinship` | No | String (file) | | Blacklist individuals for analysis. NOTE: this option has not yet been implemented and currently has no effect.,If you need to remove any individuals from analysis, simply remove them from at least one file in the input dataset. | +| `c_cov_file` | `hca`, `h2r` | No | String (file) | | Categorical covariate data. | +| `c_cov_spec_file` | `hca`, `h2r` | Yes, if a whitelist or blacklist is specified for categorical covariates. | String (file) | | Categorical covariate spec, one feature name for file. | +| `c_cov_whitelist_file` | `hca`, `h2r` | No | String (file) | | Whitelist covariate features. | +| `c_cov_blacklist_file` | `hca`, `h2r` | No | String (file) | | Blacklist covariate features. | +| `q_cov_file` | `hca`, `h2r` | No | String (file) | | Quantitative covariate data. | +| `q_cov_spec_file` | `hca`, `h2r` | Yes, if a whitelist or blacklist is specified for quantitative covariates. | String (file) | | Quantitative covariate spec, one feature name for file. | +| `q_cov_whitelist_file` | `hca`, `h2r` | No | String (file) | | Whitelist covariate features. | +| `q_cov_blacklist_file` | `hca`, `h2r` | No | String (file) | | Blacklist covariate features. | +| `phen_file` | `hca`, `h2r` | Yes (for `hca`, `h2r`) | String (file) | | Phenotypic data. Required. | +| `phen_spec_file` | `hca`, `h2r` | Yes, if a whitelist or blacklist is specified for phenotypic data. | String (file) | | Phenotypic data spec, one feature name for file. | +| `phen_whitelist_file` | `hca`, `h2r` | No | String (file) | | Whitelist phenotypic features. | +| `phen_blacklist_file` | `hca`, `h2r` | No | String (file) | | Blacklist phenotypic features. | +| `given_kinship_file` | `hca`, `h2r` | Required if using pregiven kinship data (for `hca`, `h2r`). You must use either pregiven or SNP-generated kinship data. | String (file) | | Given kinship data path (data file). | +| `given_kinship_id_file` | `hca`, `h2r` | Required if using pregiven kinship data (for `hca`, `h2r`). You must use either pregiven or SNP-generated kinship data. | String (file) | | Given kinship data path (ID file). | +| `geno_fam_file` | `hca`, `h2r`, `kinship` | Required if using SNP-generated kinship data (for `hca`, `h2r`). You must use either pregiven or SNP-generated kinship data. | String (file) | | Genotypic data file (FAM file). | +| `geno_bim_file` | `hca`, `h2r`, `kinship ` | Required if using SNP-generated kinship data (for `hca`, `h2r`). You must use either pregiven or SNP-generated kinship data. | String (file) | | Genotypic data file (BIM file). | +| `geno_bed_file` | `hca`, `h2r`, `kinship ` | Required if using SNP-generated kinship data (for `hca`, `h2r`). You must use either pregiven or SNP-generated kinship data. | String (file) | | Genotypic data file (BED file). | +| `geno_whitelist_file` | `hca`, `h2r`, `kinship ` | No | String (file) | | Whitelist SNPs. | +| `geno_blacklist_file` | `hca`, `h2r`, `kinship ` | No | String (file) | | Blacklist SNPs. | +| `trait_file` | `score` | Yes (for `score`). | String (file) | | Trait to score phenotypic data with. | +| `coef_file` | `hca` | No. | String (file) | | Coefficient constraint file for HCA. Include if you want to constrain the weight coefficients. | +| `hca_lambda_values_file` | `hca` | Required if populating HCA lambda values from a file (for `hca`). Exactly one lambda strategy (file, auto, interval) must be used. | String (file) | | File with lambda values for HCA, one per line. Each value must be a double. | +| `hca_max_iterations` | `hca` | No. | Integer | 1000 | Max iterations for HCA. | +| `h2r_max_iterations` | `h2r` | No. | Integer | 1000 | Max iterations for H2R. | +| `hca_cv_folds` | `hca` | No. | Integer | 1 | Number of folds to use for HCA cross-validation. If 1, no CV will be performed. | +| `hca_cv_repeats` | `hca` | No. | Integer | 1 | Number of repeats to use for HCA cross-validation. | +| `auto_lambda` | `hca` | Required if populating HCA lambda values automatically (for `hca`). Exactly one lambda strategy (file, auto, interval) must be used. | `true`, `false` | `false` | Whether to use auto lambda discovery. | +| `hca_lambda_start` | `hca` | Required if populating HCA lambda values from an interval (for `hca`). Exactly one lambda strategy (file, auto, interval) must be used. | Double | | Start value for lambda search. | +| `hca_lambda_end` | `hca` | Required if populating HCA lambda values from an interval (for `hca`). Exactly one lambda strategy (file, auto, interval) must be used. | Double | | End value for lambda search. | +| `hca_lambda_incr` | `hca` | Required if populating HCA lambda values from an interval (for `hca`). Exactly one lambda strategy (file, auto, interval) must be used. | Double | | Interval value for lambda search. | +| `hca_gr_cutoff` | `hca` | No. | Double | | GR cutoff for HCA. NOTE: this option has not yet been implemented and currently has no effect. If we decide to implement it, it should have similar behavior to the `grm-cutoff` option in the GCTA software. | # References @@ -107,3 +161,4 @@ Yang J, Lee SH, Goddard ME, Visscher PM. GCTA: A Tool for Genome-wide Complex Tr 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 deleted file mode 100755 index a809387..0000000 Binary files a/bin/hca-linux and /dev/null differ diff --git a/bin/hca-osx b/bin/hca-osx deleted file mode 100755 index 0387985..0000000 Binary files a/bin/hca-osx and /dev/null differ diff --git a/docs/html/_data_8cpp.html b/docs/html/_data_8cpp.html deleted file mode 100644 index d769b3a..0000000 --- a/docs/html/_data_8cpp.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 43b69dd..0000000 --- a/docs/html/_data_8cpp__incl.map +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/docs/html/_data_8cpp__incl.md5 b/docs/html/_data_8cpp__incl.md5 deleted file mode 100644 index 38f2e57..0000000 --- a/docs/html/_data_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -b873e50246071bf6ccec9b6b36c9ae3c \ No newline at end of file diff --git a/docs/html/_data_8cpp__incl.png b/docs/html/_data_8cpp__incl.png deleted file mode 100644 index fd2aede..0000000 Binary files a/docs/html/_data_8cpp__incl.png and /dev/null differ diff --git a/docs/html/_data_8h.html b/docs/html/_data_8h.html deleted file mode 100644 index cc15564..0000000 --- a/docs/html/_data_8h.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 65234d2..0000000 --- a/docs/html/_data_8h__dep__incl.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/docs/html/_data_8h__dep__incl.md5 b/docs/html/_data_8h__dep__incl.md5 deleted file mode 100644 index ba18b91..0000000 --- a/docs/html/_data_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 84b862e..0000000 Binary files a/docs/html/_data_8h__dep__incl.png and /dev/null differ diff --git a/docs/html/_data_8h__incl.map b/docs/html/_data_8h__incl.map deleted file mode 100644 index 08de796..0000000 --- a/docs/html/_data_8h__incl.map +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/docs/html/_data_8h__incl.md5 b/docs/html/_data_8h__incl.md5 deleted file mode 100644 index 08017a4..0000000 --- a/docs/html/_data_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -d75f77723d868d9310570ba36113000c \ No newline at end of file diff --git a/docs/html/_data_8h__incl.png b/docs/html/_data_8h__incl.png deleted file mode 100644 index 9947bd9..0000000 Binary files a/docs/html/_data_8h__incl.png and /dev/null differ diff --git a/docs/html/_data_8h_source.html b/docs/html/_data_8h_source.html deleted file mode 100644 index 94d84cf..0000000 --- a/docs/html/_data_8h_source.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index b7f2dc7..0000000 --- a/docs/html/_given_kinship_8cpp.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 3232210..0000000 --- a/docs/html/_given_kinship_8cpp__incl.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/docs/html/_given_kinship_8cpp__incl.md5 b/docs/html/_given_kinship_8cpp__incl.md5 deleted file mode 100644 index 432663a..0000000 --- a/docs/html/_given_kinship_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index ab4b6dc..0000000 Binary files a/docs/html/_given_kinship_8cpp__incl.png and /dev/null differ diff --git a/docs/html/_given_kinship_8h.html b/docs/html/_given_kinship_8h.html deleted file mode 100644 index 23bdaa8..0000000 --- a/docs/html/_given_kinship_8h.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 625105c..0000000 --- a/docs/html/_given_kinship_8h__dep__incl.map +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/docs/html/_given_kinship_8h__dep__incl.md5 b/docs/html/_given_kinship_8h__dep__incl.md5 deleted file mode 100644 index 21a4406..0000000 --- a/docs/html/_given_kinship_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index c9ca00b..0000000 Binary files a/docs/html/_given_kinship_8h__dep__incl.png and /dev/null differ diff --git a/docs/html/_given_kinship_8h__incl.map b/docs/html/_given_kinship_8h__incl.map deleted file mode 100644 index c131317..0000000 --- a/docs/html/_given_kinship_8h__incl.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/_given_kinship_8h__incl.md5 b/docs/html/_given_kinship_8h__incl.md5 deleted file mode 100644 index d7aeac8..0000000 --- a/docs/html/_given_kinship_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index fb18081..0000000 Binary files a/docs/html/_given_kinship_8h__incl.png and /dev/null differ diff --git a/docs/html/_given_kinship_8h_source.html b/docs/html/_given_kinship_8h_source.html deleted file mode 100644 index a85fdff..0000000 --- a/docs/html/_given_kinship_8h_source.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index fb65f4b..0000000 --- a/docs/html/_h2r_est_8h_source.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index bc7bd98..0000000 --- a/docs/html/_hca_8h_source.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 34742f6..0000000 --- a/docs/html/_individual_data_8cpp.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 59c6216..0000000 --- a/docs/html/_individual_data_8cpp__incl.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/_individual_data_8cpp__incl.md5 b/docs/html/_individual_data_8cpp__incl.md5 deleted file mode 100644 index fe0353f..0000000 --- a/docs/html/_individual_data_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index ec789fc..0000000 Binary files a/docs/html/_individual_data_8cpp__incl.png and /dev/null differ diff --git a/docs/html/_individual_data_8h.html b/docs/html/_individual_data_8h.html deleted file mode 100644 index d3a5ce3..0000000 --- a/docs/html/_individual_data_8h.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 032e5ad..0000000 --- a/docs/html/_individual_data_8h__dep__incl.map +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/docs/html/_individual_data_8h__dep__incl.md5 b/docs/html/_individual_data_8h__dep__incl.md5 deleted file mode 100644 index c64b86f..0000000 --- a/docs/html/_individual_data_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 4986868..0000000 Binary files a/docs/html/_individual_data_8h__dep__incl.png and /dev/null differ diff --git a/docs/html/_individual_data_8h__incl.map b/docs/html/_individual_data_8h__incl.map deleted file mode 100644 index 5204a76..0000000 --- a/docs/html/_individual_data_8h__incl.map +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/docs/html/_individual_data_8h__incl.md5 b/docs/html/_individual_data_8h__incl.md5 deleted file mode 100644 index b54762d..0000000 --- a/docs/html/_individual_data_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index daa629a..0000000 Binary files a/docs/html/_individual_data_8h__incl.png and /dev/null differ diff --git a/docs/html/_individual_data_8h_source.html b/docs/html/_individual_data_8h_source.html deleted file mode 100644 index 3320d92..0000000 --- a/docs/html/_individual_data_8h_source.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 7f492c9..0000000 --- a/docs/html/_individual_data_set_8cpp.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 4c9375d..0000000 --- a/docs/html/_individual_data_set_8cpp__incl.map +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/html/_individual_data_set_8cpp__incl.md5 b/docs/html/_individual_data_set_8cpp__incl.md5 deleted file mode 100644 index 42e7731..0000000 --- a/docs/html/_individual_data_set_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index fde0664..0000000 Binary files a/docs/html/_individual_data_set_8cpp__incl.png and /dev/null differ diff --git a/docs/html/_individual_data_set_8h.html b/docs/html/_individual_data_set_8h.html deleted file mode 100644 index 4c40a7d..0000000 --- a/docs/html/_individual_data_set_8h.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index dc7979a..0000000 --- a/docs/html/_individual_data_set_8h__dep__incl.map +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/docs/html/_individual_data_set_8h__dep__incl.md5 b/docs/html/_individual_data_set_8h__dep__incl.md5 deleted file mode 100644 index cef745e..0000000 --- a/docs/html/_individual_data_set_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 5b74b97..0000000 Binary files a/docs/html/_individual_data_set_8h__dep__incl.png and /dev/null differ diff --git a/docs/html/_individual_data_set_8h__incl.map b/docs/html/_individual_data_set_8h__incl.map deleted file mode 100644 index 71f1cfe..0000000 --- a/docs/html/_individual_data_set_8h__incl.map +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/docs/html/_individual_data_set_8h__incl.md5 b/docs/html/_individual_data_set_8h__incl.md5 deleted file mode 100644 index ecc80a5..0000000 --- a/docs/html/_individual_data_set_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 4f31de1..0000000 Binary files a/docs/html/_individual_data_set_8h__incl.png and /dev/null differ diff --git a/docs/html/_individual_data_set_8h_source.html b/docs/html/_individual_data_set_8h_source.html deleted file mode 100644 index ba8f12b..0000000 --- a/docs/html/_individual_data_set_8h_source.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 0cf2e63..0000000 --- a/docs/html/_kinship_8cpp.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 9a567c4..0000000 --- a/docs/html/_kinship_8cpp__incl.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/_kinship_8cpp__incl.md5 b/docs/html/_kinship_8cpp__incl.md5 deleted file mode 100644 index 5bdfa78..0000000 --- a/docs/html/_kinship_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -7d7bee46ad273f0295ec03a2295cddfe \ No newline at end of file diff --git a/docs/html/_kinship_8cpp__incl.png b/docs/html/_kinship_8cpp__incl.png deleted file mode 100644 index 800c136..0000000 Binary files a/docs/html/_kinship_8cpp__incl.png and /dev/null differ diff --git a/docs/html/_kinship_8h.html b/docs/html/_kinship_8h.html deleted file mode 100644 index 8e3a8a0..0000000 --- a/docs/html/_kinship_8h.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 5a64050..0000000 --- a/docs/html/_kinship_8h__dep__incl.map +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/docs/html/_kinship_8h__dep__incl.md5 b/docs/html/_kinship_8h__dep__incl.md5 deleted file mode 100644 index 020ef5a..0000000 --- a/docs/html/_kinship_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index a3ab6f6..0000000 Binary files a/docs/html/_kinship_8h__dep__incl.png and /dev/null differ diff --git a/docs/html/_kinship_8h__incl.map b/docs/html/_kinship_8h__incl.map deleted file mode 100644 index 74489e3..0000000 --- a/docs/html/_kinship_8h__incl.map +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/docs/html/_kinship_8h__incl.md5 b/docs/html/_kinship_8h__incl.md5 deleted file mode 100644 index 9018e9d..0000000 --- a/docs/html/_kinship_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -cbed37876e04b058e116cafda844f917 \ No newline at end of file diff --git a/docs/html/_kinship_8h__incl.png b/docs/html/_kinship_8h__incl.png deleted file mode 100644 index f4059a8..0000000 Binary files a/docs/html/_kinship_8h__incl.png and /dev/null differ diff --git a/docs/html/_kinship_8h_source.html b/docs/html/_kinship_8h_source.html deleted file mode 100644 index c54d8b7..0000000 --- a/docs/html/_kinship_8h_source.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 59f7efd..0000000 --- a/docs/html/_option_8cpp.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 95668ec..0000000 --- a/docs/html/_option_8cpp__incl.map +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/docs/html/_option_8cpp__incl.md5 b/docs/html/_option_8cpp__incl.md5 deleted file mode 100644 index 907f2df..0000000 --- a/docs/html/_option_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -698e66b9bc94e04192c53321d05dcb99 \ No newline at end of file diff --git a/docs/html/_option_8cpp__incl.png b/docs/html/_option_8cpp__incl.png deleted file mode 100644 index d59047e..0000000 Binary files a/docs/html/_option_8cpp__incl.png and /dev/null differ diff --git a/docs/html/_option_8h.html b/docs/html/_option_8h.html deleted file mode 100644 index 1fdce53..0000000 --- a/docs/html/_option_8h.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 62e99e1..0000000 --- a/docs/html/_option_8h__dep__incl.map +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/docs/html/_option_8h__dep__incl.md5 b/docs/html/_option_8h__dep__incl.md5 deleted file mode 100644 index 899c26a..0000000 --- a/docs/html/_option_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 5667dd4..0000000 Binary files a/docs/html/_option_8h__dep__incl.png and /dev/null differ diff --git a/docs/html/_option_8h__incl.map b/docs/html/_option_8h__incl.map deleted file mode 100644 index e2e4a23..0000000 --- a/docs/html/_option_8h__incl.map +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/docs/html/_option_8h__incl.md5 b/docs/html/_option_8h__incl.md5 deleted file mode 100644 index 0481adc..0000000 --- a/docs/html/_option_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -ce0d95cb5ff352ae4256646fd76328a6 \ No newline at end of file diff --git a/docs/html/_option_8h__incl.png b/docs/html/_option_8h__incl.png deleted file mode 100644 index 3c52497..0000000 Binary files a/docs/html/_option_8h__incl.png and /dev/null differ diff --git a/docs/html/_option_8h_source.html b/docs/html/_option_8h_source.html deleted file mode 100644 index a1d0ecd..0000000 --- a/docs/html/_option_8h_source.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 0e15b0c..0000000 --- a/docs/html/_reml_h2r_est_8cpp.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index fb2d72a..0000000 --- a/docs/html/_reml_h2r_est_8cpp__incl.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/_reml_h2r_est_8cpp__incl.md5 b/docs/html/_reml_h2r_est_8cpp__incl.md5 deleted file mode 100644 index 895c702..0000000 --- a/docs/html/_reml_h2r_est_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 19f83a3..0000000 Binary files a/docs/html/_reml_h2r_est_8cpp__incl.png and /dev/null differ diff --git a/docs/html/_reml_h2r_est_8h.html b/docs/html/_reml_h2r_est_8h.html deleted file mode 100644 index bf01ce6..0000000 --- a/docs/html/_reml_h2r_est_8h.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index f61c4a8..0000000 --- a/docs/html/_reml_h2r_est_8h__dep__incl.map +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/docs/html/_reml_h2r_est_8h__dep__incl.md5 b/docs/html/_reml_h2r_est_8h__dep__incl.md5 deleted file mode 100644 index 947dcfa..0000000 --- a/docs/html/_reml_h2r_est_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 2e15976..0000000 Binary files a/docs/html/_reml_h2r_est_8h__dep__incl.png and /dev/null differ diff --git a/docs/html/_reml_h2r_est_8h__incl.map b/docs/html/_reml_h2r_est_8h__incl.map deleted file mode 100644 index dfeae25..0000000 --- a/docs/html/_reml_h2r_est_8h__incl.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/_reml_h2r_est_8h__incl.md5 b/docs/html/_reml_h2r_est_8h__incl.md5 deleted file mode 100644 index f109d6c..0000000 --- a/docs/html/_reml_h2r_est_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 84fb4b2..0000000 Binary files a/docs/html/_reml_h2r_est_8h__incl.png and /dev/null differ diff --git a/docs/html/_reml_h2r_est_8h_source.html b/docs/html/_reml_h2r_est_8h_source.html deleted file mode 100644 index beebc45..0000000 --- a/docs/html/_reml_h2r_est_8h_source.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index dfb43a6..0000000 --- a/docs/html/_reml_hca_8cpp.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index b201ef9..0000000 --- a/docs/html/_reml_hca_8cpp__incl.map +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/docs/html/_reml_hca_8cpp__incl.md5 b/docs/html/_reml_hca_8cpp__incl.md5 deleted file mode 100644 index 3065bd1..0000000 --- a/docs/html/_reml_hca_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 28087a8..0000000 Binary files a/docs/html/_reml_hca_8cpp__incl.png and /dev/null differ diff --git a/docs/html/_reml_hca_8h.html b/docs/html/_reml_hca_8h.html deleted file mode 100644 index 4642e00..0000000 --- a/docs/html/_reml_hca_8h.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 664c197..0000000 --- a/docs/html/_reml_hca_8h__dep__incl.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/_reml_hca_8h__dep__incl.md5 b/docs/html/_reml_hca_8h__dep__incl.md5 deleted file mode 100644 index dd53c5e..0000000 --- a/docs/html/_reml_hca_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index b79dfa3..0000000 Binary files a/docs/html/_reml_hca_8h__dep__incl.png and /dev/null differ diff --git a/docs/html/_reml_hca_8h__incl.map b/docs/html/_reml_hca_8h__incl.map deleted file mode 100644 index 929d3d0..0000000 --- a/docs/html/_reml_hca_8h__incl.map +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/docs/html/_reml_hca_8h__incl.md5 b/docs/html/_reml_hca_8h__incl.md5 deleted file mode 100644 index a37b2e9..0000000 --- a/docs/html/_reml_hca_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 6d56e5a..0000000 Binary files a/docs/html/_reml_hca_8h__incl.png and /dev/null differ diff --git a/docs/html/_reml_hca_8h_source.html b/docs/html/_reml_hca_8h_source.html deleted file mode 100644 index 4d60d0b..0000000 --- a/docs/html/_reml_hca_8h_source.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index d157e8f..0000000 --- a/docs/html/_scorer_8cpp.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 72f7542..0000000 --- a/docs/html/_scorer_8cpp__incl.map +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/docs/html/_scorer_8cpp__incl.md5 b/docs/html/_scorer_8cpp__incl.md5 deleted file mode 100644 index 4aea5c0..0000000 --- a/docs/html/_scorer_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -c067b40e3e036087d0b94d62e28e0a4d \ No newline at end of file diff --git a/docs/html/_scorer_8cpp__incl.png b/docs/html/_scorer_8cpp__incl.png deleted file mode 100644 index cc94911..0000000 Binary files a/docs/html/_scorer_8cpp__incl.png and /dev/null differ diff --git a/docs/html/_scorer_8h.html b/docs/html/_scorer_8h.html deleted file mode 100644 index 7b2352d..0000000 --- a/docs/html/_scorer_8h.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index b8b4344..0000000 --- a/docs/html/_scorer_8h__dep__incl.map +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/html/_scorer_8h__dep__incl.md5 b/docs/html/_scorer_8h__dep__incl.md5 deleted file mode 100644 index 98d7e4c..0000000 --- a/docs/html/_scorer_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 9fca827..0000000 Binary files a/docs/html/_scorer_8h__dep__incl.png and /dev/null differ diff --git a/docs/html/_scorer_8h__incl.map b/docs/html/_scorer_8h__incl.map deleted file mode 100644 index b606117..0000000 --- a/docs/html/_scorer_8h__incl.map +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/html/_scorer_8h__incl.md5 b/docs/html/_scorer_8h__incl.md5 deleted file mode 100644 index 5f9416a..0000000 --- a/docs/html/_scorer_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -913168867ced2a5e13a7f273bb91da1e \ No newline at end of file diff --git a/docs/html/_scorer_8h__incl.png b/docs/html/_scorer_8h__incl.png deleted file mode 100644 index f1038b5..0000000 Binary files a/docs/html/_scorer_8h__incl.png and /dev/null differ diff --git a/docs/html/_scorer_8h_source.html b/docs/html/_scorer_8h_source.html deleted file mode 100644 index a38fa85..0000000 --- a/docs/html/_scorer_8h_source.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 654ffb0..0000000 --- a/docs/html/_snp_kinship_8cpp.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index b3d3b5a..0000000 --- a/docs/html/_snp_kinship_8cpp__incl.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/docs/html/_snp_kinship_8cpp__incl.md5 b/docs/html/_snp_kinship_8cpp__incl.md5 deleted file mode 100644 index 97ef72a..0000000 --- a/docs/html/_snp_kinship_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 32a7293..0000000 Binary files a/docs/html/_snp_kinship_8cpp__incl.png and /dev/null differ diff --git a/docs/html/_snp_kinship_8h.html b/docs/html/_snp_kinship_8h.html deleted file mode 100644 index 35a5ee5..0000000 --- a/docs/html/_snp_kinship_8h.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index db06d7e..0000000 --- a/docs/html/_snp_kinship_8h__dep__incl.map +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/docs/html/_snp_kinship_8h__dep__incl.md5 b/docs/html/_snp_kinship_8h__dep__incl.md5 deleted file mode 100644 index 22824fb..0000000 --- a/docs/html/_snp_kinship_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index ea34dec..0000000 Binary files a/docs/html/_snp_kinship_8h__dep__incl.png and /dev/null differ diff --git a/docs/html/_snp_kinship_8h__incl.map b/docs/html/_snp_kinship_8h__incl.map deleted file mode 100644 index c516348..0000000 --- a/docs/html/_snp_kinship_8h__incl.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/_snp_kinship_8h__incl.md5 b/docs/html/_snp_kinship_8h__incl.md5 deleted file mode 100644 index bd7cb85..0000000 --- a/docs/html/_snp_kinship_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 0d5aee5..0000000 Binary files a/docs/html/_snp_kinship_8h__incl.png and /dev/null differ diff --git a/docs/html/_snp_kinship_8h_source.html b/docs/html/_snp_kinship_8h_source.html deleted file mode 100644 index 9bd42ff..0000000 --- a/docs/html/_snp_kinship_8h_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 5233078..0000000 --- a/docs/html/_util_8h_source.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 702ec9f..0000000 --- a/docs/html/annotated.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index ddf7b07..0000000 --- a/docs/html/annotated_dup.js +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 224b29a..0000000 Binary files a/docs/html/bc_s.png and /dev/null differ diff --git a/docs/html/bdwn.png b/docs/html/bdwn.png deleted file mode 100644 index 940a0b9..0000000 Binary files a/docs/html/bdwn.png and /dev/null differ diff --git a/docs/html/class_data-members.html b/docs/html/class_data-members.html deleted file mode 100644 index 1fe3c9e..0000000 --- a/docs/html/class_data-members.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 19255e7..0000000 --- a/docs/html/class_data.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 2de1b27..0000000 --- a/docs/html/class_data.js +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 8fa9549..0000000 --- a/docs/html/class_data__coll__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/class_data__coll__graph.md5 b/docs/html/class_data__coll__graph.md5 deleted file mode 100644 index 8c30354..0000000 --- a/docs/html/class_data__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 375bdf6..0000000 Binary files a/docs/html/class_data__coll__graph.png and /dev/null differ diff --git a/docs/html/class_given_kinship-members.html b/docs/html/class_given_kinship-members.html deleted file mode 100644 index c132cce..0000000 --- a/docs/html/class_given_kinship-members.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 4175fa4..0000000 --- a/docs/html/class_given_kinship.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index dc3cd08..0000000 --- a/docs/html/class_given_kinship.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 2fe476c..0000000 --- a/docs/html/class_given_kinship__coll__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/class_given_kinship__coll__graph.md5 b/docs/html/class_given_kinship__coll__graph.md5 deleted file mode 100644 index 5b6f402..0000000 --- a/docs/html/class_given_kinship__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index fae7f4e..0000000 Binary files a/docs/html/class_given_kinship__coll__graph.png and /dev/null differ diff --git a/docs/html/class_given_kinship__inherit__graph.map b/docs/html/class_given_kinship__inherit__graph.map deleted file mode 100644 index 2fe476c..0000000 --- a/docs/html/class_given_kinship__inherit__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/class_given_kinship__inherit__graph.md5 b/docs/html/class_given_kinship__inherit__graph.md5 deleted file mode 100644 index 0a753a4..0000000 --- a/docs/html/class_given_kinship__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index fae7f4e..0000000 Binary files a/docs/html/class_given_kinship__inherit__graph.png and /dev/null differ diff --git a/docs/html/class_h2r_est.html b/docs/html/class_h2r_est.html deleted file mode 100644 index 9e35dcc..0000000 --- a/docs/html/class_h2r_est.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index fc80067..0000000 --- a/docs/html/class_h2r_est__coll__graph.map +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/docs/html/class_h2r_est__coll__graph.md5 b/docs/html/class_h2r_est__coll__graph.md5 deleted file mode 100644 index 373da14..0000000 --- a/docs/html/class_h2r_est__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index b40ceb4..0000000 Binary files a/docs/html/class_h2r_est__coll__graph.png and /dev/null differ diff --git a/docs/html/class_h2r_est__inherit__graph.map b/docs/html/class_h2r_est__inherit__graph.map deleted file mode 100644 index 24639a9..0000000 --- a/docs/html/class_h2r_est__inherit__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/class_h2r_est__inherit__graph.md5 b/docs/html/class_h2r_est__inherit__graph.md5 deleted file mode 100644 index 98beee0..0000000 --- a/docs/html/class_h2r_est__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index e2195cb..0000000 Binary files a/docs/html/class_h2r_est__inherit__graph.png and /dev/null differ diff --git a/docs/html/class_hca.html b/docs/html/class_hca.html deleted file mode 100644 index 5dafe5e..0000000 --- a/docs/html/class_hca.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 97d3921..0000000 --- a/docs/html/class_hca__coll__graph.map +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/docs/html/class_hca__coll__graph.md5 b/docs/html/class_hca__coll__graph.md5 deleted file mode 100644 index 5b60e6f..0000000 --- a/docs/html/class_hca__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 0fab61d..0000000 Binary files a/docs/html/class_hca__coll__graph.png and /dev/null differ diff --git a/docs/html/class_hca__inherit__graph.map b/docs/html/class_hca__inherit__graph.map deleted file mode 100644 index aab7477..0000000 --- a/docs/html/class_hca__inherit__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/class_hca__inherit__graph.md5 b/docs/html/class_hca__inherit__graph.md5 deleted file mode 100644 index 35c71e9..0000000 --- a/docs/html/class_hca__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 1836b7e..0000000 Binary files a/docs/html/class_hca__inherit__graph.png and /dev/null differ diff --git a/docs/html/class_individual_data-members.html b/docs/html/class_individual_data-members.html deleted file mode 100644 index ba3660d..0000000 --- a/docs/html/class_individual_data-members.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index bc624f0..0000000 --- a/docs/html/class_individual_data.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index af632f0..0000000 --- a/docs/html/class_individual_data.js +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 00c9dcf..0000000 --- a/docs/html/class_individual_data__coll__graph.map +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/docs/html/class_individual_data__coll__graph.md5 b/docs/html/class_individual_data__coll__graph.md5 deleted file mode 100644 index 5b419a8..0000000 --- a/docs/html/class_individual_data__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 0fa5dd2..0000000 Binary files a/docs/html/class_individual_data__coll__graph.png and /dev/null differ diff --git a/docs/html/class_individual_data_set-members.html b/docs/html/class_individual_data_set-members.html deleted file mode 100644 index f00aa41..0000000 --- a/docs/html/class_individual_data_set-members.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 4f1cd8b..0000000 --- a/docs/html/class_individual_data_set.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 46d3350..0000000 --- a/docs/html/class_individual_data_set.js +++ /dev/null @@ -1,32 +0,0 @@ -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 deleted file mode 100644 index 16758e1..0000000 --- a/docs/html/class_individual_data_set__coll__graph.map +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/docs/html/class_individual_data_set__coll__graph.md5 b/docs/html/class_individual_data_set__coll__graph.md5 deleted file mode 100644 index 9615c92..0000000 --- a/docs/html/class_individual_data_set__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 0f2f5cf..0000000 Binary files a/docs/html/class_individual_data_set__coll__graph.png and /dev/null differ diff --git a/docs/html/class_kinship-members.html b/docs/html/class_kinship-members.html deleted file mode 100644 index d91dfb6..0000000 --- a/docs/html/class_kinship-members.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index a781a03..0000000 --- a/docs/html/class_kinship.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 820787b..0000000 --- a/docs/html/class_kinship.js +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 2d6dc0b..0000000 --- a/docs/html/class_kinship__coll__graph.map +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/docs/html/class_kinship__coll__graph.md5 b/docs/html/class_kinship__coll__graph.md5 deleted file mode 100644 index 6736837..0000000 --- a/docs/html/class_kinship__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index b966e0a..0000000 Binary files a/docs/html/class_kinship__coll__graph.png and /dev/null differ diff --git a/docs/html/class_kinship__inherit__graph.map b/docs/html/class_kinship__inherit__graph.map deleted file mode 100644 index 1dbf477..0000000 --- a/docs/html/class_kinship__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/class_kinship__inherit__graph.md5 b/docs/html/class_kinship__inherit__graph.md5 deleted file mode 100644 index 301c3e1..0000000 --- a/docs/html/class_kinship__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index c1430d1..0000000 Binary files a/docs/html/class_kinship__inherit__graph.png and /dev/null differ diff --git a/docs/html/class_option-members.html b/docs/html/class_option-members.html deleted file mode 100644 index 68ccaba..0000000 --- a/docs/html/class_option-members.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 4c9280a..0000000 --- a/docs/html/class_option.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 9315515..0000000 --- a/docs/html/class_option.js +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 6c49131..0000000 --- a/docs/html/class_option__coll__graph.map +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/docs/html/class_option__coll__graph.md5 b/docs/html/class_option__coll__graph.md5 deleted file mode 100644 index b6d51e7..0000000 --- a/docs/html/class_option__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index a2142ce..0000000 Binary files a/docs/html/class_option__coll__graph.png and /dev/null differ diff --git a/docs/html/class_reml_h2r_est-members.html b/docs/html/class_reml_h2r_est-members.html deleted file mode 100644 index 1237ac3..0000000 --- a/docs/html/class_reml_h2r_est-members.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index c30df69..0000000 --- a/docs/html/class_reml_h2r_est.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 4c13b70..0000000 --- a/docs/html/class_reml_h2r_est.js +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index cd5143d..0000000 --- a/docs/html/class_reml_h2r_est__coll__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/class_reml_h2r_est__coll__graph.md5 b/docs/html/class_reml_h2r_est__coll__graph.md5 deleted file mode 100644 index 3b8549a..0000000 --- a/docs/html/class_reml_h2r_est__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index db0b271..0000000 Binary files a/docs/html/class_reml_h2r_est__coll__graph.png and /dev/null differ diff --git a/docs/html/class_reml_h2r_est__inherit__graph.map b/docs/html/class_reml_h2r_est__inherit__graph.map deleted file mode 100644 index cd5143d..0000000 --- a/docs/html/class_reml_h2r_est__inherit__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/class_reml_h2r_est__inherit__graph.md5 b/docs/html/class_reml_h2r_est__inherit__graph.md5 deleted file mode 100644 index 74a52f8..0000000 --- a/docs/html/class_reml_h2r_est__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index db0b271..0000000 Binary files a/docs/html/class_reml_h2r_est__inherit__graph.png and /dev/null differ diff --git a/docs/html/class_reml_hca-members.html b/docs/html/class_reml_hca-members.html deleted file mode 100644 index 4d1bf91..0000000 --- a/docs/html/class_reml_hca-members.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index e145d1f..0000000 --- a/docs/html/class_reml_hca.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index aa6eef7..0000000 --- a/docs/html/class_reml_hca.js +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 592a475..0000000 --- a/docs/html/class_reml_hca__coll__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/class_reml_hca__coll__graph.md5 b/docs/html/class_reml_hca__coll__graph.md5 deleted file mode 100644 index 472a819..0000000 --- a/docs/html/class_reml_hca__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index e7b4a9a..0000000 Binary files a/docs/html/class_reml_hca__coll__graph.png and /dev/null differ diff --git a/docs/html/class_reml_hca__inherit__graph.map b/docs/html/class_reml_hca__inherit__graph.map deleted file mode 100644 index 592a475..0000000 --- a/docs/html/class_reml_hca__inherit__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/class_reml_hca__inherit__graph.md5 b/docs/html/class_reml_hca__inherit__graph.md5 deleted file mode 100644 index e51f867..0000000 --- a/docs/html/class_reml_hca__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index e7b4a9a..0000000 Binary files a/docs/html/class_reml_hca__inherit__graph.png and /dev/null differ diff --git a/docs/html/class_scorer-members.html b/docs/html/class_scorer-members.html deleted file mode 100644 index 137fb2a..0000000 --- a/docs/html/class_scorer-members.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index c684236..0000000 --- a/docs/html/class_scorer.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 24d19e0..0000000 --- a/docs/html/class_scorer.js +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index 37d75ed..0000000 --- a/docs/html/class_scorer__coll__graph.map +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/docs/html/class_scorer__coll__graph.md5 b/docs/html/class_scorer__coll__graph.md5 deleted file mode 100644 index cbbb579..0000000 --- a/docs/html/class_scorer__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index a7e9c8b..0000000 Binary files a/docs/html/class_scorer__coll__graph.png and /dev/null differ diff --git a/docs/html/class_snp_kinship-members.html b/docs/html/class_snp_kinship-members.html deleted file mode 100644 index dabff97..0000000 --- a/docs/html/class_snp_kinship-members.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index b4b2155..0000000 --- a/docs/html/class_snp_kinship.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index a852ca1..0000000 --- a/docs/html/class_snp_kinship.js +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index fe745c5..0000000 --- a/docs/html/class_snp_kinship__coll__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/class_snp_kinship__coll__graph.md5 b/docs/html/class_snp_kinship__coll__graph.md5 deleted file mode 100644 index d45e872..0000000 --- a/docs/html/class_snp_kinship__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index d08d3fa..0000000 Binary files a/docs/html/class_snp_kinship__coll__graph.png and /dev/null differ diff --git a/docs/html/class_snp_kinship__inherit__graph.map b/docs/html/class_snp_kinship__inherit__graph.map deleted file mode 100644 index fe745c5..0000000 --- a/docs/html/class_snp_kinship__inherit__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/class_snp_kinship__inherit__graph.md5 b/docs/html/class_snp_kinship__inherit__graph.md5 deleted file mode 100644 index b1877c1..0000000 --- a/docs/html/class_snp_kinship__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index d08d3fa..0000000 Binary files a/docs/html/class_snp_kinship__inherit__graph.png and /dev/null differ diff --git a/docs/html/class_util-members.html b/docs/html/class_util-members.html deleted file mode 100644 index 0188da9..0000000 --- a/docs/html/class_util-members.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index fbe867a..0000000 --- a/docs/html/class_util.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 19415a9..0000000 --- a/docs/html/class_util__coll__graph.map +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/docs/html/class_util__coll__graph.md5 b/docs/html/class_util__coll__graph.md5 deleted file mode 100644 index c5daf41..0000000 --- a/docs/html/class_util__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 3d4c4bd..0000000 Binary files a/docs/html/class_util__coll__graph.png and /dev/null differ diff --git a/docs/html/classes.html b/docs/html/classes.html deleted file mode 100644 index 3dcfdf2..0000000 --- a/docs/html/classes.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 98cc2c9..0000000 Binary files a/docs/html/closed.png and /dev/null differ diff --git a/docs/html/dir_5a38eadd9c55c6fb727a5803bb09c43f.html b/docs/html/dir_5a38eadd9c55c6fb727a5803bb09c43f.html deleted file mode 100644 index 27a20ae..0000000 --- a/docs/html/dir_5a38eadd9c55c6fb727a5803bb09c43f.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 8df9809..0000000 --- a/docs/html/dir_5a38eadd9c55c6fb727a5803bb09c43f.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 62d9d5e..0000000 --- a/docs/html/dir_60a4da173fca05b90d61823adfb03c66.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -HCA: /Users/danielruskin Directory Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
HCA -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
danielruskin Directory Reference
-
-
-
-
- - - - diff --git a/docs/html/dir_60a4da173fca05b90d61823adfb03c66.js b/docs/html/dir_60a4da173fca05b90d61823adfb03c66.js deleted file mode 100644 index 5c00015..0000000 --- a/docs/html/dir_60a4da173fca05b90d61823adfb03c66.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 8c9b54d..0000000 --- a/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -HCA: /Users/danielruskin/src Directory Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
HCA -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
src Directory Reference
-
-
-
-
- - - - diff --git a/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.js b/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.js deleted file mode 100644 index 4053b0e..0000000 --- a/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 66037db..0000000 --- a/docs/html/dir_8a990246551b69b640aea526aed19dbb.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 709e697..0000000 --- a/docs/html/dir_8a990246551b69b640aea526aed19dbb.js +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 3d4e942..0000000 --- a/docs/html/dir_95cb54157f2bc20483fe55d9ab58fd27.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index d9095d3..0000000 --- a/docs/html/dir_95cb54157f2bc20483fe55d9ab58fd27.js +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 6886d8b..0000000 --- a/docs/html/dir_b41b214f44b1d1e2573f3fffd563b69b.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 4c8794b..0000000 --- a/docs/html/dir_b41b214f44b1d1e2573f3fffd563b69b.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index dca9623..0000000 --- a/docs/html/dir_d522931ffa1371640980b621734a4381.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -HCA: /Users Directory Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
HCA -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Users Directory Reference
-
-
-
-
- - - - diff --git a/docs/html/dir_d522931ffa1371640980b621734a4381.js b/docs/html/dir_d522931ffa1371640980b621734a4381.js deleted file mode 100644 index 8369ae0..0000000 --- a/docs/html/dir_d522931ffa1371640980b621734a4381.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 67f8103..0000000 --- a/docs/html/dir_df4e26f2ffd11e56f607d6303fce6b11.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -HCA: /Users/danielruskin/src Directory Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
HCA -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
src Directory Reference
-
-
-
-
- - - - diff --git a/docs/html/dir_df4e26f2ffd11e56f607d6303fce6b11.js b/docs/html/dir_df4e26f2ffd11e56f607d6303fce6b11.js deleted file mode 100644 index f38414d..0000000 --- a/docs/html/dir_df4e26f2ffd11e56f607d6303fce6b11.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 17edabf..0000000 Binary files a/docs/html/doc.png and /dev/null differ diff --git a/docs/html/doxygen.css b/docs/html/doxygen.css deleted file mode 100644 index 4f1ab91..0000000 --- a/docs/html/doxygen.css +++ /dev/null @@ -1,1596 +0,0 @@ -/* 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 deleted file mode 100644 index 3ff17d8..0000000 Binary files a/docs/html/doxygen.png and /dev/null differ diff --git a/docs/html/dynsections.js b/docs/html/dynsections.js deleted file mode 100644 index 85e1836..0000000 --- a/docs/html/dynsections.js +++ /dev/null @@ -1,97 +0,0 @@ -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 deleted file mode 100644 index 04b0a8e..0000000 --- a/docs/html/files.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index bb8ab35..0000000 Binary files a/docs/html/folderclosed.png and /dev/null differ diff --git a/docs/html/folderopen.png b/docs/html/folderopen.png deleted file mode 100644 index d6c7f67..0000000 Binary files a/docs/html/folderopen.png and /dev/null differ diff --git a/docs/html/functions.html b/docs/html/functions.html deleted file mode 100644 index ffa43df..0000000 --- a/docs/html/functions.html +++ /dev/null @@ -1,405 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 0e6e9d3..0000000 --- a/docs/html/functions_func.html +++ /dev/null @@ -1,405 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 09c674f..0000000 --- a/docs/html/functions_vars.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - -HCA: Class Members - Variables - - - - - - - - - - - - - - -
-
- - - - - - -
-
HCA -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
- - - - diff --git a/docs/html/globals.html b/docs/html/globals.html deleted file mode 100644 index b176eef..0000000 --- a/docs/html/globals.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 1946200..0000000 --- a/docs/html/globals_func.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -HCA: File Members - - - - - - - - - - - - - - -
-
- - - - - - -
-
HCA -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
- - - - diff --git a/docs/html/graph_legend.html b/docs/html/graph_legend.html deleted file mode 100644 index 314a717..0000000 --- a/docs/html/graph_legend.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index a06ed05..0000000 --- a/docs/html/graph_legend.md5 +++ /dev/null @@ -1 +0,0 @@ -387ff8eb65306fa251338d3c9bd7bfff \ No newline at end of file diff --git a/docs/html/graph_legend.png b/docs/html/graph_legend.png deleted file mode 100644 index 961becb..0000000 Binary files a/docs/html/graph_legend.png and /dev/null differ diff --git a/docs/html/hierarchy.html b/docs/html/hierarchy.html deleted file mode 100644 index ec2d562..0000000 --- a/docs/html/hierarchy.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 5c71c9c..0000000 --- a/docs/html/hierarchy.js +++ /dev/null @@ -1,19 +0,0 @@ -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 deleted file mode 100644 index 343f900..0000000 --- a/docs/html/index.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 4ec1617..0000000 --- a/docs/html/inherit_graph_0.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/inherit_graph_0.md5 b/docs/html/inherit_graph_0.md5 deleted file mode 100644 index eeaa2fb..0000000 --- a/docs/html/inherit_graph_0.md5 +++ /dev/null @@ -1 +0,0 @@ -be93114714ba50836f8cb458dd526b9c \ No newline at end of file diff --git a/docs/html/inherit_graph_0.png b/docs/html/inherit_graph_0.png deleted file mode 100644 index 389d1a5..0000000 Binary files a/docs/html/inherit_graph_0.png and /dev/null differ diff --git a/docs/html/inherit_graph_1.map b/docs/html/inherit_graph_1.map deleted file mode 100644 index edfbb48..0000000 --- a/docs/html/inherit_graph_1.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/inherit_graph_1.md5 b/docs/html/inherit_graph_1.md5 deleted file mode 100644 index 7411c22..0000000 --- a/docs/html/inherit_graph_1.md5 +++ /dev/null @@ -1 +0,0 @@ -5edee1f3edeb2854741f7703ea6e4ac4 \ No newline at end of file diff --git a/docs/html/inherit_graph_1.png b/docs/html/inherit_graph_1.png deleted file mode 100644 index af06dbb..0000000 Binary files a/docs/html/inherit_graph_1.png and /dev/null differ diff --git a/docs/html/inherit_graph_2.map b/docs/html/inherit_graph_2.map deleted file mode 100644 index 7abb7b5..0000000 --- a/docs/html/inherit_graph_2.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/inherit_graph_2.md5 b/docs/html/inherit_graph_2.md5 deleted file mode 100644 index c5717e6..0000000 --- a/docs/html/inherit_graph_2.md5 +++ /dev/null @@ -1 +0,0 @@ -3b99b712cb6795bc95012cb8e95316f6 \ No newline at end of file diff --git a/docs/html/inherit_graph_2.png b/docs/html/inherit_graph_2.png deleted file mode 100644 index e94fe59..0000000 Binary files a/docs/html/inherit_graph_2.png and /dev/null differ diff --git a/docs/html/inherit_graph_3.map b/docs/html/inherit_graph_3.map deleted file mode 100644 index 332e627..0000000 --- a/docs/html/inherit_graph_3.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/inherit_graph_3.md5 b/docs/html/inherit_graph_3.md5 deleted file mode 100644 index f7b6e09..0000000 --- a/docs/html/inherit_graph_3.md5 +++ /dev/null @@ -1 +0,0 @@ -3895cc40c7d113606add205f81ae4132 \ No newline at end of file diff --git a/docs/html/inherit_graph_3.png b/docs/html/inherit_graph_3.png deleted file mode 100644 index 1161168..0000000 Binary files a/docs/html/inherit_graph_3.png and /dev/null differ diff --git a/docs/html/inherit_graph_4.map b/docs/html/inherit_graph_4.map deleted file mode 100644 index 5aa5ee8..0000000 --- a/docs/html/inherit_graph_4.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/inherit_graph_4.md5 b/docs/html/inherit_graph_4.md5 deleted file mode 100644 index b25537e..0000000 --- a/docs/html/inherit_graph_4.md5 +++ /dev/null @@ -1 +0,0 @@ -465120da869fcdb363f299aef8a5cb74 \ No newline at end of file diff --git a/docs/html/inherit_graph_4.png b/docs/html/inherit_graph_4.png deleted file mode 100644 index ba7408b..0000000 Binary files a/docs/html/inherit_graph_4.png and /dev/null differ diff --git a/docs/html/inherit_graph_5.map b/docs/html/inherit_graph_5.map deleted file mode 100644 index 51a6e77..0000000 --- a/docs/html/inherit_graph_5.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/docs/html/inherit_graph_5.md5 b/docs/html/inherit_graph_5.md5 deleted file mode 100644 index a3bdfc0..0000000 --- a/docs/html/inherit_graph_5.md5 +++ /dev/null @@ -1 +0,0 @@ -12c10b3fe03f6c93869ee6cb9b77e8f0 \ No newline at end of file diff --git a/docs/html/inherit_graph_5.png b/docs/html/inherit_graph_5.png deleted file mode 100644 index 0e7d521..0000000 Binary files a/docs/html/inherit_graph_5.png and /dev/null differ diff --git a/docs/html/inherit_graph_6.map b/docs/html/inherit_graph_6.map deleted file mode 100644 index ed71bbc..0000000 --- a/docs/html/inherit_graph_6.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/inherit_graph_6.md5 b/docs/html/inherit_graph_6.md5 deleted file mode 100644 index 71565e4..0000000 --- a/docs/html/inherit_graph_6.md5 +++ /dev/null @@ -1 +0,0 @@ -864eabf910c199ad9ffba784423d81d9 \ No newline at end of file diff --git a/docs/html/inherit_graph_6.png b/docs/html/inherit_graph_6.png deleted file mode 100644 index 260a8dc..0000000 Binary files a/docs/html/inherit_graph_6.png and /dev/null differ diff --git a/docs/html/inherit_graph_7.map b/docs/html/inherit_graph_7.map deleted file mode 100644 index da3c614..0000000 --- a/docs/html/inherit_graph_7.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/inherit_graph_7.md5 b/docs/html/inherit_graph_7.md5 deleted file mode 100644 index d223e3b..0000000 --- a/docs/html/inherit_graph_7.md5 +++ /dev/null @@ -1 +0,0 @@ -f97a1339ff3cacabb775ac7166adbd24 \ No newline at end of file diff --git a/docs/html/inherit_graph_7.png b/docs/html/inherit_graph_7.png deleted file mode 100644 index c0588e1..0000000 Binary files a/docs/html/inherit_graph_7.png and /dev/null differ diff --git a/docs/html/inherit_graph_8.map b/docs/html/inherit_graph_8.map deleted file mode 100644 index 796adff..0000000 --- a/docs/html/inherit_graph_8.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/inherit_graph_8.md5 b/docs/html/inherit_graph_8.md5 deleted file mode 100644 index e820ef7..0000000 --- a/docs/html/inherit_graph_8.md5 +++ /dev/null @@ -1 +0,0 @@ -dc6e4346aad89201737e7898b7774ea5 \ No newline at end of file diff --git a/docs/html/inherit_graph_8.png b/docs/html/inherit_graph_8.png deleted file mode 100644 index dd5c0e5..0000000 Binary files a/docs/html/inherit_graph_8.png and /dev/null differ diff --git a/docs/html/inherits.html b/docs/html/inherits.html deleted file mode 100644 index b702d0c..0000000 --- a/docs/html/inherits.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - -HCA: Class Hierarchy - - - - - - - - - - - - - - -
-
- - - - - - -
-
HCA -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Class Hierarchy
-
-
- - - - - - - - - - -
- - - -
- - - - -
- - - - -
- - - -
- - - -
- - - - - -
- - - -
- - - -
- - - -
-
-
- - - - diff --git a/docs/html/jquery.js b/docs/html/jquery.js deleted file mode 100644 index f5343ed..0000000 --- a/docs/html/jquery.js +++ /dev/null @@ -1,87 +0,0 @@ -/*! - * 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 deleted file mode 100644 index 89e321a..0000000 --- a/docs/html/main_8cpp.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 3e4e884..0000000 --- a/docs/html/main_8cpp__incl.map +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/docs/html/main_8cpp__incl.md5 b/docs/html/main_8cpp__incl.md5 deleted file mode 100644 index f5e00b2..0000000 --- a/docs/html/main_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -d074496a104bcb33b4d2ccf8f60b1369 \ No newline at end of file diff --git a/docs/html/main_8cpp__incl.png b/docs/html/main_8cpp__incl.png deleted file mode 100644 index a8da070..0000000 Binary files a/docs/html/main_8cpp__incl.png and /dev/null 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 deleted file mode 100644 index 79edf58..0000000 --- a/docs/html/md___users_danielruskin_src_hca-dev__r_e_a_d_m_e.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 97db4c2..0000000 --- a/docs/html/menu.js +++ /dev/null @@ -1,26 +0,0 @@ -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 deleted file mode 100644 index 43d7624..0000000 --- a/docs/html/menudata.js +++ /dev/null @@ -1,37 +0,0 @@ -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 deleted file mode 100644 index 72a58a5..0000000 Binary files a/docs/html/nav_f.png and /dev/null differ diff --git a/docs/html/nav_g.png b/docs/html/nav_g.png deleted file mode 100644 index 2093a23..0000000 Binary files a/docs/html/nav_g.png and /dev/null differ diff --git a/docs/html/nav_h.png b/docs/html/nav_h.png deleted file mode 100644 index 33389b1..0000000 Binary files a/docs/html/nav_h.png and /dev/null differ diff --git a/docs/html/navtree.css b/docs/html/navtree.css deleted file mode 100644 index 0cc7e77..0000000 --- a/docs/html/navtree.css +++ /dev/null @@ -1,146 +0,0 @@ -#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 deleted file mode 100644 index e6d31b0..0000000 --- a/docs/html/navtree.js +++ /dev/null @@ -1,517 +0,0 @@ -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 deleted file mode 100644 index 56e4a02..0000000 --- a/docs/html/resize.js +++ /dev/null @@ -1,114 +0,0 @@ -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 deleted file mode 100644 index f25360b..0000000 --- a/docs/html/search/all_0.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_0.js b/docs/html/search/all_0.js deleted file mode 100644 index c5e0f87..0000000 --- a/docs/html/search/all_0.js +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index b13f0f7..0000000 --- a/docs/html/search/all_1.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_1.js b/docs/html/search/all_1.js deleted file mode 100644 index 6c52044..0000000 --- a/docs/html/search/all_1.js +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index 9543c57..0000000 --- a/docs/html/search/all_2.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_2.js b/docs/html/search/all_2.js deleted file mode 100644 index e7d7608..0000000 --- a/docs/html/search/all_2.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 03405c0..0000000 --- a/docs/html/search/all_3.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_3.js b/docs/html/search/all_3.js deleted file mode 100644 index 2af6744..0000000 --- a/docs/html/search/all_3.js +++ /dev/null @@ -1,48 +0,0 @@ -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 deleted file mode 100644 index 8e1f4b9..0000000 --- a/docs/html/search/all_4.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_4.js b/docs/html/search/all_4.js deleted file mode 100644 index 9802be8..0000000 --- a/docs/html/search/all_4.js +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index 89a879e..0000000 --- a/docs/html/search/all_5.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_5.js b/docs/html/search/all_5.js deleted file mode 100644 index 899b123..0000000 --- a/docs/html/search/all_5.js +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index 6afac06..0000000 --- a/docs/html/search/all_6.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_6.js b/docs/html/search/all_6.js deleted file mode 100644 index 7289cc9..0000000 --- a/docs/html/search/all_6.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index de19107..0000000 --- a/docs/html/search/all_7.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_7.js b/docs/html/search/all_7.js deleted file mode 100644 index be3128d..0000000 --- a/docs/html/search/all_7.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 11e27cd..0000000 --- a/docs/html/search/all_8.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_8.js b/docs/html/search/all_8.js deleted file mode 100644 index b5822c6..0000000 --- a/docs/html/search/all_8.js +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index f8abbbe..0000000 --- a/docs/html/search/all_9.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_9.js b/docs/html/search/all_9.js deleted file mode 100644 index cdd8564..0000000 --- a/docs/html/search/all_9.js +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index 9601fce..0000000 --- a/docs/html/search/all_a.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_a.js b/docs/html/search/all_a.js deleted file mode 100644 index c77d610..0000000 --- a/docs/html/search/all_a.js +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index 0814e4e..0000000 --- a/docs/html/search/all_b.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_b.js b/docs/html/search/all_b.js deleted file mode 100644 index a05e76d..0000000 --- a/docs/html/search/all_b.js +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index da08c38..0000000 --- a/docs/html/search/all_c.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_c.js b/docs/html/search/all_c.js deleted file mode 100644 index 9a505c0..0000000 --- a/docs/html/search/all_c.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 9986c9c..0000000 --- a/docs/html/search/all_d.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_d.js b/docs/html/search/all_d.js deleted file mode 100644 index 95f0daf..0000000 --- a/docs/html/search/all_d.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['util',['Util',['../class_util.html',1,'']]] -]; diff --git a/docs/html/search/all_e.html b/docs/html/search/all_e.html deleted file mode 100644 index 9fa42bb..0000000 --- a/docs/html/search/all_e.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_e.js b/docs/html/search/all_e.js deleted file mode 100644 index 53fede7..0000000 --- a/docs/html/search/all_e.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 1c3e406..0000000 --- a/docs/html/search/classes_0.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/classes_0.js b/docs/html/search/classes_0.js deleted file mode 100644 index d15429d..0000000 --- a/docs/html/search/classes_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['data',['Data',['../class_data.html',1,'']]] -]; diff --git a/docs/html/search/classes_1.html b/docs/html/search/classes_1.html deleted file mode 100644 index a8e7069..0000000 --- a/docs/html/search/classes_1.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/classes_1.js b/docs/html/search/classes_1.js deleted file mode 100644 index 658c525..0000000 --- a/docs/html/search/classes_1.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 5c09c96..0000000 --- a/docs/html/search/classes_2.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/classes_2.js b/docs/html/search/classes_2.js deleted file mode 100644 index 1aa9830..0000000 --- a/docs/html/search/classes_2.js +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 5faaeba..0000000 --- a/docs/html/search/classes_3.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/classes_3.js b/docs/html/search/classes_3.js deleted file mode 100644 index a938259..0000000 --- a/docs/html/search/classes_3.js +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index b3f11bc..0000000 --- a/docs/html/search/classes_4.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/classes_4.js b/docs/html/search/classes_4.js deleted file mode 100644 index b5a6239..0000000 --- a/docs/html/search/classes_4.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['kinship',['Kinship',['../class_kinship.html',1,'']]] -]; diff --git a/docs/html/search/classes_5.html b/docs/html/search/classes_5.html deleted file mode 100644 index 952ace6..0000000 --- a/docs/html/search/classes_5.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/classes_5.js b/docs/html/search/classes_5.js deleted file mode 100644 index bb01fa7..0000000 --- a/docs/html/search/classes_5.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['option',['Option',['../class_option.html',1,'']]] -]; diff --git a/docs/html/search/classes_6.html b/docs/html/search/classes_6.html deleted file mode 100644 index 75eef9f..0000000 --- a/docs/html/search/classes_6.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/classes_6.js b/docs/html/search/classes_6.js deleted file mode 100644 index 6cc0fb0..0000000 --- a/docs/html/search/classes_6.js +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 745f5f2..0000000 --- a/docs/html/search/classes_7.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/classes_7.js b/docs/html/search/classes_7.js deleted file mode 100644 index a7fe84b..0000000 --- a/docs/html/search/classes_7.js +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 5a443d9..0000000 --- a/docs/html/search/classes_8.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/classes_8.js b/docs/html/search/classes_8.js deleted file mode 100644 index 95f0daf..0000000 --- a/docs/html/search/classes_8.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['util',['Util',['../class_util.html',1,'']]] -]; diff --git a/docs/html/search/close.png b/docs/html/search/close.png deleted file mode 100644 index 9342d3d..0000000 Binary files a/docs/html/search/close.png and /dev/null differ diff --git a/docs/html/search/files_0.html b/docs/html/search/files_0.html deleted file mode 100644 index 4f272b8..0000000 --- a/docs/html/search/files_0.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/files_0.js b/docs/html/search/files_0.js deleted file mode 100644 index 8bc75af..0000000 --- a/docs/html/search/files_0.js +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index dcce422..0000000 --- a/docs/html/search/files_1.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/files_1.js b/docs/html/search/files_1.js deleted file mode 100644 index ca34f08..0000000 --- a/docs/html/search/files_1.js +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index d5c6c3b..0000000 --- a/docs/html/search/files_2.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/files_2.js b/docs/html/search/files_2.js deleted file mode 100644 index 68e22bd..0000000 --- a/docs/html/search/files_2.js +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index d5a9528..0000000 --- a/docs/html/search/files_3.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/files_3.js b/docs/html/search/files_3.js deleted file mode 100644 index d0741e3..0000000 --- a/docs/html/search/files_3.js +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 7b4c42a..0000000 --- a/docs/html/search/files_4.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/files_4.js b/docs/html/search/files_4.js deleted file mode 100644 index c93faff..0000000 --- a/docs/html/search/files_4.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 1f77bb1..0000000 --- a/docs/html/search/files_5.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/files_5.js b/docs/html/search/files_5.js deleted file mode 100644 index 5cc0034..0000000 --- a/docs/html/search/files_5.js +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 7573254..0000000 --- a/docs/html/search/files_6.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/files_6.js b/docs/html/search/files_6.js deleted file mode 100644 index 9e04783..0000000 --- a/docs/html/search/files_6.js +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index 214b329..0000000 --- a/docs/html/search/files_7.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/files_7.js b/docs/html/search/files_7.js deleted file mode 100644 index 17030dd..0000000 --- a/docs/html/search/files_7.js +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index 6720c7c..0000000 --- a/docs/html/search/files_8.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/files_8.js b/docs/html/search/files_8.js deleted file mode 100644 index 6b9e13d..0000000 --- a/docs/html/search/files_8.js +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 4e6d87d..0000000 --- a/docs/html/search/functions_0.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_0.js b/docs/html/search/functions_0.js deleted file mode 100644 index c5e0f87..0000000 --- a/docs/html/search/functions_0.js +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index b343e2d..0000000 --- a/docs/html/search/functions_1.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_1.js b/docs/html/search/functions_1.js deleted file mode 100644 index 6c52044..0000000 --- a/docs/html/search/functions_1.js +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index ecce2f3..0000000 --- a/docs/html/search/functions_2.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_2.js b/docs/html/search/functions_2.js deleted file mode 100644 index bdd78a2..0000000 --- a/docs/html/search/functions_2.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 15f06ab..0000000 --- a/docs/html/search/functions_3.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_3.js b/docs/html/search/functions_3.js deleted file mode 100644 index a958467..0000000 --- a/docs/html/search/functions_3.js +++ /dev/null @@ -1,47 +0,0 @@ -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 deleted file mode 100644 index 8985ff2..0000000 --- a/docs/html/search/functions_4.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_4.js b/docs/html/search/functions_4.js deleted file mode 100644 index 33d83c1..0000000 --- a/docs/html/search/functions_4.js +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 0314918..0000000 --- a/docs/html/search/functions_5.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_5.js b/docs/html/search/functions_5.js deleted file mode 100644 index 0433b06..0000000 --- a/docs/html/search/functions_5.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index c506123..0000000 --- a/docs/html/search/functions_6.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_6.js b/docs/html/search/functions_6.js deleted file mode 100644 index be3128d..0000000 --- a/docs/html/search/functions_6.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 83a7b84..0000000 --- a/docs/html/search/functions_7.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_7.js b/docs/html/search/functions_7.js deleted file mode 100644 index 5d4d7bb..0000000 --- a/docs/html/search/functions_7.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index b55f0e6..0000000 --- a/docs/html/search/functions_8.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_8.js b/docs/html/search/functions_8.js deleted file mode 100644 index cdd8564..0000000 --- a/docs/html/search/functions_8.js +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index c73f07b..0000000 --- a/docs/html/search/functions_9.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_9.js b/docs/html/search/functions_9.js deleted file mode 100644 index af78324..0000000 --- a/docs/html/search/functions_9.js +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index f10ad63..0000000 --- a/docs/html/search/functions_a.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_a.js b/docs/html/search/functions_a.js deleted file mode 100644 index de74b81..0000000 --- a/docs/html/search/functions_a.js +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 172ea1b..0000000 --- a/docs/html/search/functions_b.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_b.js b/docs/html/search/functions_b.js deleted file mode 100644 index 9a505c0..0000000 --- a/docs/html/search/functions_b.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 99492ba..0000000 --- a/docs/html/search/functions_c.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_c.js b/docs/html/search/functions_c.js deleted file mode 100644 index 53fede7..0000000 --- a/docs/html/search/functions_c.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 81f6040..0000000 Binary files a/docs/html/search/mag_sel.png and /dev/null differ diff --git a/docs/html/search/nomatches.html b/docs/html/search/nomatches.html deleted file mode 100644 index b1ded27..0000000 --- a/docs/html/search/nomatches.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - -
    -
    No Matches
    -
    - - diff --git a/docs/html/search/pages_0.html b/docs/html/search/pages_0.html deleted file mode 100644 index 4955b9e..0000000 --- a/docs/html/search/pages_0.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/pages_0.js b/docs/html/search/pages_0.js deleted file mode 100644 index 122c032..0000000 --- a/docs/html/search/pages_0.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 3cf9df9..0000000 --- a/docs/html/search/search.css +++ /dev/null @@ -1,271 +0,0 @@ -/*---------------- 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 deleted file mode 100644 index dedce3b..0000000 --- a/docs/html/search/search.js +++ /dev/null @@ -1,791 +0,0 @@ -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 deleted file mode 100644 index 845021f..0000000 --- a/docs/html/search/variables_0.js +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 84237b6..0000000 --- a/docs/html/search/variables_1.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/variables_1.js b/docs/html/search/variables_1.js deleted file mode 100644 index c2b6ccc..0000000 --- a/docs/html/search/variables_1.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 5c9de1a..0000000 --- a/docs/html/search/variables_2.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/variables_2.js b/docs/html/search/variables_2.js deleted file mode 100644 index 79ecd07..0000000 --- a/docs/html/search/variables_2.js +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index f95e34c..0000000 --- a/docs/html/search/variables_3.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/variables_3.js b/docs/html/search/variables_3.js deleted file mode 100644 index bd60a5a..0000000 --- a/docs/html/search/variables_3.js +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index d7db285..0000000 --- a/docs/html/search/variables_4.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/variables_4.js b/docs/html/search/variables_4.js deleted file mode 100644 index c9f2737..0000000 --- a/docs/html/search/variables_4.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['trait',['trait',['../class_data.html#a7996ee33b569fc2f67568ec04c16158c',1,'Data']]] -]; diff --git a/docs/html/splitbar.png b/docs/html/splitbar.png deleted file mode 100644 index fe895f2..0000000 Binary files a/docs/html/splitbar.png and /dev/null differ diff --git a/docs/html/sync_off.png b/docs/html/sync_off.png deleted file mode 100644 index 3b443fc..0000000 Binary files a/docs/html/sync_off.png and /dev/null differ diff --git a/docs/html/sync_on.png b/docs/html/sync_on.png deleted file mode 100644 index e08320f..0000000 Binary files a/docs/html/sync_on.png and /dev/null differ diff --git a/docs/html/tab_a.png b/docs/html/tab_a.png deleted file mode 100644 index 3b725c4..0000000 Binary files a/docs/html/tab_a.png and /dev/null differ diff --git a/docs/html/tab_b.png b/docs/html/tab_b.png deleted file mode 100644 index e2b4a86..0000000 Binary files a/docs/html/tab_b.png and /dev/null differ diff --git a/docs/html/tab_h.png b/docs/html/tab_h.png deleted file mode 100644 index fd5cb70..0000000 Binary files a/docs/html/tab_h.png and /dev/null differ diff --git a/docs/html/tab_s.png b/docs/html/tab_s.png deleted file mode 100644 index ab478c9..0000000 Binary files a/docs/html/tab_s.png and /dev/null differ diff --git a/docs/html/tabs.css b/docs/html/tabs.css deleted file mode 100644 index a28614b..0000000 --- a/docs/html/tabs.css +++ /dev/null @@ -1 +0,0 @@ -.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 deleted file mode 100644 index 013cde5..0000000 --- a/docs/html/util_8cpp.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 06397d0..0000000 --- a/docs/html/util_8cpp__incl.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/util_8cpp__incl.md5 b/docs/html/util_8cpp__incl.md5 deleted file mode 100644 index 4c7a1ae..0000000 --- a/docs/html/util_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -c25ebc42b7067b9393a8f4f7368aabb9 \ No newline at end of file diff --git a/docs/html/util_8cpp__incl.png b/docs/html/util_8cpp__incl.png deleted file mode 100644 index 16c184f..0000000 Binary files a/docs/html/util_8cpp__incl.png and /dev/null differ diff --git a/docs/html/util_8h.html b/docs/html/util_8h.html deleted file mode 100644 index e81023b..0000000 --- a/docs/html/util_8h.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 882adb4..0000000 --- a/docs/html/util_8h__dep__incl.map +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/docs/html/util_8h__dep__incl.md5 b/docs/html/util_8h__dep__incl.md5 deleted file mode 100644 index 9c10c43..0000000 --- a/docs/html/util_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index a9194b4..0000000 Binary files a/docs/html/util_8h__dep__incl.png and /dev/null differ diff --git a/docs/html/util_8h__incl.map b/docs/html/util_8h__incl.map deleted file mode 100644 index 366c53f..0000000 --- a/docs/html/util_8h__incl.map +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/docs/html/util_8h__incl.md5 b/docs/html/util_8h__incl.md5 deleted file mode 100644 index c4f29b0..0000000 --- a/docs/html/util_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -50c7fa9c017f352f6a257671b96051c8 \ No newline at end of file diff --git a/docs/html/util_8h__incl.png b/docs/html/util_8h__incl.png deleted file mode 100644 index 1cb2bf8..0000000 Binary files a/docs/html/util_8h__incl.png and /dev/null differ diff --git a/docs/html/util_8h_source.html b/docs/html/util_8h_source.html deleted file mode 100644 index 86c3550..0000000 --- a/docs/html/util_8h_source.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -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 deleted file mode 100644 index 8cc3866..0000000 --- a/docs/latex/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index c56c2c0..0000000 --- a/docs/latex/_data_8cpp.tex +++ /dev/null @@ -1,16 +0,0 @@ -\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 deleted file mode 100644 index 3983ba3..0000000 --- a/docs/latex/_data_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -6175098855a53a3dfbc8879ceb26094a \ No newline at end of file diff --git a/docs/latex/_data_8cpp__incl.pdf b/docs/latex/_data_8cpp__incl.pdf deleted file mode 100644 index 2ff3f98..0000000 Binary files a/docs/latex/_data_8cpp__incl.pdf and /dev/null differ diff --git a/docs/latex/_data_8h.tex b/docs/latex/_data_8h.tex deleted file mode 100644 index df77b37..0000000 --- a/docs/latex/_data_8h.tex +++ /dev/null @@ -1,32 +0,0 @@ -\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 deleted file mode 100644 index dcca380..0000000 --- a/docs/latex/_data_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index adcc59c..0000000 Binary files a/docs/latex/_data_8h__dep__incl.pdf and /dev/null differ diff --git a/docs/latex/_data_8h__incl.md5 b/docs/latex/_data_8h__incl.md5 deleted file mode 100644 index c919643..0000000 --- a/docs/latex/_data_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -48b0608519da00a54566a593bf9eae1a \ No newline at end of file diff --git a/docs/latex/_data_8h__incl.pdf b/docs/latex/_data_8h__incl.pdf deleted file mode 100644 index 91657c5..0000000 Binary files a/docs/latex/_data_8h__incl.pdf and /dev/null differ diff --git a/docs/latex/_given_kinship_8cpp.tex b/docs/latex/_given_kinship_8cpp.tex deleted file mode 100644 index 3bcd5c0..0000000 --- a/docs/latex/_given_kinship_8cpp.tex +++ /dev/null @@ -1,11 +0,0 @@ -\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 deleted file mode 100644 index 892602b..0000000 --- a/docs/latex/_given_kinship_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 8315524..0000000 Binary files a/docs/latex/_given_kinship_8cpp__incl.pdf and /dev/null differ diff --git a/docs/latex/_given_kinship_8h.tex b/docs/latex/_given_kinship_8h.tex deleted file mode 100644 index b4947f0..0000000 --- a/docs/latex/_given_kinship_8h.tex +++ /dev/null @@ -1,27 +0,0 @@ -\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 deleted file mode 100644 index 40ce9f4..0000000 --- a/docs/latex/_given_kinship_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 020c55a..0000000 Binary files a/docs/latex/_given_kinship_8h__dep__incl.pdf and /dev/null differ diff --git a/docs/latex/_given_kinship_8h__incl.md5 b/docs/latex/_given_kinship_8h__incl.md5 deleted file mode 100644 index c2c35b1..0000000 --- a/docs/latex/_given_kinship_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 4beb698..0000000 Binary files a/docs/latex/_given_kinship_8h__incl.pdf and /dev/null differ diff --git a/docs/latex/_individual_data_8cpp.tex b/docs/latex/_individual_data_8cpp.tex deleted file mode 100644 index c29bc7d..0000000 --- a/docs/latex/_individual_data_8cpp.tex +++ /dev/null @@ -1,11 +0,0 @@ -\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 deleted file mode 100644 index 1e1994d..0000000 --- a/docs/latex/_individual_data_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 06f4cb0..0000000 Binary files a/docs/latex/_individual_data_8cpp__incl.pdf and /dev/null differ diff --git a/docs/latex/_individual_data_8h.tex b/docs/latex/_individual_data_8h.tex deleted file mode 100644 index bfbbf61..0000000 --- a/docs/latex/_individual_data_8h.tex +++ /dev/null @@ -1,26 +0,0 @@ -\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 deleted file mode 100644 index 88056ac..0000000 --- a/docs/latex/_individual_data_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 6ed8ee7..0000000 Binary files a/docs/latex/_individual_data_8h__dep__incl.pdf and /dev/null differ diff --git a/docs/latex/_individual_data_8h__incl.md5 b/docs/latex/_individual_data_8h__incl.md5 deleted file mode 100644 index 26e618b..0000000 --- a/docs/latex/_individual_data_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index f86635c..0000000 Binary files a/docs/latex/_individual_data_8h__incl.pdf and /dev/null differ diff --git a/docs/latex/_individual_data_set_8cpp.tex b/docs/latex/_individual_data_set_8cpp.tex deleted file mode 100644 index cfd1ca9..0000000 --- a/docs/latex/_individual_data_set_8cpp.tex +++ /dev/null @@ -1,11 +0,0 @@ -\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 deleted file mode 100644 index 40ab0af..0000000 --- a/docs/latex/_individual_data_set_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 768b999..0000000 Binary files a/docs/latex/_individual_data_set_8cpp__incl.pdf and /dev/null differ diff --git a/docs/latex/_individual_data_set_8h.tex b/docs/latex/_individual_data_set_8h.tex deleted file mode 100644 index 3e4753e..0000000 --- a/docs/latex/_individual_data_set_8h.tex +++ /dev/null @@ -1,29 +0,0 @@ -\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 deleted file mode 100644 index a3df94e..0000000 --- a/docs/latex/_individual_data_set_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index a78ab82..0000000 Binary files a/docs/latex/_individual_data_set_8h__dep__incl.pdf and /dev/null differ diff --git a/docs/latex/_individual_data_set_8h__incl.md5 b/docs/latex/_individual_data_set_8h__incl.md5 deleted file mode 100644 index 33cc2d4..0000000 --- a/docs/latex/_individual_data_set_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 243345f..0000000 Binary files a/docs/latex/_individual_data_set_8h__incl.pdf and /dev/null differ diff --git a/docs/latex/_kinship_8cpp.tex b/docs/latex/_kinship_8cpp.tex deleted file mode 100644 index e2320f2..0000000 --- a/docs/latex/_kinship_8cpp.tex +++ /dev/null @@ -1,12 +0,0 @@ -\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 deleted file mode 100644 index eb5b37d..0000000 --- a/docs/latex/_kinship_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -e7284b7dbecd748902bb225235ee65d4 \ No newline at end of file diff --git a/docs/latex/_kinship_8cpp__incl.pdf b/docs/latex/_kinship_8cpp__incl.pdf deleted file mode 100644 index 664c8fd..0000000 Binary files a/docs/latex/_kinship_8cpp__incl.pdf and /dev/null differ diff --git a/docs/latex/_kinship_8h.tex b/docs/latex/_kinship_8h.tex deleted file mode 100644 index 3b52150..0000000 --- a/docs/latex/_kinship_8h.tex +++ /dev/null @@ -1,28 +0,0 @@ -\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 deleted file mode 100644 index c8df820..0000000 --- a/docs/latex/_kinship_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index f68ea58..0000000 Binary files a/docs/latex/_kinship_8h__dep__incl.pdf and /dev/null differ diff --git a/docs/latex/_kinship_8h__incl.md5 b/docs/latex/_kinship_8h__incl.md5 deleted file mode 100644 index 60a4fbe..0000000 --- a/docs/latex/_kinship_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -c525dcd55593f2656b580a04901ae407 \ No newline at end of file diff --git a/docs/latex/_kinship_8h__incl.pdf b/docs/latex/_kinship_8h__incl.pdf deleted file mode 100644 index 304be11..0000000 Binary files a/docs/latex/_kinship_8h__incl.pdf and /dev/null differ diff --git a/docs/latex/_option_8cpp.tex b/docs/latex/_option_8cpp.tex deleted file mode 100644 index 28f0697..0000000 --- a/docs/latex/_option_8cpp.tex +++ /dev/null @@ -1,12 +0,0 @@ -\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 deleted file mode 100644 index 652ba10..0000000 --- a/docs/latex/_option_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -13a1d358f632a3c2d775fc6059122be9 \ No newline at end of file diff --git a/docs/latex/_option_8cpp__incl.pdf b/docs/latex/_option_8cpp__incl.pdf deleted file mode 100644 index 94c8e56..0000000 Binary files a/docs/latex/_option_8cpp__incl.pdf and /dev/null differ diff --git a/docs/latex/_option_8h.tex b/docs/latex/_option_8h.tex deleted file mode 100644 index ed1c7fe..0000000 --- a/docs/latex/_option_8h.tex +++ /dev/null @@ -1,26 +0,0 @@ -\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 deleted file mode 100644 index 52bc2d2..0000000 --- a/docs/latex/_option_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 7e37745..0000000 Binary files a/docs/latex/_option_8h__dep__incl.pdf and /dev/null differ diff --git a/docs/latex/_option_8h__incl.md5 b/docs/latex/_option_8h__incl.md5 deleted file mode 100644 index 8eba240..0000000 --- a/docs/latex/_option_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -82ad4effcc55d4a4440292e626d52c61 \ No newline at end of file diff --git a/docs/latex/_option_8h__incl.pdf b/docs/latex/_option_8h__incl.pdf deleted file mode 100644 index fa13d45..0000000 Binary files a/docs/latex/_option_8h__incl.pdf and /dev/null differ diff --git a/docs/latex/_reml_h2r_est_8cpp.tex b/docs/latex/_reml_h2r_est_8cpp.tex deleted file mode 100644 index e92386a..0000000 --- a/docs/latex/_reml_h2r_est_8cpp.tex +++ /dev/null @@ -1,11 +0,0 @@ -\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 deleted file mode 100644 index be86d85..0000000 --- a/docs/latex/_reml_h2r_est_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index f6d36b3..0000000 Binary files a/docs/latex/_reml_h2r_est_8cpp__incl.pdf and /dev/null differ diff --git a/docs/latex/_reml_h2r_est_8h.tex b/docs/latex/_reml_h2r_est_8h.tex deleted file mode 100644 index c59e737..0000000 --- a/docs/latex/_reml_h2r_est_8h.tex +++ /dev/null @@ -1,26 +0,0 @@ -\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 deleted file mode 100644 index 802835f..0000000 --- a/docs/latex/_reml_h2r_est_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index adca077..0000000 Binary files a/docs/latex/_reml_h2r_est_8h__dep__incl.pdf and /dev/null differ diff --git a/docs/latex/_reml_h2r_est_8h__incl.md5 b/docs/latex/_reml_h2r_est_8h__incl.md5 deleted file mode 100644 index 3be882b..0000000 --- a/docs/latex/_reml_h2r_est_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 73c9219..0000000 Binary files a/docs/latex/_reml_h2r_est_8h__incl.pdf and /dev/null differ diff --git a/docs/latex/_reml_hca_8cpp.tex b/docs/latex/_reml_hca_8cpp.tex deleted file mode 100644 index 50c0e9a..0000000 --- a/docs/latex/_reml_hca_8cpp.tex +++ /dev/null @@ -1,11 +0,0 @@ -\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 deleted file mode 100644 index a9adbca..0000000 --- a/docs/latex/_reml_hca_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 096abe6..0000000 Binary files a/docs/latex/_reml_hca_8cpp__incl.pdf and /dev/null differ diff --git a/docs/latex/_reml_hca_8h.tex b/docs/latex/_reml_hca_8h.tex deleted file mode 100644 index 5e5b083..0000000 --- a/docs/latex/_reml_hca_8h.tex +++ /dev/null @@ -1,28 +0,0 @@ -\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 deleted file mode 100644 index c9c5a26..0000000 --- a/docs/latex/_reml_hca_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 5a5fcc9..0000000 Binary files a/docs/latex/_reml_hca_8h__dep__incl.pdf and /dev/null differ diff --git a/docs/latex/_reml_hca_8h__incl.md5 b/docs/latex/_reml_hca_8h__incl.md5 deleted file mode 100644 index fdb8798..0000000 --- a/docs/latex/_reml_hca_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index d5202a7..0000000 Binary files a/docs/latex/_reml_hca_8h__incl.pdf and /dev/null differ diff --git a/docs/latex/_scorer_8cpp.tex b/docs/latex/_scorer_8cpp.tex deleted file mode 100644 index 11c05b2..0000000 --- a/docs/latex/_scorer_8cpp.tex +++ /dev/null @@ -1,11 +0,0 @@ -\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 deleted file mode 100644 index 08de577..0000000 --- a/docs/latex/_scorer_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -62e1f0b860c3696b6e40cbf5d4664f66 \ No newline at end of file diff --git a/docs/latex/_scorer_8cpp__incl.pdf b/docs/latex/_scorer_8cpp__incl.pdf deleted file mode 100644 index bcf6533..0000000 Binary files a/docs/latex/_scorer_8cpp__incl.pdf and /dev/null differ diff --git a/docs/latex/_scorer_8h.tex b/docs/latex/_scorer_8h.tex deleted file mode 100644 index 6897969..0000000 --- a/docs/latex/_scorer_8h.tex +++ /dev/null @@ -1,28 +0,0 @@ -\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 deleted file mode 100644 index 57e9d51..0000000 --- a/docs/latex/_scorer_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index f39b621..0000000 Binary files a/docs/latex/_scorer_8h__dep__incl.pdf and /dev/null differ diff --git a/docs/latex/_scorer_8h__incl.md5 b/docs/latex/_scorer_8h__incl.md5 deleted file mode 100644 index ae067d9..0000000 --- a/docs/latex/_scorer_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -8b95f9d19d38fd27cf8180aad6bd0dd8 \ No newline at end of file diff --git a/docs/latex/_scorer_8h__incl.pdf b/docs/latex/_scorer_8h__incl.pdf deleted file mode 100644 index d7cccc9..0000000 Binary files a/docs/latex/_scorer_8h__incl.pdf and /dev/null differ diff --git a/docs/latex/_snp_kinship_8cpp.tex b/docs/latex/_snp_kinship_8cpp.tex deleted file mode 100644 index 7359b89..0000000 --- a/docs/latex/_snp_kinship_8cpp.tex +++ /dev/null @@ -1,11 +0,0 @@ -\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 deleted file mode 100644 index 4f347ba..0000000 --- a/docs/latex/_snp_kinship_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index a94efdb..0000000 Binary files a/docs/latex/_snp_kinship_8cpp__incl.pdf and /dev/null differ diff --git a/docs/latex/_snp_kinship_8h.tex b/docs/latex/_snp_kinship_8h.tex deleted file mode 100644 index eb2e97a..0000000 --- a/docs/latex/_snp_kinship_8h.tex +++ /dev/null @@ -1,26 +0,0 @@ -\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 deleted file mode 100644 index 4725015..0000000 --- a/docs/latex/_snp_kinship_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 4406391..0000000 Binary files a/docs/latex/_snp_kinship_8h__dep__incl.pdf and /dev/null differ diff --git a/docs/latex/_snp_kinship_8h__incl.md5 b/docs/latex/_snp_kinship_8h__incl.md5 deleted file mode 100644 index 406266a..0000000 --- a/docs/latex/_snp_kinship_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 069e226..0000000 Binary files a/docs/latex/_snp_kinship_8h__incl.pdf and /dev/null differ diff --git a/docs/latex/annotated.tex b/docs/latex/annotated.tex deleted file mode 100644 index 9df925d..0000000 --- a/docs/latex/annotated.tex +++ /dev/null @@ -1,16 +0,0 @@ -\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 deleted file mode 100644 index a8a6c3a..0000000 --- a/docs/latex/class_data.tex +++ /dev/null @@ -1,82 +0,0 @@ -\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 deleted file mode 100644 index 9e7389b..0000000 --- a/docs/latex/class_data__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 6d8c18f..0000000 Binary files a/docs/latex/class_data__coll__graph.pdf and /dev/null differ diff --git a/docs/latex/class_given_kinship.tex b/docs/latex/class_given_kinship.tex deleted file mode 100644 index 15dcb02..0000000 --- a/docs/latex/class_given_kinship.tex +++ /dev/null @@ -1,47 +0,0 @@ -\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 deleted file mode 100644 index 664e581..0000000 --- a/docs/latex/class_given_kinship__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 3405225..0000000 Binary files a/docs/latex/class_given_kinship__coll__graph.pdf and /dev/null differ diff --git a/docs/latex/class_given_kinship__inherit__graph.md5 b/docs/latex/class_given_kinship__inherit__graph.md5 deleted file mode 100644 index f159ca5..0000000 --- a/docs/latex/class_given_kinship__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 3405225..0000000 Binary files a/docs/latex/class_given_kinship__inherit__graph.pdf and /dev/null differ diff --git a/docs/latex/class_h2r_est.tex b/docs/latex/class_h2r_est.tex deleted file mode 100644 index 19ca901..0000000 --- a/docs/latex/class_h2r_est.tex +++ /dev/null @@ -1,37 +0,0 @@ -\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 deleted file mode 100644 index 373da14..0000000 --- a/docs/latex/class_h2r_est__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 492bdf5..0000000 Binary files a/docs/latex/class_h2r_est__coll__graph.pdf and /dev/null differ diff --git a/docs/latex/class_h2r_est__inherit__graph.md5 b/docs/latex/class_h2r_est__inherit__graph.md5 deleted file mode 100644 index 90668b8..0000000 --- a/docs/latex/class_h2r_est__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 08d10a2..0000000 Binary files a/docs/latex/class_h2r_est__inherit__graph.pdf and /dev/null differ diff --git a/docs/latex/class_hca.tex b/docs/latex/class_hca.tex deleted file mode 100644 index 177acc5..0000000 --- a/docs/latex/class_hca.tex +++ /dev/null @@ -1,37 +0,0 @@ -\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 deleted file mode 100644 index 5b60e6f..0000000 --- a/docs/latex/class_hca__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 9199fc1..0000000 Binary files a/docs/latex/class_hca__coll__graph.pdf and /dev/null differ diff --git a/docs/latex/class_hca__inherit__graph.md5 b/docs/latex/class_hca__inherit__graph.md5 deleted file mode 100644 index 029a5e5..0000000 --- a/docs/latex/class_hca__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index f683295..0000000 Binary files a/docs/latex/class_hca__inherit__graph.pdf and /dev/null differ diff --git a/docs/latex/class_individual_data.tex b/docs/latex/class_individual_data.tex deleted file mode 100644 index c32e8cc..0000000 --- a/docs/latex/class_individual_data.tex +++ /dev/null @@ -1,91 +0,0 @@ -\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 deleted file mode 100644 index 5b419a8..0000000 --- a/docs/latex/class_individual_data__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 2246ebd..0000000 Binary files a/docs/latex/class_individual_data__coll__graph.pdf and /dev/null differ diff --git a/docs/latex/class_individual_data_set.tex b/docs/latex/class_individual_data_set.tex deleted file mode 100644 index d0a7d8e..0000000 --- a/docs/latex/class_individual_data_set.tex +++ /dev/null @@ -1,147 +0,0 @@ -\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 deleted file mode 100644 index 9615c92..0000000 --- a/docs/latex/class_individual_data_set__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 698c4e7..0000000 Binary files a/docs/latex/class_individual_data_set__coll__graph.pdf and /dev/null differ diff --git a/docs/latex/class_kinship.tex b/docs/latex/class_kinship.tex deleted file mode 100644 index 4a3fad1..0000000 --- a/docs/latex/class_kinship.tex +++ /dev/null @@ -1,77 +0,0 @@ -\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 deleted file mode 100644 index 6736837..0000000 --- a/docs/latex/class_kinship__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 4037473..0000000 Binary files a/docs/latex/class_kinship__coll__graph.pdf and /dev/null differ diff --git a/docs/latex/class_kinship__inherit__graph.md5 b/docs/latex/class_kinship__inherit__graph.md5 deleted file mode 100644 index 50a4535..0000000 --- a/docs/latex/class_kinship__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index dbae8de..0000000 Binary files a/docs/latex/class_kinship__inherit__graph.pdf and /dev/null differ diff --git a/docs/latex/class_option.tex b/docs/latex/class_option.tex deleted file mode 100644 index e340cc4..0000000 --- a/docs/latex/class_option.tex +++ /dev/null @@ -1,88 +0,0 @@ -\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 deleted file mode 100644 index b6d51e7..0000000 --- a/docs/latex/class_option__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index f323f5b..0000000 Binary files a/docs/latex/class_option__coll__graph.pdf and /dev/null differ diff --git a/docs/latex/class_reml_h2r_est.tex b/docs/latex/class_reml_h2r_est.tex deleted file mode 100644 index 3ee0b29..0000000 --- a/docs/latex/class_reml_h2r_est.tex +++ /dev/null @@ -1,67 +0,0 @@ -\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 deleted file mode 100644 index 3544761..0000000 --- a/docs/latex/class_reml_h2r_est__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index c240a4e..0000000 Binary files a/docs/latex/class_reml_h2r_est__coll__graph.pdf and /dev/null differ diff --git a/docs/latex/class_reml_h2r_est__inherit__graph.md5 b/docs/latex/class_reml_h2r_est__inherit__graph.md5 deleted file mode 100644 index a5c015e..0000000 --- a/docs/latex/class_reml_h2r_est__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 5effd4c..0000000 Binary files a/docs/latex/class_reml_h2r_est__inherit__graph.pdf and /dev/null differ diff --git a/docs/latex/class_reml_hca.tex b/docs/latex/class_reml_hca.tex deleted file mode 100644 index 7ea9991..0000000 --- a/docs/latex/class_reml_hca.tex +++ /dev/null @@ -1,79 +0,0 @@ -\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 deleted file mode 100644 index 4ab33c2..0000000 --- a/docs/latex/class_reml_hca__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index b9c0df8..0000000 Binary files a/docs/latex/class_reml_hca__coll__graph.pdf and /dev/null differ diff --git a/docs/latex/class_reml_hca__inherit__graph.md5 b/docs/latex/class_reml_hca__inherit__graph.md5 deleted file mode 100644 index 2cd1fa6..0000000 --- a/docs/latex/class_reml_hca__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index b9c0df8..0000000 Binary files a/docs/latex/class_reml_hca__inherit__graph.pdf and /dev/null differ diff --git a/docs/latex/class_scorer.tex b/docs/latex/class_scorer.tex deleted file mode 100644 index ecb8d18..0000000 --- a/docs/latex/class_scorer.tex +++ /dev/null @@ -1,55 +0,0 @@ -\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 deleted file mode 100644 index cbbb579..0000000 --- a/docs/latex/class_scorer__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index be82045..0000000 Binary files a/docs/latex/class_scorer__coll__graph.pdf and /dev/null differ diff --git a/docs/latex/class_snp_kinship.tex b/docs/latex/class_snp_kinship.tex deleted file mode 100644 index b603ce4..0000000 --- a/docs/latex/class_snp_kinship.tex +++ /dev/null @@ -1,60 +0,0 @@ -\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 deleted file mode 100644 index 6c4b4ea..0000000 --- a/docs/latex/class_snp_kinship__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 1b83bad..0000000 Binary files a/docs/latex/class_snp_kinship__coll__graph.pdf and /dev/null differ diff --git a/docs/latex/class_snp_kinship__inherit__graph.md5 b/docs/latex/class_snp_kinship__inherit__graph.md5 deleted file mode 100644 index 5ecac28..0000000 --- a/docs/latex/class_snp_kinship__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 1b83bad..0000000 Binary files a/docs/latex/class_snp_kinship__inherit__graph.pdf and /dev/null differ diff --git a/docs/latex/class_util.tex b/docs/latex/class_util.tex deleted file mode 100644 index 58429e0..0000000 --- a/docs/latex/class_util.tex +++ /dev/null @@ -1,35 +0,0 @@ -\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 deleted file mode 100644 index c5daf41..0000000 --- a/docs/latex/class_util__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 4c6e01e..0000000 Binary files a/docs/latex/class_util__coll__graph.pdf and /dev/null differ diff --git a/docs/latex/dir_5a38eadd9c55c6fb727a5803bb09c43f.tex b/docs/latex/dir_5a38eadd9c55c6fb727a5803bb09c43f.tex deleted file mode 100644 index 4733b49..0000000 --- a/docs/latex/dir_5a38eadd9c55c6fb727a5803bb09c43f.tex +++ /dev/null @@ -1,5 +0,0 @@ -\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 deleted file mode 100644 index d580625..0000000 --- a/docs/latex/dir_60a4da173fca05b90d61823adfb03c66.tex +++ /dev/null @@ -1,2 +0,0 @@ -\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 deleted file mode 100644 index a1e2c7d..0000000 --- a/docs/latex/dir_68267d1309a1af8e8297ef4c3efbcdba.tex +++ /dev/null @@ -1,2 +0,0 @@ -\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 deleted file mode 100644 index 4de0a50..0000000 --- a/docs/latex/dir_8a990246551b69b640aea526aed19dbb.tex +++ /dev/null @@ -1,2 +0,0 @@ -\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 deleted file mode 100644 index 94b6353..0000000 --- a/docs/latex/dir_95cb54157f2bc20483fe55d9ab58fd27.tex +++ /dev/null @@ -1,2 +0,0 @@ -\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 deleted file mode 100644 index a3550b9..0000000 --- a/docs/latex/dir_b41b214f44b1d1e2573f3fffd563b69b.tex +++ /dev/null @@ -1,5 +0,0 @@ -\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 deleted file mode 100644 index c9f048e..0000000 --- a/docs/latex/dir_d522931ffa1371640980b621734a4381.tex +++ /dev/null @@ -1,2 +0,0 @@ -\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 deleted file mode 100644 index d45ae36..0000000 --- a/docs/latex/dir_df4e26f2ffd11e56f607d6303fce6b11.tex +++ /dev/null @@ -1,2 +0,0 @@ -\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 deleted file mode 100644 index e457acc..0000000 --- a/docs/latex/doxygen.sty +++ /dev/null @@ -1,503 +0,0 @@ -\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 deleted file mode 100644 index fee9da8..0000000 --- a/docs/latex/files.tex +++ /dev/null @@ -1,26 +0,0 @@ -\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 deleted file mode 100644 index 1a58bc1..0000000 --- a/docs/latex/hierarchy.tex +++ /dev/null @@ -1,22 +0,0 @@ -\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 deleted file mode 100644 index 4fd8f89..0000000 --- a/docs/latex/index.tex +++ /dev/null @@ -1,110 +0,0 @@ -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 deleted file mode 100644 index 998466f..0000000 --- a/docs/latex/main_8cpp.tex +++ /dev/null @@ -1,33 +0,0 @@ -\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 deleted file mode 100644 index e30bfe4..0000000 --- a/docs/latex/main_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -a5e5490e082aa76af63e3e1a862d094c \ No newline at end of file diff --git a/docs/latex/main_8cpp__incl.pdf b/docs/latex/main_8cpp__incl.pdf deleted file mode 100644 index 39a2cf5..0000000 Binary files a/docs/latex/main_8cpp__incl.pdf and /dev/null 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 deleted file mode 100644 index 4fd8f89..0000000 --- a/docs/latex/md___users_danielruskin_src_hca-dev__r_e_a_d_m_e.tex +++ /dev/null @@ -1,110 +0,0 @@ -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 deleted file mode 100644 index 234d124..0000000 --- a/docs/latex/refman.tex +++ /dev/null @@ -1,171 +0,0 @@ -\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 deleted file mode 100644 index 827bb94..0000000 --- a/docs/latex/util_8cpp.tex +++ /dev/null @@ -1,11 +0,0 @@ -\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 deleted file mode 100644 index 1bdc9fa..0000000 --- a/docs/latex/util_8cpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -b8e4db3e4cb78af37acab63f8a425a22 \ No newline at end of file diff --git a/docs/latex/util_8cpp__incl.pdf b/docs/latex/util_8cpp__incl.pdf deleted file mode 100644 index 02cdad9..0000000 Binary files a/docs/latex/util_8cpp__incl.pdf and /dev/null differ diff --git a/docs/latex/util_8h.tex b/docs/latex/util_8h.tex deleted file mode 100644 index 10ea53c..0000000 --- a/docs/latex/util_8h.tex +++ /dev/null @@ -1,24 +0,0 @@ -\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 deleted file mode 100644 index 9a537a8..0000000 --- a/docs/latex/util_8h__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 24ee08e..0000000 Binary files a/docs/latex/util_8h__dep__incl.pdf and /dev/null differ diff --git a/docs/latex/util_8h__incl.md5 b/docs/latex/util_8h__incl.md5 deleted file mode 100644 index 8198213..0000000 --- a/docs/latex/util_8h__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -07d28f69ab25c49a5c38520afde58716 \ No newline at end of file diff --git a/docs/latex/util_8h__incl.pdf b/docs/latex/util_8h__incl.pdf deleted file mode 100644 index f4c931f..0000000 Binary files a/docs/latex/util_8h__incl.pdf and /dev/null differ diff --git a/docs/uml/UML.png b/docs/uml/UML.png deleted file mode 100644 index 91be8f2..0000000 Binary files a/docs/uml/UML.png and /dev/null differ diff --git a/docs/uml/draw_io_UML.xml b/docs/uml/draw_io_UML.xml deleted file mode 100644 index 5131377..0000000 --- a/docs/uml/draw_io_UML.xml +++ /dev/null @@ -1 +0,0 @@ -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/CommandExecutor.cpp b/src/CommandExecutor.cpp new file mode 100644 index 0000000..7d6427c --- /dev/null +++ b/src/CommandExecutor.cpp @@ -0,0 +1,59 @@ +/* + * CommandExecutor.cpp + * + * Created on: Oct 9, 2017 + * Author: danielruskin + */ + +#include "CommandExecutor.h" + +CommandExecutor::CommandExecutor(const UnorderedStringStringMap& argumentMap) { + programOptions = std::make_shared(argumentMap); + inputOutputOptions = std::make_shared(argumentMap); + snpKinshipOptions = std::make_shared(argumentMap); + hcaOptions = std::make_shared(argumentMap); + h2rOptions = std::make_shared(argumentMap); +} + +void CommandExecutor::run() const { + boost::log::core::get()->set_filter(boost::log::trivial::severity >= programOptions->logLevel()->first); + boost::log::add_common_attributes(); + + std::string outputFolder = inputOutputOptions->outputFilePrefix()->first; + if(outputFolder.length() != 0 && outputFolder.back() != '/') { + outputFolder += "/"; + } + outputFolder += "hca-run-"; + outputFolder += std::to_string(std::chrono::system_clock::now().time_since_epoch().count()); + outputFolder += "/"; + + omp_set_num_threads(programOptions->numThreads()->first); + + BOOST_LOG_TRIVIAL(info) << "Program launched!"; + BOOST_LOG_TRIVIAL(info) << "Log Level: " << programOptions->logLevel()->first; + BOOST_LOG_TRIVIAL(info) << "Output Folder: " << outputFolder; + BOOST_LOG_TRIVIAL(info) << "Num Threads: " << programOptions->numThreads()->first; + + switch(programOptions->programCommand()->first) { + case ProgramOptions::ProgramCommand::hca: { + RemlHca hca(inputOutputOptions, snpKinshipOptions, hcaOptions, h2rOptions, programOptions, outputFolder); + break; + } + case ProgramOptions::ProgramCommand::h2r: { + RemlHeritability rh(inputOutputOptions, snpKinshipOptions, h2rOptions, programOptions, outputFolder); + break; + } + case ProgramOptions::ProgramCommand::kinship: { + SnpKinship snp(inputOutputOptions, snpKinshipOptions, programOptions, outputFolder); + break; + } + case ProgramOptions::ProgramCommand::score: { + ScorePhen phen(inputOutputOptions, outputFolder); + break; + } + default: { + throw InvalidArgumentError("Invalid program command.", "program_command", ""); + break; + } + } +} diff --git a/src/CommandExecutor.h b/src/CommandExecutor.h new file mode 100644 index 0000000..162c8e4 --- /dev/null +++ b/src/CommandExecutor.h @@ -0,0 +1,46 @@ +/* + * CommandExecutor.h + * + * Created on: Oct 9, 2017 + * Author: danielruskin + */ + +#ifndef SRC_COMMANDEXECUTOR_H_ +#define SRC_COMMANDEXECUTOR_H_ + +#include +#include +#include +#include +#include +#include "omp.h" +#include "ProgramOptions.h" +#include "InputOutputOptions.h" +#include "SnpKinshipOptions.h" +#include "HcaOptions.h" +#include "H2rOptions.h" +#include "DataUtils.h" +#include "GenoLoader.h" +#include "SnpKinship.h" +#include "RemlHeritability.h" +#include "RemlHca.h" +#include "ScorePhen.h" +#include +#include +#include +#include +#include "IndividualInfoContainers.h" + +class CommandExecutor { +public: + CommandExecutor(const UnorderedStringStringMap& argumentMap); + void run() const; +private: + std::shared_ptr programOptions; + std::shared_ptr inputOutputOptions; + std::shared_ptr snpKinshipOptions; + std::shared_ptr hcaOptions; + std::shared_ptr h2rOptions; +}; + +#endif /* SRC_COMMANDEXECUTOR_H_ */ diff --git a/src/CvPartition.cpp b/src/CvPartition.cpp new file mode 100644 index 0000000..65f5fd5 --- /dev/null +++ b/src/CvPartition.cpp @@ -0,0 +1,75 @@ +/* + * CvPartition.cpp + * + * Created on: Nov 29, 2017 + * Author: danielruskin + */ + +#include "CvPartition.h" + +CvPartition::CvPartition(int nFolds, std::shared_ptr newPhen, std::shared_ptr newCov, std::shared_ptr newGrm) + : phen(newPhen), cov(newCov), grm(newGrm), partitions(nFolds) { + std::mt19937 r(std::random_device{}()); + + int numIndvs = newPhen->n_rows; + double numIndvsDouble = newPhen->n_rows; + double splitSize = std::ceil(numIndvsDouble / nFolds); + + std::vector indvIds(numIndvs); + std::iota(indvIds.begin(), indvIds.end(), 0); + std::shuffle(indvIds.begin(), indvIds.end(), r); + + std::vector> trainingVecs(nFolds, std::vector(0)); + std::vector> testVecs(nFolds, std::vector(0)); + + int atTestPartition = 0; + for(std::vector::iterator indvIter = indvIds.begin(); indvIter != indvIds.end(); indvIter++) { + if(testVecs[atTestPartition].size() >= splitSize) { + ++atTestPartition; + } + + testVecs[atTestPartition].push_back(*indvIter); + for(int otherPart = 0; otherPart < nFolds; otherPart++) { + if(otherPart != atTestPartition) { + trainingVecs[otherPart].push_back(*indvIter); + } + } + } + + // If any unfinished partitions are not full of test individuals, fix that. + // (This handles an edgecase. If we have 10 people and 7 splits, the split size will be 2. + // But this means that all individuals will be assigned by the 5th partition, + // and the last 2 will have no test individuals.) + for(int currentPart = atTestPartition; currentPart < nFolds; currentPart++) { + double delta = splitSize - testVecs[currentPart].size(); + + if(delta > 0) { + std::random_shuffle(trainingVecs[currentPart].begin(), trainingVecs[currentPart].end()); + for(int i = 0; i < delta; i++) { + int elem = trainingVecs[currentPart].back(); + trainingVecs[currentPart].pop_back(); + testVecs[currentPart].push_back(elem); + } + } + } + + for(int currentPart = 0; currentPart < nFolds; currentPart++) { + std::sort(testVecs[currentPart].begin(), testVecs[currentPart].end()); + std::sort(trainingVecs[currentPart].begin(), trainingVecs[currentPart].end()); + + partitions[currentPart].testIds = arma::conv_to::from(testVecs[currentPart]); + partitions[currentPart].trainingIds = arma::conv_to::from(trainingVecs[currentPart]); + } +} + +void CvPartition::getTrainData(int fold, std::unique_ptr& outPhen, std::unique_ptr& outCov, std::unique_ptr& outGrm) const { + outPhen.reset(new arma::mat(phen->rows(partitions[fold].trainingIds))); + outCov.reset(new arma::mat(cov->rows(partitions[fold].trainingIds))); + outGrm.reset(new arma::mat(grm->submat(partitions[fold].trainingIds, partitions[fold].trainingIds))); +} + +void CvPartition::getTestData(int fold, std::unique_ptr& outPhen, std::unique_ptr& outCov, std::unique_ptr& outGrm) const { + outPhen.reset(new arma::mat(phen->rows(partitions[fold].testIds))); + outCov.reset(new arma::mat(cov->rows(partitions[fold].testIds))); + outGrm.reset(new arma::mat(grm->submat(partitions[fold].testIds, partitions[fold].testIds))); +} diff --git a/src/CvPartition.h b/src/CvPartition.h new file mode 100644 index 0000000..7aeee48 --- /dev/null +++ b/src/CvPartition.h @@ -0,0 +1,40 @@ +/* + * CvPartition.h + * + * Created on: Nov 29, 2017 + * Author: danielruskin + */ + +#ifndef SRC_CVPARTITION_H_ +#define SRC_CVPARTITION_H_ + +#include "Utils.h" +#include "DataUtils.h" +#include "InputOutputOptions.h" + +#include +#include +#include +#include +#include + +struct PartitionMetadata { + arma::uvec testIds; + arma::uvec trainingIds; +}; + +class CvPartition { +public: + CvPartition(int nFolds, std::shared_ptr newPhen, std::shared_ptr newCov, std::shared_ptr newGrm); + + void getTrainData(int fold, std::unique_ptr& outPhen, std::unique_ptr& outCov, std::unique_ptr& outGrm) const; + void getTestData(int fold, std::unique_ptr& outPhen, std::unique_ptr& outCov, std::unique_ptr& outGrm) const; +private: + std::shared_ptr phen; + std::shared_ptr cov; + std::shared_ptr grm; + + std::vector partitions; +}; + +#endif /* SRC_CVPARTITION_H_ */ diff --git a/src/Data.cpp b/src/Data.cpp deleted file mode 100644 index f8e0fdd..0000000 --- a/src/Data.cpp +++ /dev/null @@ -1,404 +0,0 @@ -#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 deleted file mode 100644 index 0f0b062..0000000 --- a/src/Data.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * data.h - * - * Created on: Feb 10, 2016 - * Author: Joey - */ - -#ifndef DATA_H_ -#define DATA_H_ - -#include -#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/DataLoader.cpp b/src/DataLoader.cpp new file mode 100644 index 0000000..28b2bce --- /dev/null +++ b/src/DataLoader.cpp @@ -0,0 +1,115 @@ +/* + * DataLoader.cpp + * + * Created on: Nov 14, 2017 + * Author: danielruskin + */ + +#include "DataLoader.h" + +const std::map DataLoader::DATA_TO_LOAD_NAMES = { + {DataLoader::DataToLoad::cCov, "categorical covariates"}, + {DataLoader::DataToLoad::qCov, "quantitative covariates"}, + {DataLoader::DataToLoad::phen, "phenotypic data"}, + {DataLoader::DataToLoad::pregiven_grm, "GRM (pregiven)"}, + {DataLoader::DataToLoad::snp_grm, "GRM (SNP)"} +}; + +/* + * Loads the requested data, performing any necessary individual reconciliations. + * Whenever loading individual data, use this class. + */ +DataLoader::DataLoader(std::shared_ptr requestedIndvs, std::shared_ptr ioOptsNew) { + indvList = requestedIndvs; + ioOpts = ioOptsNew; +} + +/* + * If data is generated as a result of this call (i.e. a new SNP), the results will be saved to outputFolder. + */ +void DataLoader::loadData(DataToLoad d) { + sanityCheckDataLoad(d); + + if(d == DataToLoad::snp_grm) { + throw std::runtime_error("Error! SNP GRM must be loaded with loadSnpGrm."); + } else { + std::unique_ptr data; + std::unique_ptr indvs; + std::unique_ptr removedIndvs; + std::unique_ptr ignoredIndvs; + loadDataRaw(d, data, indvs, removedIndvs, ignoredIndvs); + + indvList = std::move(indvs); + reconcile(*removedIndvs); + + BOOST_LOG_TRIVIAL(info) << "Loaded Data: " << + DataLoader::DATA_TO_LOAD_NAMES.at(d) << + ". " << + indvList->size() << + " individuals remaining for analysis (" << + removedIndvs->size() << + " individuals were removed due to missing data; " << + *ignoredIndvs << + " individuals were not seen before, and so were ignored)."; + + dataLoaded.push_back(d); + loadedData[d] = std::move(data); + } +} + +/* + * Separate method for SNP GRM loading. + * You must also pass an output folder for the SNP generation routine. + */ +void DataLoader::loadSnpGrm(std::shared_ptr snpOptsNew, std::shared_ptr programOptsNew, const std::string& outputFolder) { + sanityCheckDataLoad(DataToLoad::snp_grm); + + SnpKinship snpk(ioOpts, snpOptsNew, programOptsNew, *indvList, outputFolder); + + indvList = snpk.indvs(); + reconcile(*(snpk.removedIndvs())); + dataLoaded.push_back(DataToLoad::snp_grm); + snpGrm = snpk.grm(); +} + +void DataLoader::sanityCheckDataLoad(DataToLoad d) const { + bool grmLoaded = std::find(dataLoaded.begin(), dataLoaded.end(), DataToLoad::pregiven_grm) != dataLoaded.end(); + grmLoaded = grmLoaded || std::find(dataLoaded.begin(), dataLoaded.end(), DataToLoad::snp_grm) != dataLoaded.end(); + if(grmLoaded) { + throw std::runtime_error("GRM must be loaded last!"); + } + + bool currLoaded = std::find(dataLoaded.begin(), dataLoaded.end(), d) != dataLoaded.end(); + if(currLoaded) { + throw std::runtime_error("This data was already loaded!"); + } +} + +void DataLoader::loadDataRaw(DataToLoad d, std::unique_ptr& outData, std::unique_ptr& outIndvs, std::unique_ptr& outRemovedIndvs, std::unique_ptr& outIgnoredIndvs) const { + if(d == DataToLoad::cCov) { + loadCov(*ioOpts, *indvList, CovariateType::categorical, outData, outIndvs, outRemovedIndvs, outIgnoredIndvs); + } else if(d == DataToLoad::qCov) { + loadCov(*ioOpts, *indvList, CovariateType::quantitative, outData, outIndvs, outRemovedIndvs, outIgnoredIndvs); + } else if(d == DataToLoad::phen) { + loadPhen(*ioOpts, *indvList, outData, outIndvs, outRemovedIndvs, outIgnoredIndvs); + } else if(d == DataToLoad::pregiven_grm) { + loadGivenGRM(*ioOpts, *indvList, outData, outIndvs, outRemovedIndvs, outIgnoredIndvs); + } else { + throw std::runtime_error("Unknown data request!"); + } +} + +void DataLoader::reconcile(const VectorOfInts& removedRows) { + for(LoadedDataMap::iterator matI = loadedData.begin(); matI != loadedData.end(); matI++) { + for(VectorOfInts::const_reverse_iterator rowI = removedRows.rbegin(); rowI != removedRows.rend(); rowI++) { + matI->second->shed_row(*rowI); + } + } +} + +void DataLoader::saveIndvList(const std::string& outputFolder) const { + std::string outputFile = outputFolder + "/individuals_kept_in_analysis.csv"; + boost::filesystem::create_directories(outputFolder + "/"); + + saveIndvListToFile(outputFile, *indvList); +} diff --git a/src/DataLoader.h b/src/DataLoader.h new file mode 100644 index 0000000..29de42b --- /dev/null +++ b/src/DataLoader.h @@ -0,0 +1,55 @@ +/* + * DataLoader.h + * + * Created on: Nov 14, 2017 + * Author: danielruskin + */ + +#ifndef SRC_DATALOADER_H_ +#define SRC_DATALOADER_H_ + +#include "Utils.h" +#include "DataUtils.h" +#include "IndividualInfoContainers.h" +#include "InputOutputOptions.h" +#include "SnpKinshipOptions.h" +#include "SnpKinship.h" + +class DataLoader { +public: + enum DataToLoad { cCov, qCov, phen, pregiven_grm, snp_grm }; + typedef std::map> LoadedDataMap; + const static std::map DATA_TO_LOAD_NAMES; + + DataLoader(std::shared_ptr requestedIndvs, std::shared_ptr ioOptsNew); + + void loadData(DataToLoad d); + void loadSnpGrm(std::shared_ptr snpOptsNew, std::shared_ptr programOptsNew, const std::string& outputFolder); + + std::shared_ptr getData(DataToLoad d) const { + return makeSharedPtrConst(loadedData.at(d)); + } + std::shared_ptr getSnpGrm() const { + return makeSharedPtrConst(snpGrm); + } + + std::shared_ptr getIndvs() const { + return indvList; + } + + void saveIndvList(const std::string& outputFolder) const; +private: + LoadedDataMap loadedData; + std::shared_ptr snpGrm; + + std::shared_ptr indvList; + + std::shared_ptr ioOpts; + std::vector dataLoaded; + + void sanityCheckDataLoad(DataToLoad d) const; + void loadDataRaw(DataToLoad d, std::unique_ptr& outData, std::unique_ptr& outIndvs, std::unique_ptr& outRemovedIndvs, std::unique_ptr& outIgnoredIndvs) const; + void reconcile(const VectorOfInts& removedRows); +}; + +#endif /* SRC_DATALOADER_H_ */ diff --git a/src/DataUtils.cpp b/src/DataUtils.cpp new file mode 100644 index 0000000..ab0ad84 --- /dev/null +++ b/src/DataUtils.cpp @@ -0,0 +1,681 @@ +/* + * DataUtils.cpp + * + * Created on: Oct 11, 2017 + * Author: danielruskin + */ + +#include "DataUtils.h" + +/* + * Loads the chromosome data from the BIM file. + */ +void loadChrFromBimFile(const InputOutputOptions& inputOutputOptions, std::unique_ptr& outVec) { + outVec.reset( + new arma::colvec(linesInFile(inputOutputOptions.genoBimFile()->first, "Genotype BIM File")) + ); + + std::ifstream bimFile(inputOutputOptions.genoBimFile()->first, std::ios::binary); + std::string read; + + int atIndv = 0; + while(std::getline(bimFile, read)) { + VectorOfStrings sep; + boost::split(sep, read, boost::is_any_of("\t"), boost::token_compress_on); + + int chrId; + try { + chrId = boost::lexical_cast(sep[0]); + } catch(const boost::bad_lexical_cast& e) { + throw InvalidArgumentError("File Contains Invalid (non-int) Values", "BIM File", sep[0]); + } + + (*outVec)(atIndv) = chrId; + + ++atIndv; + } +} + +/* + * Loads a user-provided HCA-generated trait from a file. + */ +void loadTraitFromFile(const InputOutputOptions& inputOutputOptions, std::unique_ptr& outMat) { + outMat = loadFileOfDoubles(inputOutputOptions.traitFile()->first, "Trait File"); +} + +/* + * Loads user-provided lambda values from a file. + */ +void loadLambdaValuesFromFile(const InputOutputOptions& inputOutputOptions, std::unique_ptr>& outVec) { + outVec = loadFileOfDoublesToVec(inputOutputOptions.hcaLambdaValuesFile()->first, "HCA Lambda File"); +} + +/* + * Loads user-provided coefficient constraint values from a file. + */ +void loadCoefCnstFromFile(const InputOutputOptions& inputOutputOptions, std::unique_ptr>& outVec) { + outVec = loadFileOfDoublesToVec(inputOutputOptions.coefFile()->first, "HCA Coefficient Constraint File"); +} + +/* + * Loads all individual metadata from the phenotype file. + */ +void loadIndividualsPhen(const InputOutputOptions& options, std::unique_ptr& outIndvs) { + outIndvs.reset(new IndividualInfoSet); + + std::ifstream phenFile(options.phenFile()->first, std::ios::binary); + std::string read; + + while(phenFile >> read) + { + VectorOfStrings sep; + boost::split(sep, read, boost::is_any_of(","), boost::token_compress_on); + + std::shared_ptr indv(new IndividualInfo(sep[0], sep[1])); + outIndvs->push_back(indv); + } +} + +void loadIndividualsKinship(const InputOutputOptions& options, std::unique_ptr& outIndvs) { + outIndvs.reset(new IndividualInfoSet); + + std::ifstream kinshipFile(options.givenKinshipIdFile()->first, std::ios::binary); + std::string read; + + while(std::getline(kinshipFile, read)) + { + VectorOfStrings sep; + boost::split(sep, read, boost::is_any_of("\t"), boost::token_compress_on); + + std::shared_ptr indv(new IndividualInfo(sep[0], sep[1])); + outIndvs->push_back(indv); + } +} +void loadIndividualsGeno(const InputOutputOptions& options, std::unique_ptr& outIndvs, std::unique_ptr& outGenders) { + outIndvs.reset(new IndividualInfoSet); + outGenders.reset( + new arma::colvec(linesInFile(options.genoFamFile()->first, "Genotype FAM File")) + ); + + std::ifstream famFile(options.genoFamFile()->first, std::ios::binary); + std::string read; + + int atIndv = 0; + while(std::getline(famFile, read)) + { + VectorOfStrings sep; + boost::split(sep, read, boost::is_any_of(" "), boost::token_compress_on); + + std::shared_ptr indv(new IndividualInfo(sep[0], sep[1])); + outIndvs->push_back(indv); + try { + (*outGenders)(atIndv) = boost::lexical_cast(sep[4]); + } catch(const boost::bad_lexical_cast& e) { + throw InvalidArgumentError("File Contains Invalid (non-int) Values", "Genotype FAM File", options.genoFamFile()->first); + } + + ++atIndv; + } +} + +/* + * loadGivenGRM will load the pregiven GRM. + */ +void loadGivenGRM(const InputOutputOptions& inputOutputOptions, + const IndividualInfoSet& requestedIndividuals, + std::unique_ptr& outMatrix, + std::unique_ptr& outIndvs, + std::unique_ptr& outRemovedIndvs, + std::unique_ptr& outIgnoredIndvs) { + std::unique_ptr currentIndividuals; + loadIndividualsKinship(inputOutputOptions, currentIndividuals); + + // Map from GRM indv number to new indv number (for matrix) + std::unique_ptr indvMap; + filterMatrixCategorizer(requestedIndividuals, *currentIndividuals, indvMap, outIndvs, outRemovedIndvs, outIgnoredIndvs); + + // Read GRM and populate matrix + outMatrix.reset(new arma::mat(indvMap->size(), indvMap->size(), arma::fill::zeros)); + std::ifstream grmFile(inputOutputOptions.givenKinshipFile()->first, std::ios::binary); + std::string read; + + while(std::getline(grmFile, read)) + { + std::unique_ptr sep; + fastStringSplit(read, "\t", sep); + + int indvIdOne; + int indvIdTwo; + double val; + try { + indvIdOne = boost::lexical_cast((*sep)[0]); + indvIdTwo = boost::lexical_cast((*sep)[1]); + val = boost::lexical_cast((*sep)[3]); + } catch(const boost::bad_lexical_cast& e) { + throw InvalidArgumentError("File Contains Invalid (non-int/non-double) Values", "GRM File", inputOutputOptions.givenKinshipFile()->first); + } + + UnorderedIntIntMap::iterator mapOne = indvMap->find(indvIdOne - 1); + UnorderedIntIntMap::iterator mapTwo = indvMap->find(indvIdTwo - 1); + if(!(mapOne == indvMap->end() || mapTwo == indvMap->end())) { + (*outMatrix.get())(mapOne->second, mapTwo->second) = val; + (*outMatrix.get())(mapTwo->second, mapOne->second) = val; + } + } +} + +void loadGeno(const InputOutputOptions& inputOutputOptions, + const IndividualInfoSet& requestedIndividuals, + std::unique_ptr& outMatrix, + std::unique_ptr& outMissing, + std::unique_ptr& outGenders, + std::unique_ptr& outIndvs, + std::unique_ptr& outRemovedIndvs, + std::unique_ptr& outIgnoredIndvs) { + std::unique_ptr geno; + std::unique_ptr genoMissing; + std::unique_ptr genders; + std::unique_ptr individuals; + loadGenoRaw(inputOutputOptions, geno, genoMissing, genders, individuals); + + filterMatrix(requestedIndividuals, *geno, *individuals, outMatrix, outIndvs, outRemovedIndvs, outIgnoredIndvs); + filterMatrix(requestedIndividuals, *genoMissing, *individuals, outMissing, outIndvs, outRemovedIndvs, outIgnoredIndvs); + + std::unique_ptr outGendersTmp; + filterMatrix(requestedIndividuals, *genders, *individuals, outGendersTmp, outIndvs, outRemovedIndvs, outIgnoredIndvs); + outGenders.reset(new arma::colvec(outGendersTmp->col(0))); +} + +void loadGenoRaw(const InputOutputOptions& inputOutputOptions, std::unique_ptr& outMatrix, std::unique_ptr& outMissing, std::unique_ptr& outGenders, std::unique_ptr& outIndvs) { + // Load and validate geno file + std::ifstream genoFile(inputOutputOptions.genoBedFile()->first, std::ios::binary); + 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) { + throw InvalidArgumentError("Data is not in SNP-major mode.", "BED file", inputOutputOptions.genoBedFile()->first); + } + } else { + throw InvalidArgumentError("Invalid data file.", "BED file", inputOutputOptions.genoBedFile()->first); + } + + // Get whitelist/blacklist for geno + std::unique_ptr geno_to_include = enforceWhitelistBlacklist( + *inputOutputOptions.genoBimFile(), + WhitelistBlacklistFileType::tab_second_col, + *inputOutputOptions.genoWhitelistFile(), + *inputOutputOptions.genoBlacklistFile(), + "Genotype File" + ); + + // If we did not use whitelist/blacklist, read BIM file to get # of SNPs. + int snpCount; + if(geno_to_include->second) { + snpCount = geno_to_include->first.size(); + } else { + std::ifstream bimFile(inputOutputOptions.genoBimFile()->first, std::ios::binary); + std::string line; + + snpCount = 0; + while(getline(bimFile, line)) { + ++snpCount; + } + } + + // Load individuals (FAM file) + loadIndividualsGeno(inputOutputOptions, outIndvs, outGenders); + + // Load SNP data (BED file) + int indvCount = outIndvs->size(); + outMatrix.reset(new arma::mat(indvCount, snpCount, arma::fill::zeros)); + outMissing.reset(new arma::mat(indvCount, snpCount, arma::fill::zeros)); + for(int snpIndx = 0; snpIndx < snpCount; snpIndx++) { + int indvIndx = 0; + while(indvIndx < indvCount) { + genoFile.read(memblock, 1); + if(genoFile.eof()) { + throw InvalidArgumentError("Invalid data file.", "BED file", inputOutputOptions.genoBedFile()->first); + } + + std::bitset<8> b = memblock[0]; + + int bitIndex = 0; + while(bitIndex < 7 && indvIndx < indvCount) { + bool b2 = !b[bitIndex++]; + bool b1 = !b[bitIndex++]; + + if(!b1 || b2) { + double snpVal = b1 + b2; + (*outMatrix)(indvIndx, snpIndx) = snpVal; + } + else { + (*outMissing)(indvIndx, snpIndx) = 1; + (*outMatrix)(indvIndx, snpIndx) = 1e6; + } + + indvIndx++; + } + } + } +} + +/* + * loadPhen will load the requested phenotypic data. + * It will respect the whitelist/blacklist files in InputOutputOptions. + */ +void loadPhen(const InputOutputOptions& inputOutputOptions, + const IndividualInfoSet& requestedIndividuals, + std::unique_ptr& outMatrix, + std::unique_ptr& outIndvs, + std::unique_ptr& outRemovedIndvs, + std::unique_ptr& outIgnoredIndvs) { + std::unique_ptr phen; + std::unique_ptr individuals; + loadPhenRaw(inputOutputOptions, phen, individuals); + + filterMatrix(requestedIndividuals, *phen, *individuals, outMatrix, outIndvs, outRemovedIndvs, outIgnoredIndvs); +} + +/* + * Loads the raw phenotype data, respecting whitelists/blacklists. Meant for internal use only. + */ +void loadPhenRaw(const InputOutputOptions& inputOutputOptions, std::unique_ptr& outMatrix, std::unique_ptr& outIndvs) { + std::unique_ptr phenToInclude = enforceWhitelistBlacklist(*inputOutputOptions.phenSpecFile(), WhitelistBlacklistFileType::full_row, *inputOutputOptions.phenWhitelistFile(), *inputOutputOptions.phenBlacklistFile(), "Phenotype File"); + + int numLines = linesInFile(inputOutputOptions.phenFile()->first, "Phenotype File"); + std::ifstream phenFile(inputOutputOptions.phenFile()->first, std::ios::binary); + std::string read; + + outMatrix = std::unique_ptr(new arma::mat(1, 1, arma::fill::zeros)); + outIndvs = std::unique_ptr(new IndividualInfoSet); + + // Read in phen data + int atIndv = 0; + while(phenFile >> read) + { + VectorOfStrings sep; + boost::split(sep, read, boost::is_any_of(","), boost::token_compress_on); + + std::shared_ptr indv(new IndividualInfo(sep[0], sep[1])); + outIndvs->push_back(indv); + + // Set size of matrix to reflect # of phen we are including + if(atIndv == 0) { + if(phenToInclude->second) { + outMatrix->zeros(numLines, phenToInclude->first.size()); + } else { + outMatrix->zeros(numLines, sep.size() - 2); + } + } + + // Parse phen data for this indv + int atPhenAll = 0; // The phen # we are looking at + int atPhenIncluded = 0; // The phen # we are looking at, only looking at prev we have included + for(int atIdx = 2; atIdx < sep.size(); atIdx++) { + // Include if phenToInclude is not set (no whitelist/blacklist), or if this phen is whitelisted. + if(!phenToInclude->second || std::find(phenToInclude->first.begin(), phenToInclude->first.end(), atPhenAll) != phenToInclude->first.end()) { + try { + (*outMatrix)(atIndv, atPhenIncluded) = boost::lexical_cast(sep[atIdx]); + ++atPhenIncluded; + } catch(const boost::bad_lexical_cast& e) { + throw InvalidArgumentError("File Contains Invalid (non-double) Values", "Phenotype File", sep[atIdx]); + } + } + + ++atPhenAll; + } + + atIndv += 1; + } +} + +/* + * loadCov will load the requested covariate data. + * It will respect the whitelist/blacklist files in InputOutputOptions. + */ +void loadCov(const InputOutputOptions& inputOutputOptions, + const IndividualInfoSet& requestedIndividuals, + CovariateType covariateType, + std::unique_ptr& outMatrix, + std::unique_ptr& outIndvs, + std::unique_ptr& outRemovedIndvs, + std::unique_ptr& outIgnoredIndvs) { + std::unique_ptr cov; + std::unique_ptr individuals; + if(covariateType == CovariateType::categorical) { + loadCCovRaw(inputOutputOptions, cov, individuals); + } else { + loadQCovRaw(inputOutputOptions, cov, individuals); + } + + filterMatrix(requestedIndividuals, *cov, *individuals, outMatrix, outIndvs, outRemovedIndvs, outIgnoredIndvs); +} + +/* + * Loads the raw categorical covariate data, respecting whitelists/blacklists. Meant for internal use only. + */ +void loadCCovRaw(const InputOutputOptions& inputOutputOptions, std::unique_ptr& outMatrix, std::unique_ptr& outIndvs) { + std::unique_ptr covToInclude = enforceWhitelistBlacklist(*inputOutputOptions.cCovSpecFile(), WhitelistBlacklistFileType::full_row, *inputOutputOptions.cCovWhitelistFile(), *inputOutputOptions.cCovBlacklistFile(), "Categorical Covariate File"); + + int numLines = linesInFile(inputOutputOptions.cCovFile()->first, "Categorical Covariate File"); + std::ifstream covFile(inputOutputOptions.cCovFile()->first, std::ios::binary); + std::string read; + + outMatrix = std::unique_ptr(new arma::mat(1, 1, arma::fill::zeros)); + outIndvs = std::unique_ptr(new IndividualInfoSet); + + std::vector categories; + std::vector maxVals; + + // Read in cov data + int atIndv = 0; + while(covFile >> read) + { + VectorOfStrings sep; + boost::split(sep, read, boost::is_any_of(","), boost::token_compress_on); + + std::shared_ptr indv(new IndividualInfo(sep[0], sep[1])); + outIndvs->push_back(indv); + + // Set size of matrix to reflect # of cov we are including + if(atIndv == 0) { + int numCov; + if(covToInclude->second) { + numCov = covToInclude->first.size(); + } else { + numCov = sep.size() - 2; + } + outMatrix->zeros(numLines, numCov); + categories.resize(numCov); + maxVals.resize(numCov); + } + + int atCovAll = 0; // The cov # we are looking at + int atCovIncluded = 0; // The cov # we are looking at, only looking at prev we have included + for(int atIdx = 2; atIdx < sep.size(); atIdx++) { + // Include if covToInclude is not set (no whitelist/blacklist), or if this phen is whitelisted. + if(!covToInclude->second || std::find(covToInclude->first.begin(), covToInclude->first.end(), atCovAll) != covToInclude->first.end()) { + try { + (*outMatrix)(atIndv, atCovIncluded) = parseCategoricalValue(sep[atIdx], categories[atCovIncluded], maxVals[atCovIncluded]); + ++atCovIncluded; + } catch(const boost::bad_lexical_cast& e) { + throw InvalidArgumentError("File Contains Invalid (non-double) Values", "Quantitative Covariate File", sep[atIdx]); + } + } + + ++atCovAll; + } + + atIndv += 1; + } +} + +/* + * Parses a categorical value from the given map of categories. Returns the parsed value. + * If the categorical value has not yet been seen, adds it to the categories map. + * The maxVal argument should start at 0, and should be passed in to each subsequent call (it will increment every time a new cat is added). + */ +int parseCategoricalValue(const std::string& category, UnorderedStringIntMap& categories, int& maxVal) { + if(categories.find(category) == categories.end()) { + categories[category] = maxVal; + ++maxVal; + } + + return categories.find(category)->second; +} + +/* + * Loads the raw quantitative covariate data, respecting whitelists/blacklists. Meant for internal use only. + */ +void loadQCovRaw(const InputOutputOptions& inputOutputOptions, std::unique_ptr& outMatrix, std::unique_ptr& outIndvs) { + std::unique_ptr covToInclude = enforceWhitelistBlacklist(*inputOutputOptions.qCovSpecFile(), WhitelistBlacklistFileType::full_row, *inputOutputOptions.qCovWhitelistFile(), *inputOutputOptions.qCovBlacklistFile(), "Quantitative Covariate File"); + + int numLines = linesInFile(inputOutputOptions.qCovFile()->first, "Quantitative Covariate File"); + std::ifstream covFile(inputOutputOptions.qCovFile()->first, std::ios::binary); + std::string read; + + outMatrix = std::unique_ptr(new arma::mat(1, 1, arma::fill::zeros)); + outIndvs = std::unique_ptr(new IndividualInfoSet); + + // Read in cov data + int atIndv = 0; + while(covFile >> read) + { + VectorOfStrings sep; + boost::split(sep, read, boost::is_any_of(","), boost::token_compress_on); + + std::shared_ptr indv(new IndividualInfo(sep[0], sep[1])); + outIndvs->push_back(indv); + + // Set size of matrix to reflect # of cov we are including + if(atIndv == 0) { + int numCov; + if(covToInclude->second) { + numCov = covToInclude->first.size(); + } else { + numCov = sep.size() - 2; + } + outMatrix->zeros(numLines, numCov); + } + + int atCovAll = 0; // The cov # we are looking at + int atCovIncluded = 0; // The cov # we are looking at, only looking at prev we have included + for(int atIdx = 2; atIdx < sep.size(); atIdx++) { + // Include if covToInclude is not set (no whitelist/blacklist), or if this phen is whitelisted. + if(!covToInclude->second || std::find(covToInclude->first.begin(), covToInclude->first.end(), atCovAll) != covToInclude->first.end()) { + try { + (*outMatrix)(atIndv, atCovIncluded) = boost::lexical_cast(sep[atIdx]); + ++atCovIncluded; + } catch(const boost::bad_lexical_cast& e) { + throw InvalidArgumentError("File Contains Invalid (non-double) Values", "Quantitative Covariate File", sep[atIdx]); + } + } + + ++atCovAll; + } + + atIndv += 1; + } +} + +void saveIndvListToFile(const std::string& fileName, const IndividualInfoSet& indvs) { + std::fstream file(fileName, std::fstream::out); + file << "family_id,individual_id" << std::endl; + for(IndividualInfoSet::const_iterator i = indvs.begin(); i != indvs.end(); i++) { + file << (*i)->familyId() << "," << (*i)->individualId() << std::endl; + } +} + +/* + * getLengthOfFile will return the number of lines in a file. + */ +int linesInFile(const std::string& fileName, const std::string& argName) { + std::ifstream file(fileName); + if(!file) { + throw InvalidArgumentError("Unable To Load File", argName, fileName); + } + + std::string line; + int lineCount = 0; + for (int i = 0; std::getline(file, line); ++i) { lineCount++; } + + return lineCount; +} + +/* + * loadFileOfStrings will load a file with one string on each row. + * This is helpful for loading whitelist/blacklist, spec files, etc. + * argName should be the user-provided argument that the file is associated with; + * if an InvalidArgumentError is thrown (i.e. due to an invalid file), it will use this name. + */ +std::unique_ptr loadFileOfStrings(const std::string& fileName, const std::string& argName) { + std::ifstream file(fileName); + if(!file) { + throw InvalidArgumentError("Unable To Load File", argName, fileName); + } + + std::unique_ptr vec = std::unique_ptr(new VectorOfStrings); + + std::string line; + while(std::getline(file, line)) { + vec->push_back(line); + } + + return vec; +} + +/* + * Loads a file with one double on each row. Returns a matrix. + * Meant for internal use only. + */ +std::unique_ptr loadFileOfDoubles(const std::string& fileName, const std::string& argName) { + std::unique_ptr strvec = loadFileOfStrings(fileName, argName); + std::unique_ptr mat(new arma::colvec(strvec->size(), arma::fill::zeros)); + + int idx = 0; + for(VectorOfStrings::iterator i = strvec->begin(); i != strvec->end(); i++) { + try { + (*mat.get())(idx) = boost::lexical_cast(*i); + } catch(const boost::bad_lexical_cast& e) { + throw InvalidArgumentError("File Contains Invalid (non-double) Values", argName, *i); + } + ++idx; + } + + return mat; +} + +/* + * Loads a file with one double on each row. Returns a vector. + * Meant for internal use only. + */ +std::unique_ptr loadFileOfDoublesToVec(const std::string& fileName, const std::string& argName) { + std::unique_ptr out; + std::unique_ptr mat = loadFileOfDoubles(fileName, argName); + + out.reset(new VectorOfDoubles(arma::conv_to::from(*mat))); + + return out; +} + +/* + * Takes in two data sets: data set A and data set B. + * Returns a data set C that includes all individuals present in both data set A and B, in the same order they were included in data set A. + * For convenience, also returns: + * 1. A list of the individuals that were in data set A, but not data set B (outRemovedIndvs). + * These individuals are identified by their index in data set A. + * 2. The number of individuals that were present in data set B, but not in data set A (outIgnoredIndvs). + */ +void filterMatrix(const IndividualInfoSet& dataSetAIndvs, const arma::mat& dataSetB, const IndividualInfoSet& dataSetBIndvs, std::unique_ptr& outDataSetC, std::unique_ptr& outDataSetCIndvs, std::unique_ptr& outRemovedIndvs, std::unique_ptr& outIgnoredIndvs) { + std::unique_ptr dataSetBToDataSetC; + filterMatrixCategorizer(dataSetAIndvs, dataSetBIndvs, dataSetBToDataSetC, outDataSetCIndvs, outRemovedIndvs, outIgnoredIndvs); + + outDataSetC.reset(new arma::mat(dataSetBToDataSetC->size(), dataSetB.n_cols)); + for(UnorderedIntIntMap::const_iterator iter = dataSetBToDataSetC->begin(); iter != dataSetBToDataSetC->end(); iter++) { + outDataSetC->row(iter->second) = dataSetB.row(iter->first); + } +} + +/* + * Similar functionality to filterMatrix. + * Instead of returning the output data set, however, returns a mapping from the data set B rows to data set C rows. + * Also returns a vector of the rows from data set B that were included in the final data set (unordered). + */ +void filterMatrixCategorizer(const IndividualInfoSet& dataSetAIndvs, const IndividualInfoSet& dataSetBIndvs, std::unique_ptr& outDataSetBToDataSetC, std::unique_ptr& outDataSetCIndvs, std::unique_ptr& outRemovedIndvs, std::unique_ptr& outIgnoredIndvs) { + // First copy data set B indvs into a map. + // This will allow for constant time "get index of indv" operations. + IndividualInfoMap dataSetBMap; + for(int dataSetBIdx = 0; dataSetBIdx < dataSetBIndvs.size(); dataSetBIdx++) { + dataSetBMap.insert({ { dataSetBIndvs[dataSetBIdx], dataSetBIdx } }); + } + + // Iterate through data set A indvs. + // For each indv, if it is present in data set B, include it in the output map. + // Otherwise, mark it as a removed indv. + outDataSetBToDataSetC.reset(new UnorderedIntIntMap); + outDataSetCIndvs.reset(new IndividualInfoSet); + outRemovedIndvs.reset(new VectorOfInts); + int atOutputRow = 0; + for(int dataSetAIdx = 0; dataSetAIdx < dataSetAIndvs.size(); dataSetAIdx++) { + IndividualInfoMap::const_iterator bIndv = dataSetBMap.find(dataSetAIndvs[dataSetAIdx]); + + if(bIndv == dataSetBMap.end()) { + outRemovedIndvs->push_back(dataSetAIdx); + } else { + (*outDataSetBToDataSetC)[bIndv->second] = atOutputRow; + outDataSetCIndvs->push_back(bIndv->first); + ++atOutputRow; + } + } + + // Ignored indvs is just num indvs in data set B that were not included in data set C. + outIgnoredIndvs.reset(new int(dataSetBIndvs.size() - outDataSetCIndvs->size())); +} + +/* + * Enforces the whitelist/blacklist for a given spec file, filetype, and whitelist/blacklist. + * Throws InvalidArgumentError if spec file does not exist or is not provided. + */ +std::unique_ptr enforceWhitelistBlacklist(const OptionalString& specFile, WhitelistBlacklistFileType fileType, const OptionalString& whitelistFile, const OptionalString& blacklistFile, const std::string& optionName) { + bool whitelistB = false; + std::unique_ptr whitelist; + if(whitelistFile.second) { + whitelist = loadFileOfStrings( + whitelistFile.first, + optionName + " (Whitelist File)" + ); + whitelistB = true; + } + bool blacklistB = false; + std::unique_ptr blacklist; + if(blacklistFile.second) { + blacklist = loadFileOfStrings( + blacklistFile.first, + optionName + " (Blacklist File)" + ); + blacklistB = true; + } + + std::unique_ptr out(new OptionalVectorOfInts); + if(whitelistB || blacklistB) { + // Load specs and enforce whitelis/blacklist + VectorOfStrings spec; + if(!specFile.second) { + throw InvalidArgumentError("Unable To Load File", optionName + " (Spec File, required if whitelist/blacklist provided)", "null"); + } + std::ifstream file(specFile.first); + if(!file) { + throw InvalidArgumentError("Unable To Load File", optionName + " (Spec File, required if whitelist/blacklist provided)", specFile.first); + } + std::string read; + while(std::getline(file, read)) + { + if(fileType == WhitelistBlacklistFileType::tab_second_col) { + VectorOfStrings sep; + boost::split(sep, read, boost::is_any_of("\t"), boost::token_compress_on); + + spec.push_back(sep[1]); + } else { + spec.push_back(read); + } + } + + out->second = true; + for(unsigned int at = 0; at < spec.size(); at++) { + if(whitelistB && std::find(whitelist->begin(), whitelist->end(), spec[at]) == whitelist->end()) { + continue; + } + if(blacklistB && std::find(blacklist->begin(), blacklist->end(), spec[at]) != blacklist->end()) { + continue; + } + + out->first.push_back(at); + } + } else { + // Allow all of the data by default + out->second = false; + } + + return out; +} + diff --git a/src/DataUtils.h b/src/DataUtils.h new file mode 100644 index 0000000..34d58d7 --- /dev/null +++ b/src/DataUtils.h @@ -0,0 +1,88 @@ +/* + * DataUtils.h + * + * Created on: Oct 11, 2017 + * Author: danielruskin + */ + +#ifndef SRC_DATAUTILS_H_ +#define SRC_DATAUTILS_H_ + +#include "InvalidArgumentError.h" +#include "InputOutputOptions.h" +#include "Utils.h" + +#include +#include +#include +#include +#include +#include +#include +#include "IndividualInfoContainers.h" + +enum CovariateType { categorical, quantitative }; + +// Loading Data +void loadPhen(const InputOutputOptions& inputOutputOptions, + const IndividualInfoSet& individualInfoSet, + std::unique_ptr& outMatrix, + std::unique_ptr& outIndvs, + std::unique_ptr& outRemovedIndvs, + std::unique_ptr& outIgnoredIndvs); +void loadPhenRaw(const InputOutputOptions& inputOutputOptions, std::unique_ptr& outMatrix, std::unique_ptr& outIndvs); + +void loadCov(const InputOutputOptions& inputOutputOptions, + const IndividualInfoSet& individualInfoSet, + CovariateType covariateType, + std::unique_ptr& outMatrix, + std::unique_ptr& outIndvs, + std::unique_ptr& outRemovedIndvs, + std::unique_ptr& outIgnoredIndvs); +void loadCCovRaw(const InputOutputOptions& inputOutputOptions, std::unique_ptr& outMatrix, std::unique_ptr& outIndvs); +int parseCategoricalValue(const std::string& category, UnorderedStringIntMap& categories, int& maxVal); +void loadQCovRaw(const InputOutputOptions& inputOutputOptions, std::unique_ptr& outMatrix, std::unique_ptr& outIndvs); + +void loadGivenGRM(const InputOutputOptions& inputOutputOptions, + const IndividualInfoSet& individualInfoSet, + std::unique_ptr& outMatrix, + std::unique_ptr& outIndvs, + std::unique_ptr& outRemovedIndvs, + std::unique_ptr& outIgnoredIndvs); + +void loadGeno(const InputOutputOptions& inputOutputOptions, + const IndividualInfoSet& individualInfoSet, + std::unique_ptr& outMatrix, + std::unique_ptr& outMissing, + std::unique_ptr& outGenders, + std::unique_ptr& outIndvs, + std::unique_ptr& outRemovedIndvs, + std::unique_ptr& outIgnoredIndvs); +void loadGenoRaw(const InputOutputOptions& inputOutputOptions, std::unique_ptr& outMatrix, std::unique_ptr& outMissing, std::unique_ptr& outGenders, std::unique_ptr& outIndvs); + +void loadChrFromBimFile(const InputOutputOptions& inputOutputOptions, std::unique_ptr& outVec); +void loadTraitFromFile(const InputOutputOptions& inputOutputOptions, std::unique_ptr& outMat); +void loadLambdaValuesFromFile(const InputOutputOptions& inputOutputOptions, std::unique_ptr>& outVec); +void loadCoefCnstFromFile(const InputOutputOptions& inputOutputOptions, std::unique_ptr>& outVec); + +void loadIndividualsPhen(const InputOutputOptions& options, std::unique_ptr& outIndvs); +void loadIndividualsGeno(const InputOutputOptions& options, std::unique_ptr& outIndvs, std::unique_ptr& outGenders); +void loadIndividualsKinship(const InputOutputOptions& options, std::unique_ptr& outIndvs); +void loadIndividualsPed(const InputOutputOptions& options, std::unique_ptr& outIndvs); + +// Utils +int linesInFile(const std::string& fileName, const std::string& argName); +std::unique_ptr loadFileOfStrings(const std::string& fileName, const std::string& argName); +std::unique_ptr loadFileOfDoubles(const std::string& fileName, const std::string& argName); +std::unique_ptr loadFileOfDoublesToVec(const std::string& fileName, const std::string& argName); +void filterMatrix(const IndividualInfoSet& dataSetAIndvs, const arma::mat& dataSetB, const IndividualInfoSet& dataSetBIndvs, std::unique_ptr& outDataSetC, std::unique_ptr& outDataSetCIndvs, std::unique_ptr& outRemovedIndvs, std::unique_ptr& outIgnoredIndvs); +void filterMatrixCategorizer(const IndividualInfoSet& dataSetAIndvs, const IndividualInfoSet& dataSetBIndvs, std::unique_ptr& outDataSetBToDataSetC, std::unique_ptr& outDataSetCIndvs, std::unique_ptr& outRemovedIndvs, std::unique_ptr& outIgnoredIndvs); +void saveIndvListToFile(const std::string& fileName, const IndividualInfoSet& indvs); + +enum WhitelistBlacklistFileType { + full_row, + tab_second_col +}; +std::unique_ptr enforceWhitelistBlacklist(const OptionalString& specFile, WhitelistBlacklistFileType fileType, const OptionalString& whitelistFile, const OptionalString& blacklistFile, const std::string& optionName); + +#endif /* SRC_DATAUTILS_H_ */ diff --git a/src/GenoLoader.cpp b/src/GenoLoader.cpp new file mode 100644 index 0000000..50393bc --- /dev/null +++ b/src/GenoLoader.cpp @@ -0,0 +1,149 @@ +/* + * GenoLoader.cpp + * + * Created on: Oct 24, 2017 + * Author: danielruskin + */ + +#include "GenoLoader.h" + +/* + * Constructs a genotype loader. + */ +GenoLoader::GenoLoader(std::shared_ptr newOptions, const IndividualInfoSet& requestedIndvs) { + // Misc flags + options = newOptions; + done_loading = false; + snp_at = 0; + + /* Load and validate BED file */ + source_file.open(options->genoBedFile()->first); + if(!source_file) { + throw InvalidArgumentError("Unable To Load File", "BED File", options->genoBedFile()->first); + } + char * memblock = new char [3]; + source_file.read(memblock, 3); + if(memblock[0] == 108 && memblock[1] == 27) { // "magic" numbers at beginning of .bed file + if(memblock[2] != 1) { + throw InvalidArgumentError("Data is not in SNP-major mode.", "BED file", options->genoBedFile()->first); + } + } else { + throw InvalidArgumentError("Invalid data file.", "BED file", options->genoBedFile()->first); + } + + /* Enforce whitelist/blacklist */ + // Load geno spec and enforce whitelist/blacklist + geno_to_include = enforceWhitelistBlacklist(*options->genoBimFile(), WhitelistBlacklistFileType::tab_second_col, *options->genoWhitelistFile(), *options->genoBlacklistFile(), "Genotype File"); + + /* Individual filtering */ + std::unique_ptr inputIndvs; + std::unique_ptr gendersTemp; + std::unique_ptr indvsTemp; + std::unique_ptr removedIndvsTemp; + std::unique_ptr ignoredIndvsTemp; + loadIndividualsGeno(*options, inputIndvs, gendersTemp); + filterMatrixCategorizer(requestedIndvs, *inputIndvs, bimToOutMatMapping, indvsTemp, removedIndvsTemp, ignoredIndvsTemp); + + // Remove deleted indvs from gender data. + // Deleted indvs will be removed from the actual SNP data when we fetch it (see fetchSnps). + VectorOfInts keptRows(bimToOutMatMapping->size()); + for(UnorderedIntIntMap::iterator iter = bimToOutMatMapping->begin(); iter != bimToOutMatMapping->end(); iter++) { + keptRows[iter->second] = iter->first; + } + _genders.reset(new arma::colvec(gendersTemp->rows(arma::conv_to::from(keptRows)))); + + _indvs = std::move(indvsTemp); + removed_indvs = std::move(removedIndvsTemp); + ignored_indvs = *ignoredIndvsTemp; +} + +/* + * Reads requested number of SNPs, and populates the two arguments (outMat with the SNPs, outMissingVal with the number of missing vals per indv/SNP). + * If less than count SNPs are available, the remaining number of SNPs is returned, and the done flag is set to true. + * Note that the done flag is ONLY set to true once the method fails to retrieve an additional SNP. + */ +void GenoLoader::fetchSnps(int count, std::unique_ptr& outMat, std::unique_ptr& outMissingVal) { + outMat.reset(new arma::mat(bimToOutMatMapping->size(), count)); + outMissingVal.reset(new arma::mat(bimToOutMatMapping->size(), count)); + + int snpLoc = 0; + while(snpLoc < count) { + // Only count this against the "count" if we are including it in the data. + // We include if there is no whitelist (->second is false), or if this gene is whitelisted. + bool include_in_data = !geno_to_include->second || (std::find(geno_to_include->first.begin(), geno_to_include->first.end(), snp_at) != geno_to_include->first.end()); + + std::unique_ptr snpV; + std::unique_ptr snpMissingVal; + readSNP(snpV, snpMissingVal); + if(done_loading) { + break; + } else { + ++snp_at; + } + + if(include_in_data) { + outMat->col(snpLoc) = *snpV; + outMissingVal->col(snpLoc) = *snpMissingVal; + ++snpLoc; + } + } + + // If we read less SNPs than the original matrix size + if(snpLoc < outMat->n_cols) { + outMat->shed_cols(snpLoc, outMat->n_cols - 1); + outMissingVal->shed_cols(snpLoc, outMissingVal->n_cols - 1); + } +} + +/* + * Method meant for internal use only. Reads an SNP from the data file. + */ +void GenoLoader::readSNP(std::unique_ptr& outM, std::unique_ptr& outMissingVal) { + outM.reset(new arma::colvec(bimToOutMatMapping->size())); + outMissingVal.reset(new arma::colvec(bimToOutMatMapping->size())); + + char * memblock = new char [3]; + int indLoc = 0; + int totalIndInFile = bimToOutMatMapping->size() + ignored_indvs; + + while(indLoc < totalIndInFile) { + // Fetch next data block + source_file.read(memblock, 1); + if(source_file.eof()) { + if(indLoc == 0) { + // This is the first indv of a new SNP, so we ran out of SNPs to look at. + done_loading = true; + return; + } else { + throw InvalidArgumentError("Invalid data file.", "BED file", options->genoBedFile()->first); + } + } + + // Parse next + std::bitset<8> b = memblock[0]; + int bitIndex = 0; + while(bitIndex < 7 && indLoc < totalIndInFile) { + bool b2 = !b[bitIndex++]; + bool b1 = !b[bitIndex++]; + + UnorderedIntIntMap::iterator indLocForMatIter = bimToOutMatMapping->find(indLoc); + if(indLocForMatIter != bimToOutMatMapping->end()) { + int indLocForMat = indLocForMatIter->second; + + if(!b1 || b2) { + (*outMissingVal)(indLocForMat) = 0; + + double snpVal = b1 + b2; + (*outM.get())(indLocForMat) = snpVal; + } + else { + (*outMissingVal)(indLocForMat) = 1; + + (*outM.get())(indLocForMat) = 1e6; // TODO: remove this, maybe we don't need the 1e6 construct anymore + } + } + + indLoc++; + } + } +} diff --git a/src/GenoLoader.h b/src/GenoLoader.h new file mode 100644 index 0000000..07c8f84 --- /dev/null +++ b/src/GenoLoader.h @@ -0,0 +1,63 @@ +/* + * GenoLoader.h + * + * Created on: Oct 24, 2017 + * Author: danielruskin + */ + +#ifndef SRC_GENOLOADER_H_ +#define SRC_GENOLOADER_H_ + +#include "Utils.h" +#include "DataUtils.h" +#include "InputOutputOptions.h" + +#include +#include +#include +#include +#include +#include + +class GenoLoader { +public: + GenoLoader(std::shared_ptr options, const IndividualInfoSet& requestedIndvs); + void fetchSnps(int count, std::unique_ptr& outMat, std::unique_ptr& outMissingVal); + + bool doneLoading() const { + return done_loading; + } + int lastLoadedSnp() const { // -1 if none loaded + return snp_at - 1; + } + std::shared_ptr indvs() const { + return makeSharedPtrConst(_indvs); + } + std::shared_ptr removedIndvs() const { + return makeSharedPtrConst(removed_indvs); + } + int ignoredIndvs() const { + return ignored_indvs; + } + std::shared_ptr genders() const { + return makeSharedPtrConst(_genders); + } +private: + std::shared_ptr options; + std::ifstream source_file; + std::unique_ptr geno_to_include; + + std::shared_ptr _indvs; + std::shared_ptr removed_indvs; + int ignored_indvs; + + std::shared_ptr _genders; + std::unique_ptr bimToOutMatMapping; + + bool done_loading; + int snp_at; + + void readSNP(std::unique_ptr& outM, std::unique_ptr& outMissingVal); +}; + +#endif /* SRC_GENOLOADER_H_ */ diff --git a/src/GivenKinship.cpp b/src/GivenKinship.cpp deleted file mode 100644 index cb533b6..0000000 --- a/src/GivenKinship.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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 deleted file mode 100644 index c07cbc8..0000000 --- a/src/GivenKinship.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 deleted file mode 100644 index 0b279d1..0000000 --- a/src/H2rEst.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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/H2rOptions.cpp b/src/H2rOptions.cpp new file mode 100644 index 0000000..ec2c5a1 --- /dev/null +++ b/src/H2rOptions.cpp @@ -0,0 +1,13 @@ +/* + * H2rOptions.cpp + * + * Created on: Oct 10, 2017 + * Author: danielruskin + */ + +#include "H2rOptions.h" + +H2rOptions::H2rOptions(const UnorderedStringStringMap& opts) { + max_iterations = parseIntOption(opts, "h2r_max_iterations", defaultInt(1000)); +} + diff --git a/src/H2rOptions.h b/src/H2rOptions.h new file mode 100644 index 0000000..66d3b7d --- /dev/null +++ b/src/H2rOptions.h @@ -0,0 +1,27 @@ +/* + * H2rOptions.h + * + * Created on: Oct 10, 2017 + * Author: danielruskin + */ + +#ifndef SRC_H2ROPTIONS_H_ +#define SRC_H2ROPTIONS_H_ + +#include +#include +#include "Utils.h" +#include "OptionsUtils.h" + +class H2rOptions { +public: + H2rOptions(const UnorderedStringStringMap& opts); + + std::shared_ptr< const OptionalInt > maxIterations() const { + return makeSharedPtrConst(max_iterations); + } +private: + std::shared_ptr max_iterations; +}; + +#endif /* SRC_H2ROPTIONS_H_ */ diff --git a/src/Hca.h b/src/Hca.h deleted file mode 100644 index 0721084..0000000 --- a/src/Hca.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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/HcaOptions.cpp b/src/HcaOptions.cpp new file mode 100644 index 0000000..ea54851 --- /dev/null +++ b/src/HcaOptions.cpp @@ -0,0 +1,22 @@ +/* + * HcaOptions.cpp + * + * Created on: Oct 10, 2017 + * Author: danielruskin + */ + +#include "HcaOptions.h" + +HcaOptions::HcaOptions(const UnorderedStringStringMap& opts) { + max_iterations = parseIntOption(opts, "hca_max_iterations", defaultInt(1000)); + + cv_folds = parseIntOption(opts, "hca_cv_folds", defaultInt(1)); + cv_repeats = parseIntOption(opts, "hca_cv_repeats", defaultInt(1)); + + auto_lambda = parseBoolOption(opts, "hca_auto_lambda", defaultNullBool()); + lambda_start = parseDoubleOption(opts, "hca_lambda_start", defaultNullDouble()); + lambda_end = parseDoubleOption(opts, "hca_lambda_end", defaultNullDouble()); + lambda_incr = parseDoubleOption(opts, "hca_lambda_incr", defaultNullDouble()); + + gr_cutoff = parseDoubleOption(opts, "hca_gr_cutoff", defaultNullDouble()); +} diff --git a/src/HcaOptions.h b/src/HcaOptions.h new file mode 100644 index 0000000..e0a7b30 --- /dev/null +++ b/src/HcaOptions.h @@ -0,0 +1,61 @@ +/* + * HcaOptions.h + * + * Created on: Oct 10, 2017 + * Author: danielruskin + */ + +#ifndef SRC_HCAOPTIONS_H_ +#define SRC_HCAOPTIONS_H_ + +#include +#include +#include "Utils.h" +#include "OptionsUtils.h" + +class HcaOptions { +public: + HcaOptions(const UnorderedStringStringMap& opts); + + std::shared_ptr maxIterations() const { + return makeSharedPtrConst(max_iterations); + } + + std::shared_ptr cvFolds() const { + return makeSharedPtrConst(cv_folds); + } + std::shared_ptr cvRepeats() const { + return makeSharedPtrConst(cv_repeats); + } + + std::shared_ptr autoLambda() const { + return makeSharedPtrConst(auto_lambda); + } + std::shared_ptr lambdaStart() const { + return makeSharedPtrConst(lambda_start); + } + std::shared_ptr lambdaEnd() const { + return makeSharedPtrConst(lambda_end); + } + std::shared_ptr lambdaIncr() const { + return makeSharedPtrConst(lambda_incr); + } + + std::shared_ptr grCutoff() const { + return makeSharedPtrConst(gr_cutoff); + } +private: + std::shared_ptr max_iterations; + + std::shared_ptr cv_folds; + std::shared_ptr cv_repeats; + + std::shared_ptr auto_lambda; + std::shared_ptr lambda_start; + std::shared_ptr lambda_end; + std::shared_ptr lambda_incr; + + std::shared_ptr gr_cutoff; +}; + +#endif /* SRC_HCAOPTIONS_H_ */ diff --git a/src/IndividualData.cpp b/src/IndividualData.cpp deleted file mode 100644 index 0ccae13..0000000 --- a/src/IndividualData.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - * 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 deleted file mode 100644 index 38c8925..0000000 --- a/src/IndividualData.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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 deleted file mode 100644 index cab7b83..0000000 --- a/src/IndividualDataSet.cpp +++ /dev/null @@ -1,505 +0,0 @@ -/* - * 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 deleted file mode 100644 index 0ea5e7c..0000000 --- a/src/IndividualDataSet.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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 - -#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/IndividualInfo.cpp b/src/IndividualInfo.cpp new file mode 100644 index 0000000..43edc81 --- /dev/null +++ b/src/IndividualInfo.cpp @@ -0,0 +1,28 @@ +/* + * IndividualInfo.cpp + * + * Created on: Oct 11, 2017 + * Author: danielruskin + */ + +#include "IndividualInfo.h" + +IndividualInfo::IndividualInfo(const std::string& new_family_id, const std::string& new_individual_id) + : family_id(new_family_id), individual_id(new_individual_id) {} + +bool IndividualInfo::operator==(const IndividualInfo& other) const { + return familyId() == other.familyId() && individualId() == other.individualId(); +} + +bool IndividualInfo::operator!=(const IndividualInfo& other) const { + return !(*this == other); +} + +std::size_t IndividualInfo::customHash() const { + std::size_t seed = 0; + + boost::hash_combine(seed, family_id); + boost::hash_combine(seed, individual_id); + + return seed; +} diff --git a/src/IndividualInfo.h b/src/IndividualInfo.h new file mode 100644 index 0000000..48d5c94 --- /dev/null +++ b/src/IndividualInfo.h @@ -0,0 +1,36 @@ +/* + * IndividualInfo.h + * + * Created on: Oct 11, 2017 + * Author: danielruskin + */ + +#ifndef SRC_INDIVIDUALINFO_H_ +#define SRC_INDIVIDUALINFO_H_ + +#include +#include +#include +#include "Utils.h" + +class IndividualInfo { +public: + IndividualInfo(const std::string& new_family_id, const std::string& new_individual_id); + + bool operator==(const IndividualInfo& other) const; + bool operator!=(const IndividualInfo& other) const; + + std::size_t customHash() const; + + const std::string& familyId() const { + return family_id; + } + const std::string& individualId() const { + return individual_id; + } +private: + std::string family_id; + std::string individual_id; +}; + +#endif /* SRC_INDIVIDUALINFO_H_ */ diff --git a/src/IndividualInfoContainers.h b/src/IndividualInfoContainers.h new file mode 100644 index 0000000..90c7f66 --- /dev/null +++ b/src/IndividualInfoContainers.h @@ -0,0 +1,31 @@ +/* + * IndividualInfoContainers.h + * + * Created on: Oct 11, 2017 + * Author: danielruskin + */ + +#ifndef SRC_INDIVIDUALINFOCONTAINERS_H_ +#define SRC_INDIVIDUALINFOCONTAINERS_H_ + +#include "IndividualInfo.h" +#include +#include + +struct IndividualInfoPtrHash { + std::size_t operator()(const std::shared_ptr& k) const { + return k->customHash(); + } +}; + +struct IndividualInfoPtrEql { + bool operator()(const std::shared_ptr& a, const std::shared_ptr& b) const { + return *a == *b; + } +}; + +typedef std::shared_ptr IndividualInfoPtr; +typedef std::vector IndividualInfoSet; +typedef std::unordered_map IndividualInfoMap; + +#endif /* SRC_INDIVIDUALINFOCONTAINERS_H_ */ diff --git a/src/InputOutputOptions.cpp b/src/InputOutputOptions.cpp new file mode 100644 index 0000000..b03ebe1 --- /dev/null +++ b/src/InputOutputOptions.cpp @@ -0,0 +1,51 @@ +/* + * InputOutputOptions.cpp + * + * Created on: Oct 9, 2017 + * Author: danielruskin + */ + +#include "InputOutputOptions.h" + +const std::unordered_map InputOutputOptions::KINSHIP_SOURCE_MAPPING = { + {"pregiven", KinshipSource::pregiven}, + {"snp", KinshipSource::snp} +}; + +InputOutputOptions::InputOutputOptions(const UnorderedStringStringMap& opts) { + kinship_src = parseEnumOption(opts, "kinship_src", KINSHIP_SOURCE_MAPPING, defaultEnum(KinshipSource::unspecified)); + + indv_whitelist_file = parseStringOption(opts, "indv_whitelist_file", defaultNullString()); + indv_blacklist_file = parseStringOption(opts, "indv_blacklist_file", defaultNullString()); + + c_cov_file = parseStringOption(opts, "c_cov_file", defaultNullString()); + c_cov_spec_file = parseStringOption(opts, "c_cov_spec_file", defaultNullString()); + c_cov_whitelist_file = parseStringOption(opts, "c_cov_whitelist_file", defaultNullString()); + c_cov_blacklist_file = parseStringOption(opts, "c_cov_blacklist_file", defaultNullString()); + + q_cov_file = parseStringOption(opts, "q_cov_file", defaultNullString()); + q_cov_spec_file = parseStringOption(opts, "q_cov_spec_file", defaultNullString()); + q_cov_whitelist_file = parseStringOption(opts, "q_cov_whitelist_file", defaultNullString()); + q_cov_blacklist_file = parseStringOption(opts, "q_cov_blacklist_file", defaultNullString()); + + phen_file = parseStringOption(opts, "phen_file", defaultNullString()); + phen_spec_file = parseStringOption(opts, "phen_spec_file", defaultNullString()); + phen_whitelist_file = parseStringOption(opts, "phen_whitelist_file", defaultNullString()); + phen_blacklist_file = parseStringOption(opts, "phen_blacklist_file", defaultNullString()); + + given_kinship_file = parseStringOption(opts, "given_kinship_file", defaultNullString()); + given_kinship_id_file = parseStringOption(opts, "given_kinship_id_file", defaultNullString()); + + geno_fam_file = parseStringOption(opts, "geno_fam_file", defaultNullString()); + geno_bim_file = parseStringOption(opts, "geno_bim_file", defaultNullString()); + geno_bed_file = parseStringOption(opts, "geno_bed_file", defaultNullString()); + geno_whitelist_file = parseStringOption(opts, "geno_whitelist_file", defaultNullString()); + geno_blacklist_file = parseStringOption(opts, "geno_blacklist_file", defaultNullString()); + + trait_file = parseStringOption(opts, "trait_file", defaultNullString()); + coef_file = parseStringOption(opts, "coef_file", defaultNullString()); + + hca_lambda_values_file = parseStringOption(opts, "hca_lambda_values_file", defaultNullString()); + + output_file_prefix = parseStringOption(opts, "output_file_prefix", defaultString("")); +} diff --git a/src/InputOutputOptions.h b/src/InputOutputOptions.h new file mode 100644 index 0000000..c3c1c0c --- /dev/null +++ b/src/InputOutputOptions.h @@ -0,0 +1,152 @@ +/* + * InputOutputOptions.h + * + * Created on: Oct 9, 2017 + * Author: danielruskin + */ + +#ifndef SRC_INPUTOUTPUTOPTIONS_H_ +#define SRC_INPUTOUTPUTOPTIONS_H_ + +#include +#include +#include "Utils.h" +#include "OptionsUtils.h" +#include +#include +#include + +enum KinshipSource { pregiven, snp, unspecified }; + +class InputOutputOptions { +public: + InputOutputOptions(const UnorderedStringStringMap& opts); + + const static std::unordered_map KINSHIP_SOURCE_MAPPING; + + std::shared_ptr< const OptionalEnumStruct::type > kinshipSrc() const { + return makeSharedPtrConst< const OptionalEnumStruct::type >(kinship_src); + } + + std::shared_ptr indvWhitelistFile() const { + return makeSharedPtrConst(indv_whitelist_file); + } + std::shared_ptr indvBlacklistFile() const { + return makeSharedPtrConst(indv_blacklist_file); + } + + std::shared_ptr cCovFile() const { + return makeSharedPtrConst(c_cov_file); + } + std::shared_ptr cCovSpecFile() const { + return makeSharedPtrConst(c_cov_spec_file); + } + std::shared_ptr cCovWhitelistFile() const { + return makeSharedPtrConst(c_cov_whitelist_file); + } + std::shared_ptr cCovBlacklistFile() const { + return makeSharedPtrConst(c_cov_blacklist_file); + } + + std::shared_ptr qCovFile() const { + return makeSharedPtrConst(q_cov_file); + } + std::shared_ptr qCovSpecFile() const { + return makeSharedPtrConst(q_cov_spec_file); + } + std::shared_ptr qCovWhitelistFile() const { + return makeSharedPtrConst(q_cov_whitelist_file); + } + std::shared_ptr qCovBlacklistFile() const { + return makeSharedPtrConst(q_cov_blacklist_file); + } + + std::shared_ptr phenFile() const { + return makeSharedPtrConst(phen_file); + } + std::shared_ptr phenSpecFile() const { + return makeSharedPtrConst(phen_spec_file); + } + std::shared_ptr phenWhitelistFile() const { + return makeSharedPtrConst(phen_whitelist_file); + } + std::shared_ptr phenBlacklistFile() const { + return makeSharedPtrConst(phen_blacklist_file); + } + + std::shared_ptr givenKinshipFile() const { + return makeSharedPtrConst(given_kinship_file); + } + std::shared_ptr givenKinshipIdFile() const { + return makeSharedPtrConst(given_kinship_id_file); + } + + std::shared_ptr genoFamFile() const { + return makeSharedPtrConst(geno_fam_file); + } + std::shared_ptr genoBimFile() const { + return makeSharedPtrConst(geno_bim_file); + } + std::shared_ptr genoBedFile() const { + return makeSharedPtrConst(geno_bed_file); + } + std::shared_ptr genoWhitelistFile() const { + return makeSharedPtrConst(geno_whitelist_file); + } + std::shared_ptr genoBlacklistFile() const { + return makeSharedPtrConst(geno_blacklist_file); + } + + std::shared_ptr traitFile() const { + return makeSharedPtrConst(trait_file); + } + std::shared_ptr coefFile() const { + return makeSharedPtrConst(coef_file); + } + + std::shared_ptr hcaLambdaValuesFile() const { + return makeSharedPtrConst(hca_lambda_values_file); + } + + std::shared_ptr outputFilePrefix() const { + return makeSharedPtrConst(output_file_prefix); + } +private: + std::shared_ptr< OptionalEnumStruct::type > kinship_src; + + std::shared_ptr indv_whitelist_file; + std::shared_ptr indv_blacklist_file; + + std::shared_ptr c_cov_file; + std::shared_ptr c_cov_spec_file; + std::shared_ptr c_cov_whitelist_file; + std::shared_ptr c_cov_blacklist_file; + + std::shared_ptr q_cov_file; + std::shared_ptr q_cov_spec_file; + std::shared_ptr q_cov_whitelist_file; + std::shared_ptr q_cov_blacklist_file; + + std::shared_ptr phen_file; + std::shared_ptr phen_spec_file; + std::shared_ptr phen_whitelist_file; + std::shared_ptr phen_blacklist_file; + + std::shared_ptr given_kinship_file; + std::shared_ptr given_kinship_id_file; + + std::shared_ptr geno_fam_file; + std::shared_ptr geno_bim_file; + std::shared_ptr geno_bed_file; + std::shared_ptr geno_whitelist_file; + std::shared_ptr geno_blacklist_file; + + std::shared_ptr trait_file; + std::shared_ptr coef_file; + + std::shared_ptr hca_lambda_values_file; + + std::shared_ptr output_file_prefix; +}; + +#endif /* SRC_INPUTOUTPUTOPTIONS_H_ */ diff --git a/src/InvalidArgumentError.cpp b/src/InvalidArgumentError.cpp new file mode 100644 index 0000000..3ca6eef --- /dev/null +++ b/src/InvalidArgumentError.cpp @@ -0,0 +1,26 @@ +/* + * InvalidArgumentError.cpp + * + * Created on: Oct 11, 2017 + * Author: danielruskin + */ + +#include "InvalidArgumentError.h" +#include +#include +#include + +InvalidArgumentError::InvalidArgumentError(std::string message, std::string newArgumentName, std::string newArgumentValue) + : runtime_error(message), argumentName(newArgumentName), argumentValue(newArgumentValue) {} + +const char* InvalidArgumentError::what() const throw() +{ + std::string result = "Invalid Argument Error.\nArgument Name: " + argumentName + + "\nArgument Value: " + argumentValue + + "\nMessage: " + runtime_error::what(); + + char * cstr = new char [result.length()+1]; + std::strcpy(cstr, result.c_str()); + + return cstr; +} diff --git a/src/InvalidArgumentError.h b/src/InvalidArgumentError.h new file mode 100644 index 0000000..e274792 --- /dev/null +++ b/src/InvalidArgumentError.h @@ -0,0 +1,23 @@ +/* + * InvalidArgumentError.h + * + * Created on: Oct 11, 2017 + * Author: danielruskin + */ + +#ifndef SRC_INVALIDARGUMENTERROR_H_ +#define SRC_INVALIDARGUMENTERROR_H_ + +#include +#include + +class InvalidArgumentError : public std::runtime_error { +public: + InvalidArgumentError(std::string message, std::string newArgumentName, std::string newArgumentValue); + virtual const char* what() const throw(); +private: + std::string argumentName; + std::string argumentValue; +}; + +#endif /* SRC_INVALIDARGUMENTERROR_H_ */ diff --git a/src/Kinship.cpp b/src/Kinship.cpp deleted file mode 100644 index 8f44c49..0000000 --- a/src/Kinship.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#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 deleted file mode 100644 index 42e7e04..0000000 --- a/src/Kinship.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 index 7a60bf2..b04f6df 100644 --- a/src/Makefile_linux +++ b/src/Makefile_linux @@ -1,51 +1,20 @@ -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: - +CC := g++-5 +CFLAGS := -I/opt/OpenBLAS/include -I/opt/OpenBLAS/include -fopenmp -std=c++0x -DARMA_DONT_USE_WRAPPER -DARMA_USE_LAPACK -DARMA_USE_BLAS +LFLAGS := -L/opt/OpenBLAS/lib -L/opt/OpenBLAS/lib -fopenmp -static +LIBS := -llapack -lgfortran -lquadmath -lopenblas -lnlopt -lboost_system -lboost_log_setup -lboost_log -lboost_date_time -lboost_thread -lboost_filesystem +TARGET := hca + +# $(wildcard *.cpp /xxx/xxx/*.cpp): get all .cpp files from the current directory and dir "/xxx/xxx/" +SRCS := $(wildcard *.cpp) +# $(patsubst %.cpp,%.o,$(SRCS)): substitute all ".cpp" file name strings to ".o" file name strings +OBJS := $(patsubst %.cpp,%.o,$(SRCS)) + +all: $(TARGET) +$(TARGET): $(OBJS) + $(CC) ${LFLAGS} -o $@ $^ ${LIBS} +%.o: %.cpp + $(CC) $(CFLAGS) -c $< clean: - rm -f *.o + rm -rf $(TARGET) *.o + +.PHONY: all clean diff --git a/src/Makefile_osx b/src/Makefile_osx deleted file mode 100644 index e43d2ec..0000000 --- a/src/Makefile_osx +++ /dev/null @@ -1,51 +0,0 @@ -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 deleted file mode 100644 index 613a442..0000000 --- a/src/Option.cpp +++ /dev/null @@ -1,295 +0,0 @@ -#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/OptionsUtils.cpp b/src/OptionsUtils.cpp new file mode 100644 index 0000000..9d8473a --- /dev/null +++ b/src/OptionsUtils.cpp @@ -0,0 +1,62 @@ +/* + * OptionsUtils.cpp + * + * Created on: Oct 9, 2017 + * Author: danielruskin + */ + +#include "OptionsUtils.h" + +std::unique_ptr parseStringOption(const UnorderedStringStringMap& opts, const std::string& key, std::unique_ptr defaultVal) { + auto holder = opts.find(key); + if(holder != opts.end()) { + return std::unique_ptr( + new OptionalString(holder->second, true) + ); + } + return defaultVal; +} + +std::unique_ptr parseBoolOption(const UnorderedStringStringMap& opts, const std::string& key, std::unique_ptr defaultVal) { + auto holder = opts.find(key); + if(holder != opts.end()) { + if(holder->second == "true") { + return std::unique_ptr( + new OptionalBool(true, true) + ); + } else if(holder->second == "false") { + return std::unique_ptr( + new OptionalBool(false, true) + ); + } + } + return defaultVal; +} + +std::unique_ptr parseIntOption(const UnorderedStringStringMap& opts, const std::string& key, std::unique_ptr defaultVal) { + auto holder = opts.find(key); + if(holder != opts.end()) { + try { + return std::unique_ptr( + new OptionalInt(boost::lexical_cast(holder->second), true) + ); + } catch(const boost::bad_lexical_cast& e) { + throw InvalidArgumentError("Argument Not An Integer", key, holder->second); + } + } + return defaultVal; +} + +std::unique_ptr parseDoubleOption(const UnorderedStringStringMap& opts, const std::string& key, std::unique_ptr defaultVal) { + auto holder = opts.find(key); + if(holder != opts.end()) { + try { + return std::unique_ptr( + new OptionalDouble(boost::lexical_cast(holder->second), true) + ); + } catch(const boost::bad_lexical_cast& e) { + throw InvalidArgumentError("Argument Not A Double", key, holder->second); + } + } + return defaultVal; +} diff --git a/src/OptionsUtils.h b/src/OptionsUtils.h new file mode 100644 index 0000000..e73e8be --- /dev/null +++ b/src/OptionsUtils.h @@ -0,0 +1,96 @@ +/* + * OptionsUtils.h + * + * Created on: Oct 9, 2017 + * Author: danielruskin + */ + +#ifndef SRC_OPTIONSUTILS_H_ +#define SRC_OPTIONSUTILS_H_ + +#include "InvalidArgumentError.h" + +#include "Utils.h" +#include +#include +#include +#include + +template +struct OptionalEnumStruct +{ + typedef std::pair type; +}; + +inline std::unique_ptr defaultInt(int a) { + std::unique_ptr ptr(new OptionalInt(a, true)); + return ptr; +} +inline std::unique_ptr defaultNullInt() { + std::unique_ptr ptr(new OptionalInt(-1, false)); + return ptr; +} +inline std::unique_ptr defaultDouble(double a) { + std::unique_ptr ptr(new OptionalDouble(a, true)); + return ptr; +} +inline std::unique_ptr defaultNullDouble() { + std::unique_ptr ptr(new OptionalDouble(-1.0, false)); + return ptr; +} +inline std::unique_ptr defaultString(const std::string& str) { + std::unique_ptr ptr(new OptionalString(str, true)); + return ptr; +} +inline std::unique_ptr defaultNullString() { + std::unique_ptr ptr(new OptionalString("", false)); + return ptr; +} +inline std::unique_ptr defaultBool(bool b) { + std::unique_ptr ptr(new OptionalBool(b, true)); + return ptr; +} +inline std::unique_ptr defaultNullBool() { + std::unique_ptr ptr(new OptionalBool(false, false)); + return ptr; +} +template +inline std::unique_ptr< typename OptionalEnumStruct::type > defaultEnum(T e) { + std::unique_ptr< typename OptionalEnumStruct::type > ptr( + new typename OptionalEnumStruct::type(e, true) + ); + return ptr; +} + + +/* Parse a string option.*/ +std::unique_ptr parseStringOption(const UnorderedStringStringMap& opts, const std::string& key, std::unique_ptr defaultVal); + +/* Parse a bool option.*/ +std::unique_ptr parseBoolOption(const UnorderedStringStringMap& opts, const std::string& key, std::unique_ptr defaultVal); + +/* Parse an int option.*/ +std::unique_ptr parseIntOption(const UnorderedStringStringMap& opts, const std::string& key, std::unique_ptr defaultVal); + +/* Parse an double option.*/ +std::unique_ptr parseDoubleOption(const UnorderedStringStringMap& opts, const std::string& key, std::unique_ptr defaultVal); + +/* Parse an enum option.*/ +template +std::unique_ptr< typename OptionalEnumStruct::type > parseEnumOption(const UnorderedStringStringMap& opts, const std::string& key, const std::unordered_map& mapping, std::unique_ptr::type> defaultVal) { + auto holder = opts.find(key); + if(holder != opts.end()) { + auto result = mapping.find(holder->second); + + if(result == mapping.end()) { + throw InvalidArgumentError("Argument Not Valid", key, holder->second); + } else { + return std::unique_ptr< typename OptionalEnumStruct::type >( + new typename OptionalEnumStruct::type(result->second, true) + ); + } + } + return defaultVal; +} + +#endif /* SRC_OPTIONSUTILS_H_ */ diff --git a/src/ProgramOptions.cpp b/src/ProgramOptions.cpp new file mode 100644 index 0000000..8670aee --- /dev/null +++ b/src/ProgramOptions.cpp @@ -0,0 +1,28 @@ +/* + * ProgramOptions.cpp + * + * Created on: Oct 10, 2017 + * Author: danielruskin + */ + +#include "ProgramOptions.h" + +const std::unordered_map ProgramOptions::PROGRAM_COMMAND_MAPPING = { + {"hca", ProgramOptions::ProgramCommand::hca}, + {"h2r", ProgramOptions::ProgramCommand::h2r}, + {"kinship", ProgramOptions::ProgramCommand::kinship}, + {"score", ProgramOptions::ProgramCommand::score} +}; +const std::unordered_map ProgramOptions::LOG_LEVEL_MAPPING = { + {"info", log_level::info}, + {"warning", log_level::warning}, + {"debug", log_level::debug}, + {"error", log_level::error} +}; + +ProgramOptions::ProgramOptions(const UnorderedStringStringMap& opts) { + program_command = parseEnumOption(opts, "program_command", PROGRAM_COMMAND_MAPPING, defaultEnum(ProgramCommand::unspecified)); + num_threads = parseIntOption(opts, "num_threads", defaultInt(1)); + + _log_level = parseEnumOption(opts, "log_level", LOG_LEVEL_MAPPING, defaultEnum(log_level::info)); +} diff --git a/src/ProgramOptions.h b/src/ProgramOptions.h new file mode 100644 index 0000000..e33aa91 --- /dev/null +++ b/src/ProgramOptions.h @@ -0,0 +1,39 @@ +/* + * ProgramOptions.h + * + * Created on: Oct 10, 2017 + * Author: danielruskin + */ + +#ifndef SRC_PROGRAMOPTIONS_H_ +#define SRC_PROGRAMOPTIONS_H_ + +#include +#include +#include "Utils.h" +#include "OptionsUtils.h" + +class ProgramOptions { +public: + ProgramOptions(const UnorderedStringStringMap& opts); + + enum ProgramCommand { hca, h2r, kinship, score, unspecified }; + const static std::unordered_map PROGRAM_COMMAND_MAPPING; + const static std::unordered_map LOG_LEVEL_MAPPING; + + std::shared_ptr< const OptionalEnumStruct::type > programCommand() const { + return makeSharedPtrConst< const OptionalEnumStruct::type >(program_command); + } + std::shared_ptr numThreads() const { + return makeSharedPtrConst(num_threads); + } + std::shared_ptr< const OptionalEnumStruct::type > logLevel() const { + return makeSharedPtrConst< const OptionalEnumStruct::type >(_log_level); + } +private: + std::shared_ptr< OptionalEnumStruct::type > program_command; + std::shared_ptr num_threads; + std::shared_ptr< OptionalEnumStruct::type > _log_level; +}; + +#endif /* SRC_PROGRAMOPTIONS_H_ */ diff --git a/src/RemlH2rEst.cpp b/src/RemlH2rEst.cpp deleted file mode 100644 index 1985cd1..0000000 --- a/src/RemlH2rEst.cpp +++ /dev/null @@ -1,350 +0,0 @@ -/* - * 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 deleted file mode 100644 index b9d658c..0000000 --- a/src/RemlH2rEst.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 index 2cd18c4..98c5eb2 100644 --- a/src/RemlHca.cpp +++ b/src/RemlHca.cpp @@ -1,322 +1,384 @@ /* * RemlHca.cpp * - * Created on: Feb 17, 2016 - * Author: Joey + * Created on: Oct 24, 2017 + * Author: danielruskin */ #include "RemlHca.h" -//! Constructor. -RemlHca::RemlHca(Option &newOption, Data &newData) : option(newOption), data(newData) -{ +RemlHca::RemlHca(std::shared_ptr ioOptions, + std::shared_ptr snpKOptions, + std::shared_ptr hcaOptions, + std::shared_ptr h2rOptions, + std::shared_ptr programOpts, + const std::string& baseOutputFolder) { + BOOST_LOG_TRIVIAL(info) << "Performing HCA."; + + std::string outputFolder = baseOutputFolder + "hca/"; + + // Initialize data loader + std::unique_ptr indvList; + loadIndividualsPhen(*ioOptions, indvList); + std::shared_ptr indvListShared = std::move(indvList); + std::unique_ptr dl(new DataLoader(indvListShared, ioOptions)); + + // Populate data loader; save individuals that are left for analysis at the end + dl->loadData(DataLoader::DataToLoad::phen); + if(ioOptions->cCovFile()->second) { + dl->loadData(DataLoader::DataToLoad::cCov); + } + if(ioOptions->qCovFile()->second) { + dl->loadData(DataLoader::DataToLoad::qCov); + } + if(ioOptions->kinshipSrc()->first == KinshipSource::unspecified) { + throw InvalidArgumentError("No Kinship Source Provided", "Kinship Source", "null"); + } else if(ioOptions->kinshipSrc()->first == KinshipSource::pregiven) { + dl->loadData(DataLoader::DataToLoad::pregiven_grm); + } else if(ioOptions->kinshipSrc()->first == KinshipSource::snp) { + dl->loadSnpGrm(snpKOptions, programOpts, outputFolder); + } + dl->saveIndvList(outputFolder); -} + // Extract necessary data, then destroy the data loader (save space) + int numIndvs = dl->getIndvs()->size(); + std::shared_ptr cov(new arma::mat(arma::ones(numIndvs, 1))); + if(ioOptions->cCovFile()->second) { + *cov = arma::join_horiz(*cov, *dl->getData(DataLoader::DataToLoad::cCov)); + } + if(ioOptions->qCovFile()->second) { + *cov = arma::join_horiz(*cov, *dl->getData(DataLoader::DataToLoad::qCov)); + } + std::shared_ptr phen = dl->getData(DataLoader::DataToLoad::phen); + std::shared_ptr grm; + if(ioOptions->kinshipSrc()->first == KinshipSource::pregiven) { + grm = dl->getData(DataLoader::DataToLoad::pregiven_grm); + } else if(ioOptions->kinshipSrc()->first == KinshipSource::snp) { + grm = dl->getSnpGrm(); + } + dl.reset(); + + // Load lambda vals + std::shared_ptr lambdaVals; + if(ioOptions->hcaLambdaValuesFile()->second) { + std::unique_ptr lambdaValsTmp; + loadLambdaValuesFromFile(*ioOptions, lambdaValsTmp); + lambdaVals = std::move(lambdaValsTmp); + } else if(hcaOptions->lambdaIncr()->second && hcaOptions->lambdaStart()->second && hcaOptions->lambdaEnd()->second) { + int size = 1 + std::ceil((hcaOptions->lambdaStart()->first - hcaOptions->lambdaEnd()->first) / hcaOptions->lambdaIncr()->first); + lambdaVals.reset(new VectorOfDoubles(size)); + std::iota(lambdaVals->begin(), lambdaVals->end(), hcaOptions->lambdaIncr()->first); + } else { + throw InvalidArgumentError("No Lambda Values Provided for HCA", "Lambda Values", "null"); + } -//! 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); - } + // Load coef constraints + std::shared_ptr coefCnst; + if(ioOptions->coefFile()->second) { + std::unique_ptr coefCnstTmp; + loadCoefCnstFromFile(*ioOptions, coefCnstTmp); - 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; - } + coefCnst = std::move(coefCnstTmp); + if(coefCnst->size() != phen->n_cols) { + throw InvalidArgumentError("Number of coef constraints does not match number of phenotypes!", "Coef Constraints", "null"); } + } - h2rEstVec[bestIndex].saveOutput(); + // Calculate HCA. Use CV if n folds specified. + if(hcaOptions->cvFolds()->first != 1) { + calcHcaCv(outputFolder, hcaOptions, h2rOptions, lambdaVals, coefCnst, cov, phen, grm); } 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; - } - } + calcHcaNoCv(outputFolder, hcaOptions, h2rOptions, lambdaVals, coefCnst, cov, phen, grm); + } - double bestIdx = -1; - double bestAvgH2r = 0; + BOOST_LOG_TRIVIAL(info) << "Finished HCA."; +} - 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; - } - } +void RemlHca::calcHcaNoCv(const std::string& outputFolder, std::shared_ptr hcaOptions, std::shared_ptr h2rOptions, std::shared_ptr lambdaVec, std::shared_ptr coefCnst, std::shared_ptr cov, std::shared_ptr phen, std::shared_ptr grm) { + double bestScore = -1; + + for(unsigned int lambdaIter = 0; lambdaIter < lambdaVec->size(); lambdaIter++) { + double lambdaVal = (*lambdaVec)[lambdaIter]; - bestLambdaVal = data.lambdaVec[bestIdx]; + BOOST_LOG_TRIVIAL(info) << "HCA lambda " << lambdaVal << ": Performing HCA..."; - std::cout << "Performing HCA with all data and best lambda..." << std::endl; + std::unique_ptr result = trainHcaParams(hcaOptions, lambdaVal, coefCnst, *cov, *phen, *grm); - // Do HCA - std::pair result = trainWithParams(bestLambdaVal, data.individualDataSet.getPhen(-1), data.individualDataSet.getCov(-1), data.individualDataSet.getGrm(-1)); - bestTrainedW = result.first; + BOOST_LOG_TRIVIAL(info) << "HCA lambda " << lambdaVal << ": Performing H2R..."; + std::shared_ptr rh(new RemlHeritability(h2rOptions, *cov, *phen * result->weights, *grm)); + double score = rh->getVarianceResult(RemlHeritability::VarianceType::heritability_sq)->variance; - // 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(); + if(bestScore == -1 || score > bestScore) { + bestScore = score; + trained_w_heritability = rh; + trained_w = std::move(result); + best_lambda = lambdaVal; + } } - std::cout << "HCA complete! Best lambda value: " << bestLambdaVal << "!" << std::endl; + saveResult(outputFolder); } -//! 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); +void RemlHca::calcHcaCv(const std::string& outputFolder, std::shared_ptr hcaOptions, std::shared_ptr h2rOptions, std::shared_ptr lambdaVec, std::shared_ptr coefCnst, std::shared_ptr cov, std::shared_ptr phen, std::shared_ptr grm) { + int nRepeats = hcaOptions->cvRepeats()->first; + int nFolds = hcaOptions->cvFolds()->first; + + // To find the best lambda with cross validation, + // we iterate through N repeats; N folds for each repeat; and N lambdas for each fold. + // All collected results are stored in this cube. + // Once we decide on the best lambda, we will re-perform analysis with the entire data set. + // As such, this cube only stores the h^2 scores for each result (no need to keep the weights). + arma::cube scores(nRepeats, nFolds, lambdaVec->size(), arma::fill::zeros); + + for(int repeat = 0; repeat < nRepeats; repeat++) { + BOOST_LOG_TRIVIAL(info) << "HCA CV repeat " << repeat << ": Starting..."; + + BOOST_LOG_TRIVIAL(info) << "HCA CV repeat " << repeat << ": Creating folds..."; + CvPartition cvp(nFolds, phen, cov, grm); + + for(int fold = 0; fold < nFolds; fold++) { + BOOST_LOG_TRIVIAL(info) << "HCA CV repeat " << repeat << ", fold " << fold << ": Gathering data..."; + std::unique_ptr covTrain; + std::unique_ptr phenTrain; + std::unique_ptr grmTrain; + cvp.getTrainData(fold, phenTrain, covTrain, grmTrain); + + std::unique_ptr covTest; + std::unique_ptr phenTest; + std::unique_ptr grmTest; + cvp.getTestData(fold, phenTest, covTest, grmTest); + + for(unsigned int lambdaIter = 0; lambdaIter < lambdaVec->size(); lambdaIter++) { + double lambdaVal = (*lambdaVec)[lambdaIter]; + + BOOST_LOG_TRIVIAL(info) << "HCA CV repeat " << repeat << ", fold " << fold << ", lambda " << lambdaVal << ": Performing HCA..."; + + std::unique_ptr result = trainHcaParams(hcaOptions, lambdaVal, coefCnst, *covTrain, *phenTrain, *grmTrain); + + BOOST_LOG_TRIVIAL(info) << "HCA CV repeat " << repeat << ", fold " << fold << ", lambda " << lambdaVal << ": Performing H2R..."; + ScorePhen scorePhen(*phenTest, result->weights); + RemlHeritability rh(h2rOptions, *covTest, *scorePhen.result(), *grmTest); + scores(repeat, fold, lambdaIter) = rh.getVarianceResult(RemlHeritability::VarianceType::heritability_sq)->variance; + } + } + + saveCv(outputFolder, lambdaVec, repeat, scores.subcube(arma::span(repeat), arma::span::all, arma::span::all)); } - // Some helpful data - int numSubjects = phen.n_rows; - int numPhenotypicFeatures = phen.n_cols; + double bestScore = -1; + for(int lambdaIter = 0; lambdaIter < lambdaVec->size(); lambdaIter++) { + double lScore = arma::accu(scores.slice(lambdaIter)) / (nRepeats * nFolds); - // Calculate H from paper - arma::mat H = join_horiz(phen, -1 * phen); + if(bestScore == -1 || bestScore < lScore) { + bestScore = lScore; + best_lambda = (*lambdaVec)[lambdaIter]; + } + } - // 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"); + BOOST_LOG_TRIVIAL(info) << "HCA CV best lambda is: " << best_lambda << ". Re-running HCA with full data set..."; + std::unique_ptr resultTmp = trainHcaParams(hcaOptions, best_lambda, coefCnst, *cov, *phen, *grm); + trained_w = std::move(resultTmp); + + BOOST_LOG_TRIVIAL(info) << "Re-running H2R with full data set..."; + std::shared_ptr rh(new RemlHeritability(h2rOptions, *cov, *phen * trained_w->weights, *grm)); + trained_w_heritability = rh; + + saveResult(outputFolder); +} + +void RemlHca::preRunHelper(const double& lambdaVal, std::shared_ptr coefCnst, const arma::mat& cov, const arma::mat& phen, const arma::mat& grm, std::unique_ptr& outData, std::unique_ptr& outGammaInit) const { + int numSubjects = phen.n_rows; + int numPhen = phen.n_cols; + + std::unique_ptr grmInv = invertMatrixCust(grm, "GRM"); + arma::mat covTr = arma::trans(cov); + arma::mat commonTermTwo = covTr * *grmInv; + arma::mat intermediateA = commonTermTwo * cov; + std::unique_ptr commonTermThree = invertMatrixCust(intermediateA, "HCA intermediate matrix A"); // Calculate J from paper - arma::mat iMatrix(numSubjects, numSubjects); - iMatrix.eye(); - arma::mat J = iMatrix - (covFinal * commonTermThree * covTranspose * grmInv); + arma::mat J = arma::eye(numSubjects, numSubjects) - + (cov * *commonTermThree * covTr * *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; + 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 Q = (arma::trans(J) * J) / numSubjects; + + // Compose H from paper and the initial gamma + uint16_t nColH = 0; // calculate how many columns should be in H + for (int i = 0; i < numPhen; i++) { + if((*coefCnst)[i] == 1 || (*coefCnst)[i] == -1) { + nColH += 1; + } else { // no constraint + nColH += 2; + } + } + arma::mat H(numSubjects, nColH); + arma::mat gammaInitTermOne(nColH, 1); + uint16_t idx = 0; + for (uint16_t i = 0; i < numPhen; i++) { + if ((*coefCnst)[i] == 1) { + H.col(idx) = phen.col(i); + gammaInitTermOne(idx++, 0) = 1; + } + else if((*coefCnst)[i] == -1) { + H.col(idx) = -1 * phen.col(i); + gammaInitTermOne(idx++, 0) = 1; + } + else { // no constraint + // u + H.col(idx) = phen.col(i); + gammaInitTermOne(idx++, 0) = 1; + // v + H.col(idx) = -1 * phen.col(i); + gammaInitTermOne(idx++, 0) = 0; + } + } - arma::mat gammaInitTermTwo = (trans(H) * Q * H); + // Make gamma a feasible solution and save to output + arma::mat gammaInitTermTwo = (arma::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; + outGammaInit.reset(new arma::mat(gammaInitTermOne / gammaInitTermFour(0,0))); + + // Save optimize data to output + outData.reset(new OptimizeData()); + outData->numPhen = numPhen; + outData->numSub = numSubjects; + outData->lambda = lambdaVal; + outData->commonTermA.reset(new arma::mat(arma::trans(H) * P * H)); + outData->commonTermB.reset(new arma::mat(arma::trans(H) * Q * H)); +} - std::vector optimizerGammaVector; - for(unsigned int i = 0; i < gammaInitFinal.n_rows; i++) { - optimizerGammaVector.push_back(gammaInitFinal(i, 0)); +std::unique_ptr RemlHca::trainHcaParams(std::shared_ptr hcaOptions, const double& lambdaVal, std::shared_ptr coefCnst, const arma::mat& cov, const arma::mat& phen, const arma::mat& grm) const { + BOOST_LOG_TRIVIAL(debug) << "HCA iteration start."; + + if(!coefCnst) { + coefCnst.reset(new std::vector(phen.n_cols, 0.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); + std::unique_ptr data; + std::unique_ptr gammaInit; + preRunHelper(lambdaVal, coefCnst, cov, phen, grm, data, gammaInit); + + // We pass a (void *) pointer that points to a (const OptimizeData *const) pointer. + // The first is required by nlopt; the second allows us to keep this data protected from editing. + const OptimizeData *const ptrB = &(*data); + void * ptrA = (void *) ptrB; + + BOOST_LOG_TRIVIAL(debug) << "HCA iteration optimize."; + + nlopt::opt optimizer(nlopt::LD_AUGLAG, gammaInit->n_rows); + optimizer.set_maxeval(hcaOptions->maxIterations()->first); + optimizer.set_min_objective(objectiveFunction, ptrA); + optimizer.add_equality_constraint(constraintFunction, ptrA, 0.00001); optimizer.set_lower_bounds(0); - nlopt::opt optimizerLocal(nlopt::LD_SLSQP, gammaInitFinal.n_rows); + nlopt::opt optimizerLocal(nlopt::LD_SLSQP, gammaInit->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; + std::vector optimizerResultVector = optimizer.optimize( + arma::conv_to>::from(gammaInit->col(0)) + ); + + std::unique_ptr res(new HcaResult); + res->objVal = optimizer.last_optimum_value(); + res->weights.resize(phen.n_cols); + int idx = 0; // reset idx + for (uint16_t i = 0; i < phen.n_cols; i++) { + if ((*coefCnst)[i] == 1) { + res->weights(i) = optimizerResultVector[idx++]; + } else if((*coefCnst)[i] == -1) { + res->weights(i) = -1 * optimizerResultVector[idx++]; + } else { // no constraint + res->weights(i) = optimizerResultVector[idx++]; + res->weights(i) -= optimizerResultVector[idx++]; + } + } - // 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; + BOOST_LOG_TRIVIAL(debug) << "HCA iteration done. Objective value: " << res->objVal; - return std::make_pair(trainedW, resultVal); + return res; } -//! 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; - } + const OptimizeData *const fd = (const OptimizeData *const) funcData; if(!grad.empty()) { // Populate gradient - arma::mat gradMatrix = (2.0 / numSubjects) * functionValCommonTerm * xMatrix + (lambdaVal / numPhenotypicFeatures); - + arma::mat gradMatrix = (2.0 / fd->numSub) * *fd->commonTermA * xMatrix + (fd->lambda / fd->numPhen); for(unsigned int i = 0; i < xMatrix.n_rows; i++) { grad[i] = gradMatrix(i, 0); } } - double functionVal; + arma::mat functionValMatrix = + ((1.0 / fd->numSub) * (arma::trans(xMatrix) * *fd->commonTermA * xMatrix)) + + ((fd->lambda / fd->numPhen) * arma::sum(xMatrix)).eval()(0,0); - // 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; + return functionValMatrix(0,0); } -//! 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]; + const OptimizeData *const fd = (const OptimizeData *const) funcData; if(!grad.empty()) { // Populate gradient - arma::mat gradMatrix = 2 * functionValCommonTerm * xMatrix; + arma::mat gradMatrix = 2 * *fd->commonTermB * 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); + arma::mat functionValMatrix = (arma::trans(xMatrix) * *fd->commonTermB * xMatrix) - 1; - return functionVal; + return functionValMatrix(0,0); } -//! Saves output to a file. -void RemlHca::saveOutput() { - std::string fileName = option.getOutDir(); - - if(fileName.empty()) { - return; +void RemlHca::saveCv(const std::string& outputFolder, std::shared_ptr lambdaVec, int cvIter, const arma::cube& data) const { + std::string outputFolderFinal = outputFolder + "cv/"; + std::string outputFile = outputFolderFinal + "cv_" + std::to_string(cvIter) + "_result.csv"; + boost::filesystem::create_directories(outputFolderFinal); + + std::fstream file(outputFile, std::fstream::out); + file.precision(7); + file << "fold,lambda,h2" << std::endl; + for(unsigned int fold = 0; fold < data.n_cols; fold++) { + for(unsigned int lambda = 0; lambda < data.n_slices; lambda++) { + file << std::to_string(fold) << "," << std::to_string((*lambdaVec)[lambda]) << "," << data(0, fold, lambda) << std::endl; + } } - if(fileName.at(fileName.length() - 1) == '/') { - fileName = fileName + "trait_hca.csv"; - } else { - fileName = fileName + "/trait_hca.csv"; - } + for(unsigned int lambda = 0; lambda < data.n_slices; lambda++) { + double mean = arma::accu(data.slice(lambda)) / data.n_cols; + double stdVal = 0; + for(unsigned int fold = 0; fold < data.n_cols; fold++) { + stdVal += pow(data(0, fold, lambda) - mean, 2); + } + stdVal /= data.n_cols - 1; + stdVal = std::sqrt(stdVal); - bestTrainedW.save(fileName, arma::csv_ascii); + file << "mean," << std::to_string((*lambdaVec)[lambda]) << "," << std::to_string(mean) << std::endl; + file << "std," << std::to_string((*lambdaVec)[lambda]) << "," << std::to_string(stdVal) << std::endl; + } } -//! Returns the weights generated by the train function. -arma::mat& RemlHca::getBestTrainedW() { - return bestTrainedW; -} +void RemlHca::saveResult(const std::string& outputFolder) const { + boost::filesystem::create_directories(outputFolder); -//! Return the best lambda value, found by the train function. -double RemlHca::getBestLambdaVal() { - return bestLambdaVal; -} + std::fstream file(outputFolder + "weights_final.csv", std::fstream::out); + file.precision(7); + trained_w->weights.save(file, arma::csv_ascii); + trained_w_heritability->saveHeritability(outputFolder); +} diff --git a/src/RemlHca.h b/src/RemlHca.h index 20e35c5..89adf1c 100644 --- a/src/RemlHca.h +++ b/src/RemlHca.h @@ -1,47 +1,79 @@ /* * RemlHca.h * - * Created on: Feb 17, 2016 - * Author: Joey + * Created on: Oct 24, 2017 + * Author: danielruskin */ -#ifndef REMLHCA_H_ -#define REMLHCA_H_ +#ifndef SRC_REMLHCA_H_ +#define SRC_REMLHCA_H_ -#include "Hca.h" -#include "Option.h" -#include "Data.h" -#include "RemlH2rEst.h" -#include +#include "DataUtils.h" +#include "DataLoader.h" +#include "Utils.h" +#include "InputOutputOptions.h" +#include "SnpKinshipOptions.h" +#include "HcaOptions.h" +#include "H2rOptions.h" +#include "SnpKinship.h" +#include "ScorePhen.h" +#include "RemlHeritability.h" +#include "CvPartition.h" #include +#include +#include +#include +#include "IndividualInfoContainers.h" + +struct HcaResult { + arma::colvec weights; + double objVal; +}; -//! 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); +struct OptimizeData { + int numPhen; + int numSub; + int lambda; - private: - std::pair trainWithParams(double lambdaVal, arma::mat& phen, arma::mat& cov, arma::mat &grm); + std::shared_ptr commonTermA; + std::shared_ptr commonTermB; +}; - Option &option; - Data &data; +class RemlHca { +public: + RemlHca(std::shared_ptr ioOptions, + std::shared_ptr snpKOptions, + std::shared_ptr hcaOptions, + std::shared_ptr h2rOptions, + std::shared_ptr programOpts, + const std::string& baseOutputFolder); - std::vector< std::pair > lambdaPerformance; + /* NLOpt optimization functions */ + static double objectiveFunction(const std::vector &x, std::vector &grad, void *funcData); + static double constraintFunction(const std::vector &x, std::vector &grad, void *funcData); - double bestLambdaVal = -1; - arma::mat bestTrainedW; + std::shared_ptr trainedW() const { + return makeSharedPtrConst(trained_w); + } + std::shared_ptr trainedWHeritability() const { + return makeSharedPtrConst(trained_w_heritability); + } + double bestLambda() const { + return best_lambda; + } +private: + std::shared_ptr trained_w; + std::shared_ptr trained_w_heritability; + double best_lambda = -1; -}; + void preRunHelper(const double& lambdaVal, std::shared_ptr coefCnst, const arma::mat& cov, const arma::mat& phen, const arma::mat& grm, std::unique_ptr& outData, std::unique_ptr& outGammaInit) const; + void calcHcaNoCv(const std::string& outputFolder, std::shared_ptr hcaOptions, std::shared_ptr h2rOptions, std::shared_ptr lambdaVec, std::shared_ptr coefCnst, std::shared_ptr cov, std::shared_ptr phen, std::shared_ptr grm); + void calcHcaCv(const std::string& outputFolder, std::shared_ptr hcaOptions, std::shared_ptr h2rOptions, std::shared_ptr lambdaVec, std::shared_ptr coefCnst, std::shared_ptr cov, std::shared_ptr phen, std::shared_ptr grm); + std::unique_ptr trainHcaParams(std::shared_ptr hcaOptions, const double& lambdaVal, std::shared_ptr coefCnst, const arma::mat& cov, const arma::mat& phen, const arma::mat& grm) const; + + void saveCv(const std::string& outputFolder, std::shared_ptr lambdaVec, int cvIter, const arma::cube& data) const; + void saveResult(const std::string& outputFolder) const; +}; -#endif /* REMLHCA_H_ */ +#endif /* SRC_REMLHCA_H_ */ diff --git a/src/RemlHeritability.cpp b/src/RemlHeritability.cpp new file mode 100644 index 0000000..f6c6ab0 --- /dev/null +++ b/src/RemlHeritability.cpp @@ -0,0 +1,312 @@ +/* + * RemlHeritability.cpp + * + * Created on: Nov 14, 2017 + * Author: danielruskin + */ + +#include "RemlHeritability.h" + +RemlHeritability::RemlHeritability(std::shared_ptr ioOpts, std::shared_ptr snpOpts, std::shared_ptr h2rOpts, std::shared_ptr programOpts, const std::string& baseOutputFolder) { + BOOST_LOG_TRIVIAL(info) << "Performing heritability analysis."; + + std::string outputFolder = baseOutputFolder + "h2r/"; + + // Initialize data loader + std::unique_ptr indvList; + loadIndividualsPhen(*ioOpts, indvList); + std::shared_ptr indvListShared = std::move(indvList); + std::unique_ptr dl(new DataLoader(indvListShared, ioOpts)); + + // Populate data loader; save individuals that are left for analysis at the end + dl->loadData(DataLoader::DataToLoad::phen); + if(ioOpts->cCovFile()->second) { + dl->loadData(DataLoader::DataToLoad::cCov); + } + if(ioOpts->qCovFile()->second) { + dl->loadData(DataLoader::DataToLoad::qCov); + } + if(ioOpts->kinshipSrc()->first == KinshipSource::unspecified) { + throw InvalidArgumentError("No Kinship Source Provided", "Kinship Source", "null"); + } else if(ioOpts->kinshipSrc()->first == KinshipSource::pregiven) { + dl->loadData(DataLoader::DataToLoad::pregiven_grm); + } else if(ioOpts->kinshipSrc()->first == KinshipSource::snp) { + dl->loadSnpGrm(snpOpts, programOpts, outputFolder); + } + dl->saveIndvList(outputFolder); + + // Extract necessary data, then destroy the data loader (save space) + int numIndvs = dl->getIndvs()->size(); + arma::mat cov = arma::ones(numIndvs, 1); + if(ioOpts->cCovFile()->second) { + cov = arma::join_horiz(cov, *dl->getData(DataLoader::DataToLoad::cCov)); + } + if(ioOpts->qCovFile()->second) { + cov = arma::join_horiz(cov, *dl->getData(DataLoader::DataToLoad::qCov)); + } + arma::mat phen = dl->getData(DataLoader::DataToLoad::phen)->col(0); + arma::mat grm; + if(ioOpts->kinshipSrc()->first == KinshipSource::pregiven) { + grm = *dl->getData(DataLoader::DataToLoad::pregiven_grm); + } else if(ioOpts->kinshipSrc()->first == KinshipSource::snp) { + grm = *dl->getSnpGrm(); + } + dl.reset(); + + // Do h2r and save result + calcH2r(h2rOpts, cov, phen, grm); + saveHeritabilityPriv(outputFolder); + + BOOST_LOG_TRIVIAL(info) << "Finished heritability analysis (h^2 = " << getVarianceResult(VarianceType::heritability_sq)->variance << ")"; +} + +RemlHeritability::RemlHeritability(std::shared_ptr h2rOpts, const arma::mat& cov, const arma::mat& phen, const arma::mat& grm) { + BOOST_LOG_TRIVIAL(info) << "Performing heritability analysis."; + calcH2r(h2rOpts, cov, phen, grm); + BOOST_LOG_TRIVIAL(info) << "Finished heritability analysis (h^2 = " << getVarianceResult(VarianceType::heritability_sq)->variance << ")"; +} + +void RemlHeritability::calcH2r(std::shared_ptr h2rOpts, const arma::mat& cov, const arma::mat& phen, const arma::mat& grm) { + int maxIter = h2rOpts->maxIterations()->first; + + // Initial Values + std::unique_ptr AIFinal; + double prevLgL = -1e20; + double lgL = -1e20; + double dlogL = 1000; + std::unique_ptr varCmp; + std::unique_ptr prevVarCmp; + std::unique_ptr phenVar; + + BOOST_LOG_TRIVIAL(debug) << "H2R: pre-run helper"; + + preRunHelper(cov, phen, grm, varCmp, phenVar); + prevVarCmp.reset(new arma::mat(*varCmp)); + + // Do REML iterations + for (int iter = 0; iter < maxIter; iter++) { + BOOST_LOG_TRIVIAL(debug) << "H2R: iteration " << iter; + + BOOST_LOG_TRIVIAL(debug) << "H2R: pre-iteration helper"; + std::unique_ptr viInv; + std::unique_ptr P; + std::unique_ptr logDetVi; + std::unique_ptr logDetCovarTrViCovar; + preIterationHelper(cov, grm, *prevVarCmp, viInv, P, logDetVi, logDetCovarTrViCovar); + + BOOST_LOG_TRIVIAL(debug) << "H2R: iteration run"; + std::unique_ptr newVarCmpTmp; + if (iter == 0) { + remlEMIteration(phen, grm, *varCmp, *P, newVarCmpTmp); + } else { + remlAIIteration(phen, grm, *varCmp, *P, dlogL, newVarCmpTmp, AIFinal); + } + BOOST_LOG_TRIVIAL(debug) << "H2R: constrain"; + contrainVarcmp(*newVarCmpTmp, *phenVar, varCmp); + + arma::mat transPhenPPhen = arma::trans(phen) * ((*P) * phen); + arma::mat lgLMatrix = *logDetCovarTrViCovar + *logDetVi + transPhenPPhen; + lgL = -0.5 * lgLMatrix(0, 0); + + // Check for convergence + dlogL = lgL - prevLgL; + BOOST_LOG_TRIVIAL(debug) << "H2R: convergence check (dlogl: " << dlogL << ")"; + if(isConverged(*varCmp, *prevVarCmp, dlogL)) { + BOOST_LOG_TRIVIAL(debug) << "H2R: converged"; + break; + } + + // Set prev values for next iter + prevVarCmp.reset(new arma::mat(*varCmp)); + prevLgL = lgL; + } + + BOOST_LOG_TRIVIAL(debug) << "H2R: wrapping up"; + + // 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 vG = (*varCmp)(0,0); + double herit = vG / Vp; + + // SE (sqrt(AIFinal)) + arma::mat AIFinalSqrt = arma::sqrt(*AIFinal); + + // SE of heritability (formula from GCTA) + double AIZZ = (*AIFinal)(0,0); + double AIAccu = arma::accu(AIFinal->row(0)); + double vGSq = pow(vG, 2); + double vPSq = pow(Vp, 2); + double vGDVPSq = pow(vG / Vp, 2); + double varHeritSqrt = sqrt( + vGDVPSq * ( + (AIZZ / vGSq) + + (varVp / vPSq) - + ((2 * AIAccu) / (vG * Vp)) + ) + ); + + results[VarianceType::genotype] = std::make_shared(); + results[VarianceType::genotype]->variance = (*varCmp)(0,0); + results[VarianceType::genotype]->standardError = AIFinalSqrt(0,0); + results[VarianceType::environment] = std::make_shared(); + results[VarianceType::environment]->variance = (*varCmp)(1,0); + results[VarianceType::environment]->standardError = AIFinalSqrt(1,1); + results[VarianceType::total] = std::make_shared(); + results[VarianceType::total]->variance = Vp; + results[VarianceType::total]->standardError = varVpSqrt; + results[VarianceType::heritability_sq] = std::make_shared(); + results[VarianceType::heritability_sq]->variance = herit; + results[VarianceType::heritability_sq]->standardError = varHeritSqrt; +} + +void RemlHeritability::remlAIIteration(const arma::mat& phen, const arma::mat& grm, const arma::mat& varCmp, const arma::mat& P, double dLogL, std::unique_ptr& outVarCmp, std::unique_ptr& outAI) const { + std::unique_ptr trPA; + std::unique_ptr Py; + std::unique_ptr APy; + std::unique_ptr R; + iterationCommon(phen, grm, varCmp, P, trPA, Py, APy, R); + + arma::mat deltaL = -0.5 * (*trPA - *R); + + arma::mat avgInfoMatrix(2,2); + avgInfoMatrix(0,0) = (arma::trans(APy->col(0)) * (P * APy->col(0))).eval()(0,0); + avgInfoMatrix(1,1) = (arma::trans(APy->col(1)) * (P * APy->col(1))).eval()(0,0); + avgInfoMatrix(0,1) = avgInfoMatrix(1,0) = (arma::trans(APy->col(0)) * (P * APy->col(1))).eval()(0,0); + avgInfoMatrix = 0.5 * avgInfoMatrix; + outAI = invertMatrixCust(avgInfoMatrix, "average information matrix (AI iteration)", true); + arma::mat deltaForVarCmp = (*outAI) * deltaL; + + if (dLogL > 1.0) { + outVarCmp.reset(new arma::mat(varCmp + 0.316 * deltaForVarCmp)); + } else { + outVarCmp.reset(new arma::mat(varCmp + deltaForVarCmp)); + } +} + +void RemlHeritability::remlEMIteration(const arma::mat& phen, const arma::mat& grm, const arma::mat& varCmp, const arma::mat& P, std::unique_ptr& outVarCmp) const { + BOOST_LOG_TRIVIAL(debug) << "H2R: EM iteration begin."; + + std::unique_ptr trPA; + std::unique_ptr Py; + std::unique_ptr APy; + std::unique_ptr R; + BOOST_LOG_TRIVIAL(debug) << "H2R: iteration common helper."; + iterationCommon(phen, grm, varCmp, P, trPA, Py, APy, R); + + outVarCmp.reset(new arma::mat(varCmp)); + + for (int i = 0; i < 2; i++) { + (*outVarCmp)(i, 0) = (varCmp(i, 0) * grm.n_rows - varCmp(i, 0) * varCmp(i, 0) * (*trPA)(i, 0) + varCmp(i, 0) * varCmp(i, 0) * (*R)(i, 0)) / grm.n_rows; + } + + BOOST_LOG_TRIVIAL(debug) << "H2R: EM iteration end."; +} + +void RemlHeritability::preRunHelper(const arma::mat& cov, const arma::mat& phen, const arma::mat& grm, std::unique_ptr& outVarCmpInit, std::unique_ptr& outPhenVar) const { + double phenMinusMeanNorm = arma::norm(phen - arma::mean(arma::mean(phen))); + double phenVar = pow(phenMinusMeanNorm, 2) / (grm.n_rows - 1); + outPhenVar.reset(new double(phenVar)); + + outVarCmpInit.reset(new arma::mat(2, 1, arma::fill::zeros)); + outVarCmpInit->fill(phenVar / 2); +} + +void RemlHeritability::preIterationHelper(const arma::mat& cov, const arma::mat& grm, const arma::mat& varCmp, std::unique_ptr& outViInv, std::unique_ptr& outP, std::unique_ptr& outLogDetVi, std::unique_ptr& outLogDetCovarTrViCovar) const { + 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 tempV; + double tempS; + arma::log_det(tempV, tempS, vi); + outLogDetVi.reset(new double(tempV * tempS)); + + outViInv = invertMatrixCust(vi, "variance-covariance", true); + + arma::mat viCovar = (*outViInv * cov); + arma::mat covarTrViCovar = arma::trans(cov) * viCovar; + std::unique_ptr covarTrViCovarInv = invertMatrixCust(covarTrViCovar, "intermediate matrix A"); + + outP.reset(new arma::mat(*outViInv - viCovar * (*covarTrViCovarInv) * arma::trans(viCovar))); + + log_det(tempV, tempS, covarTrViCovar); + outLogDetCovarTrViCovar.reset(new double(tempV * tempS)); +} + +void RemlHeritability::iterationCommon(const arma::mat& phen, const arma::mat& grm, const arma::mat& varCmp, const arma::mat& P, std::unique_ptr& outTrPA, std::unique_ptr& outPy, std::unique_ptr& outAPy, std::unique_ptr& outR) const { + arma::mat eyeMat = arma::eye(grm.n_rows, grm.n_cols); + outTrPA.reset(new arma::mat(2, 1, arma::fill::zeros)); + (*outTrPA)(0,0) = arma::trace(P * grm); + (*outTrPA)(1,0) = arma::trace(P * eyeMat); + + outPy.reset(new arma::mat(P * phen)); + + outAPy.reset(new arma::mat(grm.n_rows, 2, arma::fill::zeros)); + outAPy->col(0) = grm * (*outPy); + outAPy->col(1) = eyeMat * (*outPy); + + outR.reset(new arma::mat(2, 1, arma::fill::zeros)); + outR->row(0) = arma::trans(*outPy) * outAPy->col(0); + outR->row(1) = arma::trans(*outPy) * outAPy->col(1); +} + +void RemlHeritability::contrainVarcmp(const arma::mat& varCmp, double phenVar, std::unique_ptr& outVarCmp) const { + outVarCmp.reset(new arma::mat(varCmp)); + + double delta = 0; + arma::mat constrained(2,1); + for(int i = 0; i < 2; i++) { + if((*outVarCmp)(i, 0) < 0) { + delta += phenVar * 1e-6 - varCmp(i, 0); + (*outVarCmp)(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 && (*outVarCmp)(i, 0) > delta) { + (*outVarCmp)(i, 0) -= delta; + } + } +} + +bool RemlHeritability::isConverged(const arma::mat& varCmp, const arma::mat& prevVarCmp, double dLogL) const { + 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); +} + +void RemlHeritability::saveHeritability(const std::string& baseOutputFolder) const { + saveHeritabilityPriv(baseOutputFolder + "h2r/"); +} + +void RemlHeritability::saveHeritabilityPriv(const std::string& outputFolder) const { + std::string outputFile = outputFolder + "heritability.csv"; + boost::filesystem::create_directories(outputFolder); + + std::fstream file(outputFile, std::fstream::out); + file.precision(7); + + file << "variance_type,variance,se" << std::endl; + file << "genotype" << "," << results.at(VarianceType::genotype)->variance << "," << results.at(VarianceType::genotype)->standardError << std::endl; + file << "environment" << "," << results.at(VarianceType::environment)->variance << "," << results.at(VarianceType::environment)->standardError << std::endl; + file << "total" << "," << results.at(VarianceType::total)->variance << "," << results.at(VarianceType::total)->standardError << std::endl; + file << "heritability_sq" << "," << results.at(VarianceType::heritability_sq)->variance << "," << results.at(VarianceType::heritability_sq)->standardError << std::endl; +} diff --git a/src/RemlHeritability.h b/src/RemlHeritability.h new file mode 100644 index 0000000..0cff3a5 --- /dev/null +++ b/src/RemlHeritability.h @@ -0,0 +1,65 @@ +/* + * RemlHeritability.h + * + * Created on: Nov 14, 2017 + * Author: danielruskin + */ + +#ifndef SRC_REMLHERITABILITY_H_ +#define SRC_REMLHERITABILITY_H_ + +#include "DataUtils.h" +#include "DataLoader.h" +#include "Utils.h" +#include "InputOutputOptions.h" +#include "SnpKinshipOptions.h" +#include "H2rOptions.h" +#include "SnpKinship.h" +#include +#include +#include +#include "IndividualInfoContainers.h" + +// Val 1 is variance. Val 2 is SE. +struct VarianceTypeResult { + double variance; + double standardError; +}; + +class RemlHeritability { +public: + RemlHeritability(std::shared_ptr ioOpts, + std::shared_ptr snpOpts, + std::shared_ptr h2rOpts, + std::shared_ptr programOpts, + const std::string& baseOutputFolder); + RemlHeritability(std::shared_ptr h2rOpts, + const arma::mat& cov, + const arma::mat& phen, + const arma::mat& grm); + + enum VarianceType { genotype, environment, total, heritability_sq }; + + std::shared_ptr getVarianceResult(VarianceType type) const { + return makeSharedPtrConst(results.at(type)); + } + + void saveHeritability(const std::string& baseOutputFolder) const; +private: + std::map< VarianceType, std::shared_ptr > results; + + void calcH2r(std::shared_ptr h2rOpts, const arma::mat& cov, const arma::mat& phen, const arma::mat& grm); + void remlAIIteration(const arma::mat& phen, const arma::mat& grm, const arma::mat& varCmp, const arma::mat& P, double dLogL, std::unique_ptr& outVarCmp, std::unique_ptr& outAI) const; + void remlEMIteration(const arma::mat& phen, const arma::mat& grm, const arma::mat& varCmp, const arma::mat& P, std::unique_ptr& outVarCmp) const; + + void preRunHelper(const arma::mat& cov, const arma::mat& phen, const arma::mat& grm, std::unique_ptr& outVarCmpInit, std::unique_ptr& outPhenVar) const; + void preIterationHelper(const arma::mat& cov, const arma::mat& grm, const arma::mat& varCmp, std::unique_ptr& outViInv, std::unique_ptr& outP, std::unique_ptr& outLogDetVi, std::unique_ptr& outLogDetCovarTrViCovar) const; + void iterationCommon(const arma::mat& phen, const arma::mat& grm, const arma::mat& varCmp, const arma::mat& P, std::unique_ptr& outTrPA, std::unique_ptr& outPy, std::unique_ptr& outAPy, std::unique_ptr& outR) const; + + void contrainVarcmp(const arma::mat& varCmp, double phenVar, std::unique_ptr& outVarCmp) const; + bool isConverged(const arma::mat& varCmp, const arma::mat& prevVarCmp, double dLogL) const; + + void saveHeritabilityPriv(const std::string& outputFolder) const; +}; + +#endif /* SRC_REMLHERITABILITY_H_ */ diff --git a/src/ScorePhen.cpp b/src/ScorePhen.cpp new file mode 100644 index 0000000..1cbb694 --- /dev/null +++ b/src/ScorePhen.cpp @@ -0,0 +1,39 @@ +/* + * ScorePhen.cpp + * + * Created on: Dec 11, 2017 + * Author: danielruskin + */ + +#include "ScorePhen.h" + +ScorePhen::ScorePhen(const arma::mat& phen, const arma::mat& trait) { + _result.reset(new arma::mat(phen * trait)); +} +ScorePhen::ScorePhen(std::shared_ptr opts, const std::string& baseOutputFolder) { + std::string outputFolder = baseOutputFolder + "score/"; + + std::unique_ptr phenIndvs; + loadIndividualsPhen(*opts, phenIndvs); + std::shared_ptr phenIndvsShared = std::move(phenIndvs); + + DataLoader dl(phenIndvsShared, opts); + dl.loadData(DataLoader::DataToLoad::phen); + dl.saveIndvList(outputFolder); + + std::unique_ptr trait; + loadTraitFromFile(*opts, trait); + + _result.reset(new arma::mat(*(dl.getData(DataLoader::DataToLoad::phen)) * *trait)); + + saveResult(outputFolder); +} + +void ScorePhen::saveResult(const std::string& outputFolder) const { + boost::filesystem::create_directories(outputFolder); + + std::fstream file(outputFolder + "scores.csv", std::fstream::out); + file.precision(7); + + _result->save(file, arma::csv_ascii); +} diff --git a/src/ScorePhen.h b/src/ScorePhen.h new file mode 100644 index 0000000..0f3ba00 --- /dev/null +++ b/src/ScorePhen.h @@ -0,0 +1,32 @@ +/* + * ScorePhen.h + * + * Created on: Dec 11, 2017 + * Author: danielruskin + */ + +#ifndef SRC_SCOREPHEN_H_ +#define SRC_SCOREPHEN_H_ + +#include +#include "InputOutputOptions.h" +#include "DataUtils.h" +#include "DataLoader.h" +#include +#include "IndividualInfoContainers.h" + +class ScorePhen { +public: + ScorePhen(const arma::mat& phen, const arma::mat& trait); + ScorePhen(std::shared_ptr opts, const std::string& baseOutputFolder); + + std::shared_ptr result() const { + return makeSharedPtrConst(_result); + } +private: + std::shared_ptr _result; + + void saveResult(const std::string& outputFolder) const; +}; + +#endif /* SRC_SCOREPHEN_H_ */ diff --git a/src/Scorer.cpp b/src/Scorer.cpp deleted file mode 100644 index 90b5fe7..0000000 --- a/src/Scorer.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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 deleted file mode 100644 index c6e66fe..0000000 --- a/src/Scorer.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 index ef6e1cb..22f5ba5 100644 --- a/src/SnpKinship.cpp +++ b/src/SnpKinship.cpp @@ -1,163 +1,372 @@ /* * SnpKinship.cpp * - * Created on: Feb 12, 2016 - * Author: Joey + * Created on: Oct 30, 2017 + * Author: danielruskin */ #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); - } +/* + * Initialize a SnpKinship object with all individuals. + */ +SnpKinship::SnpKinship(std::shared_ptr ioOptsNew, + std::shared_ptr snpOptsNew, + std::shared_ptr programOptsNew, + const std::string& baseOutputFolder) { + std::unique_ptr indvs; + std::unique_ptr genders; + loadIndividualsGeno(*ioOptsNew, indvs, genders); + + calcGrm(ioOptsNew, snpOptsNew, programOptsNew, *indvs, baseOutputFolder); +} + +/* + * Initialize a SnpKinship object with the requested individuals. + */ +SnpKinship::SnpKinship(std::shared_ptr ioOptsNew, + std::shared_ptr snpOptsNew, + std::shared_ptr programOptsNew, + const IndividualInfoSet& requestedIndvs, + const std::string& baseOutputFolder) { + calcGrm(ioOptsNew, snpOptsNew, programOptsNew, requestedIndvs, baseOutputFolder); +} + +void SnpKinship::calcGrm(std::shared_ptr ioOptsNew, + std::shared_ptr snpOptsNew, + std::shared_ptr programOptsNew, + const IndividualInfoSet& requestedIndvs, + const std::string& baseOutputFolder) { + BOOST_LOG_TRIVIAL(info) << "Creating GRM from SNP data."; + + std::string outputFolder = baseOutputFolder + "snp_kinship/"; + + std::unique_ptr grmTemp; + std::unique_ptr utilTemp; + ChiSqDist chiSqDist = boost::math::chi_squared_distribution(1); + if(snpOptsNew->allSnpsInMemory()->first) { + calcGrmInMem(*ioOptsNew, *snpOptsNew, *programOptsNew, chiSqDist, requestedIndvs, grmTemp, utilTemp); + } else { + calcGrmIterative(ioOptsNew, *snpOptsNew, *programOptsNew, chiSqDist, requestedIndvs, grmTemp, utilTemp); } - // 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); + _grm = std::move(grmTemp); + A_N = std::move(utilTemp); + + saveResult(outputFolder); + + BOOST_LOG_TRIVIAL(info) << "Finished creating GRM from SNP data."; +} + +void SnpKinship::calcGrmInMem(const InputOutputOptions& ioOpts, const SnpKinshipOptions& snpOpts, const ProgramOptions& programOpts, const ChiSqDist& chiSqDist, const IndividualInfoSet& requestedIndvs, std::unique_ptr& outGrm, std::unique_ptr& outUtilDataMat) { + // Load genetic data + std::unique_ptr geno; + std::unique_ptr genoMissing; + std::unique_ptr genders; + std::unique_ptr indvsTmp; + std::unique_ptr removedIndvsTmp; + std::unique_ptr ignoredIndvsTmp; + loadGeno(ioOpts, requestedIndvs, geno, genoMissing, genders, indvsTmp, removedIndvsTmp, ignoredIndvsTmp); + _indvs = std::move(indvsTmp); + removed_indvs = std::move(removedIndvsTmp); + ignored_indvs = *ignoredIndvsTmp; + std::unique_ptr chr; + loadChrFromBimFile(ioOpts, chr); + + // Calculate norm fac + std::unique_ptr normFac; + calcNormFactor(*genders, *chr, normFac); + + // Process SNPs + VectorOfInts snpsToRemove; + for(unsigned int snpI = 0; snpI < geno->n_cols; snpI++) { + arma::subview_col genoSub = geno->col(snpI); + arma::subview_col missingSub = genoMissing->col(snpI); + + if(!processSnp(snpOpts, snpI, chiSqDist, normFac->col(snpI), genoSub, missingSub)) { + snpsToRemove.push_back(snpI); } } + for(VectorOfInts::reverse_iterator iter = snpsToRemove.rbegin(); iter != snpsToRemove.rend(); iter++) { + geno->shed_col(*iter); + } - // 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++; + // Figure out which SNPs are missing for each individual (for A_N matrix procedure) + std::vector genoMissingVec(geno->n_rows); + for(unsigned int indI = 0; indI < geno->n_rows; indI++) { + for(unsigned int snpI = 0; snpI < geno->n_cols; snpI++) { + if((*genoMissing)(indI, snpI) == 1) { + genoMissingVec[indI].push_back(snpI); } } + } - if (numIndivAdded > 0) { - avgSnp(snp) /= numIndivAdded; - } + // Calculate A_N matrix + outUtilDataMat.reset(new arma::mat(geno->n_rows, geno->n_rows, arma::fill::zeros)); + for(unsigned int indI = 0; indI < geno->n_rows; indI++) { + for(unsigned int indJ = 0; indJ <= indI; indJ++) { + // Get num missing from either individual + int missingInI = genoMissingVec[indI].size(); + int missingInJPresentInI = 0; + for(VectorOfInts::iterator i = genoMissingVec[indJ].begin(); i != genoMissingVec[indJ].end(); i++) { + if(!(*genoMissing)(indI, *i)) { ++missingInJPresentInI; } + } + int numMissing = missingInI + missingInJPresentInI; - double avgSnpSdVal = avgSnp(snp) * (1 - 0.5 * avgSnp(snp));; - if(fabs(avgSnpSdVal) < 1.0e-50) { - avgSnpSd(snp) = 0; - } else { - avgSnpSd(snp) = sqrt(1 / avgSnpSdVal); + (*outUtilDataMat)(indI, indJ) = (*outUtilDataMat)(indJ, indI) = geno->n_cols - numMissing; } } - // 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; + // Calculate GRM + outGrm.reset(new arma::mat((*geno) * arma::trans(*geno))); + finalizeGrm(*outUtilDataMat, *outGrm); +} + +void SnpKinship::calcGrmIterative(std::shared_ptr ioOpts, const SnpKinshipOptions& snpOpts, const ProgramOptions& programOpts, const ChiSqDist& chiSqDist, const IndividualInfoSet& requestedIndvs, std::unique_ptr& outGrm, std::unique_ptr& outUtilDataMat) { + // Load genetic data + GenoLoader gn(ioOpts, requestedIndvs); + _indvs = gn.indvs(); + removed_indvs = gn.removedIndvs(); + ignored_indvs = gn.ignoredIndvs(); + std::unique_ptr chr; + loadChrFromBimFile(*ioOpts, chr); + + // Calculate norm fac + std::unique_ptr normFac; + calcNormFactor(*gn.genders(), *chr, normFac); + + // Save some useful values + int numIndv = gn.genders()->size(); + int numSnps = snpOpts.snpsInMemory()->first; + + // Calc GRM + outGrm.reset(new arma::mat(numIndv, numIndv, arma::fill::zeros)); + outUtilDataMat.reset(new arma::mat(numIndv, numIndv, arma::fill::zeros)); + std::vector tmpMatricesGrm(programOpts.numThreads()->first, *outGrm); + std::vector tmpMatricesAn(programOpts.numThreads()->first, *outUtilDataMat); + while(!gn.doneLoading()) { + // Load snps + std::unique_ptr snp; + std::unique_ptr missingSnp; + gn.fetchSnps(numSnps, snp, missingSnp); + int snpPosStart = gn.lastLoadedSnp() + 1 - snp->n_cols; + BOOST_LOG_TRIVIAL(info) << "SNPs: Processed " << snpPosStart << "."; - 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) { + // Process SNPs + #pragma omp parallel + #pragma omp for + for(unsigned int snpIdx = 0; snpIdx < snp->n_cols; snpIdx++) { + int threadNum = omp_get_thread_num(); + int absSnpNum = snpPosStart + snpIdx; + + // Copy so we can edit locally in parallel loop + arma::colvec snpLoc = snp->col(snpIdx); + arma::colvec missingLoc = missingSnp->col(snpIdx); + arma::subview_col snpSub = snpLoc.col(0); + arma::subview_col missingSub = missingLoc.col(0); + + if(!processSnp(snpOpts, absSnpNum, chiSqDist, normFac->col(absSnpNum), snpSub, missingSub)) { continue; - } else { - colsToInclude.push_back(i); + } + + // Add to GRM, A_N matrix + for(unsigned int indI = 0; indI < snpLoc.n_rows; indI++) { + for(unsigned int indJ = 0; indJ <= indI; indJ++) { + tmpMatricesGrm[threadNum](indI, indJ) = snpLoc(indI) * snpLoc(indJ); + + if(missingLoc(indI) == 0 && missingLoc(indJ) == 0) { + tmpMatricesAn[threadNum](indI, indJ) = 1; + if(indJ != indI) { tmpMatricesAn[threadNum](indJ, indI) = 1; } + } else { + tmpMatricesAn[threadNum](indI, indJ) = 0; + if(indJ != indI) { tmpMatricesAn[threadNum](indJ, indI) = 0; } + // Missing in one or both: no change + } + } + } + + #pragma omp critical + { + *outGrm += tmpMatricesGrm[threadNum]; + *outUtilDataMat += tmpMatricesAn[threadNum]; } } + } - // Copy to array for use with armadillo - arma::uvec colsToIncludeVec(colsToInclude); - geno = geno.cols(colsToIncludeVec); - avgSnp = avgSnp.rows(colsToIncludeVec); - avgSnpSd = avgSnpSd.rows(colsToIncludeVec); + finalizeGrm(*outUtilDataMat, *outGrm); +} - std::cout << "MAF filtering complete (end: " << geno.n_cols << " cols)." << std::endl; +void SnpKinship::calcNormFactor(const arma::colvec& genders, const arma::colvec& chr, std::unique_ptr& outFac) const { + unsigned int numIndv = genders.n_rows; + + outFac.reset(new arma::mat(numIndv, chr.n_rows)); + + // Calculate normalization factors for each individual + arma::colvec facAuto(numIndv, arma::fill::zeros); + arma::colvec facX(numIndv, arma::fill::zeros); + arma::colvec facNorm(numIndv, arma::fill::zeros); + for(unsigned int i = 0; i < numIndv; i++) { + facAuto(i) = 1.0; + facNorm(i) = 0.5; + + if(genders(i) == 1) { + facX(i) = 0.5; + } else if(genders(i) == 2) { + facX(i) = 1; + } } - // 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; + // Fill in matrix + for(unsigned int i = 0; i < chr.size(); i++) { + if(chr[i] < 23) { + outFac->col(i) = facAuto; + } else if (chr[i] == 23) { + outFac->col(i) = facX; + } else { + outFac->col(i) = facNorm; + } + } +} - geno(i, j) -= avgSnp(j); - geno(i, j) *= avgSnpSd(j); - } else { - missingPos[i].push_back(j); - missingGeno(i, j) = 1; +bool SnpKinship::processSnp(const SnpKinshipOptions& snpOpts, int snpNum, const ChiSqDist& chiSqDist, const arma::colvec& normFac, arma::subview_col snp, arma::subview_col snpMissing) const { + // Calculate total/distr of data. + double total = 0; + int numIndv = 0; + VectorOfDoubles distr(3); // 0 = homo minor, 1 = homo major, 2 = hetero + for(unsigned int indiv = 0; indiv < snp.n_rows; indiv++) { + if(snpMissing(indiv) == 0) { + total += normFac(indiv) * snp(indiv); - geno(i, j) = 0; - } + if(snp(indiv) == 0) { distr[1] += 1; } + if(snp(indiv) == 1) { distr[2] += 1; } + if(snp(indiv) == 2) { distr[0] += 1; } + + numIndv++; } } - // 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++; - } - } + // Calculate avg/SD + double avg = 0; + if (numIndv > 0) { + avg = total /= numIndv; + } + double avgSnpSdVal = avg * (1 - 0.5 * avg); + if(fabs(avgSnpSdVal) < 1.0e-50) { + avgSnpSdVal = 0; + } else { + avgSnpSdVal = sqrt(1 / avgSnpSdVal); + } + + // Decide whether to drop this SNP + // If so, return immediately. + bool remove = false; + double minorFreq = avg * 0.5; + double majorFreq = 1 - minorFreq; + if(snpOpts.mafCutoff()->second) { + double cutoff = snpOpts.mafCutoff()->first; - // Set value in matrix - A_N(i, j) = A_N(j, i) = geno.n_cols - missingInI - missingInJPresentInI; + if(minorFreq <= cutoff) { + BOOST_LOG_TRIVIAL(info) << "MAF for SNP " << snpNum << " (" << minorFreq << ") is less than cutoff (" << cutoff << "). This SNP will be removed."; + } else if(majorFreq <= cutoff) { + BOOST_LOG_TRIVIAL(info) << "MAF for SNP " << snpNum << " (" << majorFreq << ") is less than cutoff (" << cutoff << "). This SNP will be removed."; } + + remove = remove || minorFreq <= cutoff || majorFreq <= cutoff; } + if(snpOpts.hweCutoff()->second) { + double cutoff = snpOpts.hweCutoff()->first; + double minorHomoExp = pow(minorFreq, 2) * numIndv; + double majorHomoExp = pow(majorFreq, 2) * numIndv; + double heteroExp = (2 * minorFreq * majorFreq) * numIndv; - // Calculate WW' - m_grm = geno * arma::trans(geno); + if(minorHomoExp == 0 || majorHomoExp == 0 || heteroExp == 0) { + BOOST_LOG_TRIVIAL(warning) << "Unable to perform HWE cutoff analysis for SNP " << snpNum << " as at least one expected value is 0! This SNP will be removed."; + remove = true; + } else { + double chiSq = 0; + chiSq += pow((distr[0] - minorHomoExp), 2) / minorHomoExp; + chiSq += pow((distr[1] - majorHomoExp), 2) / majorHomoExp; + chiSq += pow((distr[2] - heteroExp), 2) / heteroExp; - // 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); + double cdfProb = 1 - boost::math::cdf(chiSqDist, chiSq); + + if(cdfProb <= cutoff) { + BOOST_LOG_TRIVIAL(info) << "HWE CDF for SNP " << snpNum << " (" << cdfProb << ") is less than cutoff (" << cutoff << "). This SNP will be removed."; + } + remove = remove || cdfProb <= cutoff; + } + } + if(remove) { + return false; + } + + // Adjust SNP + for(unsigned int indI = 0; indI < snp.n_rows; indI++) { + if(snpMissing(indI) == 0) { + snp(indI) -= avg; + snp(indI) *= avgSnpSdVal; + } else { + switch(snpOpts.missingHandler()->first) { + case SnpKinshipOptions::MissingHandler::fillMean: { + snp(indI) = avg; + snpMissing(indI) = 0; + break; + } + case SnpKinshipOptions::MissingHandler::deleteMissing: { + snp(indI) = 0; + break; + } + default: { + throw std::runtime_error("Unexpected enum value!"); + break; } - else { - m_grm(i,j) = 0; } - m_grm(j,i) = m_grm(i,j); } } - // Output results - std::cout << "GRM estimation complete!" << std::endl; + return true; } -//! 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; +void SnpKinship::finalizeGrm(const arma::mat& _A_N, arma::mat& grm) const { + for(unsigned int indI = 0; indI < grm.n_rows; indI++) { + for(unsigned int indJ = 0; indJ <= indI; indJ++) { + if(_A_N(indI, indJ) > 0) { + grm(indI, indJ) = grm(indJ, indI) = grm(indI, indJ) / _A_N(indI, indJ); + } else { + grm(indI, indJ) = grm(indJ, indI) = 0; + } + } + } } +void SnpKinship::saveResult(const std::string& outputFolder) const { + std::string outputFileIndividuals = outputFolder + "individuals_kept_in_analysis.csv"; + std::string outputFileKinship = outputFolder + "grm.kinship"; + std::string outputFileKinshipId = outputFolder + "grm.kinship_id"; + boost::filesystem::create_directories(outputFolder); + + saveIndvListToFile(outputFileIndividuals, *_indvs); + std::fstream kinshipFile(outputFileKinship, std::fstream::out); + std::fstream kinshipIdFile(outputFileKinshipId, std::fstream::out); + kinshipFile.precision(7); + kinshipIdFile.precision(7); + + for(unsigned int i = 0; i < _grm->n_rows; i++) + { + for(unsigned int j = 0; j <= i; j++) + { + kinshipFile << i + 1 << "\t" << j + 1 << "\t" << (*A_N)(i,j) << "\t" << (*_grm)(i,j); + kinshipFile << std::endl; + } + } + + // Kinship ID file + for(IndividualInfoSet::const_iterator i = _indvs->begin(); i != _indvs->end(); i++) { + kinshipIdFile << (*i)->familyId() << "\t" << (*i)->individualId(); + + if((i + 1) != _indvs->end()) { + kinshipIdFile << "\n"; + } + } +} diff --git a/src/SnpKinship.h b/src/SnpKinship.h index 8a34fd8..bd05d27 100644 --- a/src/SnpKinship.h +++ b/src/SnpKinship.h @@ -1,26 +1,92 @@ /* * SnpKinship.h * - * Created on: Feb 17, 2016 - * Author: Joey + * Created on: Oct 30, 2017 + * Author: danielruskin */ -#ifndef SNPKINSHIP_H_ -#define SNPKINSHIP_H_ +#ifndef SRC_SNPKINSHIP_H_ +#define SRC_SNPKINSHIP_H_ + +#include "InputOutputOptions.h" +#include "SnpKinshipOptions.h" +#include "ProgramOptions.h" +#include "GenoLoader.h" +#include "Utils.h" +#include "DataUtils.h" -#include "Kinship.h" -#include "Option.h" #include +#include +#include +#include +#include +#include "IndividualInfoContainers.h" -//! 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; -}; +class SnpKinship { +public: + typedef boost::math::chi_squared_distribution ChiSqDist; + + SnpKinship(std::shared_ptr ioOptsNew, + std::shared_ptr snpOptsNew, + std::shared_ptr programOptsNew, + const std::string& baseOutputFolder); + SnpKinship(std::shared_ptr ioOptsNew, + std::shared_ptr snpOptsNew, + std::shared_ptr programOptsNew, + const IndividualInfoSet& requestedIndvs, + const std::string& baseOutputFolder); + std::shared_ptr grm() const { + return makeSharedPtrConst(_grm); + } + std::shared_ptr indvs() const { + return _indvs; + } + std::shared_ptr removedIndvs() const { + return removed_indvs; + } + int ignoredIndvs() const { + return ignored_indvs; + } +private: + // Stores the final results + std::shared_ptr _grm; + std::shared_ptr A_N; + + /* + * Const because this variable is obtained directly from the geno loader. + * We cannot modify it. + */ + std::shared_ptr _indvs; + + /* + * Const because this variable is obtained directly from the geno loader. + * We cannot modify it. + */ + std::shared_ptr removed_indvs; + int ignored_indvs; + + void calcGrm(std::shared_ptr ioOptsNew, + std::shared_ptr snpOptsNew, + std::shared_ptr programOptsNew, + const IndividualInfoSet& requestedIndvs, + const std::string& baseOutputFolder); + void calcNormFactor(const arma::colvec& genders, const arma::colvec& chr, std::unique_ptr& outFac) const; + void calcGrmIterative(std::shared_ptr ioOpts, const SnpKinshipOptions& snpOpts, const ProgramOptions& programOpts, const ChiSqDist& chiSqDist, const IndividualInfoSet& requestedIndvs, std::unique_ptr& outGrm, std::unique_ptr& outUtilDataMat); + void calcGrmInMem(const InputOutputOptions& ioOpts, const SnpKinshipOptions& snpOpts, const ProgramOptions& programOpts, const ChiSqDist& chiSqDist, const IndividualInfoSet& requestedIndvs, std::unique_ptr& outGrm, std::unique_ptr& outUtilDataMat); + + /* + * Decides whether you should keep this SNP (the bool return value). + * Also adjusts the SNP, fills in missing data per the CLI options, and updates snpMising. + */ + bool processSnp(const SnpKinshipOptions& snpOpts, int snpNum, const ChiSqDist& chiSqDist, const arma::colvec& normFac, arma::subview_col snp, arma::subview_col snpMissing) const; + + /* + * Once you have the GRM, this method will divide all values by the appropriate value in the A_N matrix. + */ + void finalizeGrm(const arma::mat& _A_N, arma::mat& grm) const; + + void saveResult(const std::string& outputFolder) const; +}; -#endif /* SNPKINSHIP_H_ */ +#endif /* SRC_SNPKINSHIP_H_ */ diff --git a/src/SnpKinshipOptions.cpp b/src/SnpKinshipOptions.cpp new file mode 100644 index 0000000..a12f9a8 --- /dev/null +++ b/src/SnpKinshipOptions.cpp @@ -0,0 +1,22 @@ +/* + * SnpKinshipOptions.cpp + * + * Created on: Oct 10, 2017 + * Author: danielruskin + */ + +#include "SnpKinshipOptions.h" + +const std::unordered_map SnpKinshipOptions::MISSING_HANDLER_MAPPING = { + {"deleteMissing", SnpKinshipOptions::MissingHandler::deleteMissing}, + {"fillMean", SnpKinshipOptions::MissingHandler::fillMean} +}; + +SnpKinshipOptions::SnpKinshipOptions(const UnorderedStringStringMap& opts) { + missing_handler = parseEnumOption(opts, "snp_missing_handler", MISSING_HANDLER_MAPPING, defaultEnum(MissingHandler::deleteMissing)); + + maf_cutoff = parseDoubleOption(opts, "maf_cutoff", defaultNullDouble()); + hwe_cutoff = parseDoubleOption(opts, "hwe_cutoff", defaultNullDouble()); + snps_in_memory = parseIntOption(opts, "snps_in_memory", defaultInt(1000)); + all_snps_in_memory = parseBoolOption(opts, "all_snps_in_memory", defaultBool(false)); +} diff --git a/src/SnpKinshipOptions.h b/src/SnpKinshipOptions.h new file mode 100644 index 0000000..717bb81 --- /dev/null +++ b/src/SnpKinshipOptions.h @@ -0,0 +1,48 @@ +/* + * SnpKinshipOptions.h + * + * Created on: Oct 10, 2017 + * Author: danielruskin + */ + +#ifndef SRC_SNPKINSHIPOPTIONS_H_ +#define SRC_SNPKINSHIPOPTIONS_H_ + +#include +#include +#include "Utils.h" +#include "OptionsUtils.h" + +class SnpKinshipOptions { +public: + SnpKinshipOptions(const UnorderedStringStringMap& opts); + + enum MissingHandler { deleteMissing, fillMean }; + const static std::unordered_map MISSING_HANDLER_MAPPING; + + std::shared_ptr< const OptionalEnumStruct::type > missingHandler() const { + return makeSharedPtrConst< const OptionalEnumStruct::type >(missing_handler); + } + + std::shared_ptr mafCutoff() const { + return makeSharedPtrConst(maf_cutoff); + } + std::shared_ptr hweCutoff() const { + return makeSharedPtrConst(hwe_cutoff); + } + std::shared_ptr snpsInMemory() const { + return makeSharedPtrConst(snps_in_memory); + } + std::shared_ptr allSnpsInMemory() const { + return makeSharedPtrConst(all_snps_in_memory); + } +private: + std::shared_ptr< OptionalEnumStruct::type > missing_handler; + + std::shared_ptr maf_cutoff; + std::shared_ptr hwe_cutoff; + std::shared_ptr snps_in_memory; + std::shared_ptr all_snps_in_memory; +}; + +#endif /* SRC_SNPKINSHIPOPTIONS_H_ */ diff --git a/src/Util.cpp b/src/Util.cpp deleted file mode 100644 index f1969b0..0000000 --- a/src/Util.cpp +++ /dev/null @@ -1,95 +0,0 @@ -#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 deleted file mode 100644 index a07f2a7..0000000 --- a/src/Util.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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/Utils.cpp b/src/Utils.cpp new file mode 100644 index 0000000..46f11e4 --- /dev/null +++ b/src/Utils.cpp @@ -0,0 +1,46 @@ +#include "Utils.h" + +std::unique_ptr invertMatrixCust(const arma::mat& matToInv, const std::string& matrixName, bool sympd, bool alreadyAdded) { + try { + std::unique_ptr out; + if(sympd) { + out.reset(new arma::mat(arma::inv_sympd(matToInv))); + } else { + out.reset(new arma::mat(arma::inv(matToInv))); + } + return out; + } catch(std::runtime_error& e) { + // If the matrix is singular, try again once after correcting. + if(alreadyAdded) { + throw; + } + 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. + BOOST_LOG_TRIVIAL(warning) << "Unable to invert matrix: " + matrixName + ". Adding small amount to the diagonals to correct. The results may not be reliable." << std::endl; + if(sympd) { + BOOST_LOG_TRIVIAL(warning) << "(previous warning was in relation to a sympd invert call)"; + } + + arma::mat matToInvNew = matToInv; + double amount_to_add = arma::mean(matToInvNew.diag()) * 0.01; + matToInvNew.diag() += amount_to_add; + + return invertMatrixCust(matToInvNew, matrixName, sympd, true); + } +} + +void fastStringSplit(std::string data, const std::string& delim, std::unique_ptr& outVec) { + outVec.reset(new VectorOfStrings); + + size_t pos = 0; + while ((pos = data.find_first_of(delim.c_str())) != std::string::npos) { + outVec->push_back(data.substr(0, pos)); + data.erase(0, pos + 1); + } + outVec->push_back(data); // Final str will be after the last comma was removed +} diff --git a/src/Utils.h b/src/Utils.h new file mode 100644 index 0000000..2640fde --- /dev/null +++ b/src/Utils.h @@ -0,0 +1,44 @@ +/* + * Utils.h + * + * Created on: Oct 11, 2017 + * Author: danielruskin + */ + +#ifndef SRC_UTILS_H_ +#define SRC_UTILS_H_ + +#include +#include +#include +#include +#include + +/* Typedefs for common containers */ +typedef std::vector VectorOfStrings; +typedef std::vector VectorOfInts; +typedef std::vector VectorOfDoubles; +typedef std::vector VectorOfMatrixPointers; +typedef std::unordered_map UnorderedIntIntMap; +typedef std::unordered_map UnorderedStringIntMap; +typedef std::unordered_map UnorderedStringStringMap; + +/* Typedefs for "optional" values. Consists of a value and a boolean. If the boolean is false, the value is irrelevant and undefined.*/ +typedef std::pair OptionalString; +typedef std::pair OptionalBool; +typedef std::pair OptionalInt; +typedef std::pair OptionalDouble; +typedef std::pair OptionalVectorOfInts; + +/* Casts a shared_ptr to the provided type to a shared_ptr of the const provided type */ +template +std::shared_ptr makeSharedPtrConst(std::shared_ptr ptr) { + return std::static_pointer_cast(ptr); +} + +typedef boost::log::trivial::severity_level log_level; + +std::unique_ptr invertMatrixCust(const arma::mat& matToInv, const std::string& matrixName, bool sympd = false, bool alreadyAdded = false); +void fastStringSplit(std::string data, const std::string& delim, std::unique_ptr& outVec); + +#endif /* SRC_UTILS_H_ */ diff --git a/src/main.cpp b/src/main.cpp index b88ecaa..b96434a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,111 +1,33 @@ -#include "Option.h" -#include "Data.h" -#include "RemlH2rEst.h" -#include "RemlHca.h" -#include - -//! Main method. Runs all analysis. +/* + * Main.cpp + * + * Created on: Oct 9, 2017 + * Author: danielruskin + */ + +#include "CommandExecutor.h" +#include +#include + +//! Program Entrypoint 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; + // First, parse the arguments into a map + // Skip program name (arg 0) + UnorderedStringStringMap argumentMap; + std::string tempVal; + for(int i = 1; i < argc; i++) { + if((i % 2) == 0) { + argumentMap[tempVal] = argv[i]; } else { - std::cout << msg << std::endl; + tempVal = argv[i]; + if(tempVal.substr(0, 2) == "--") { + tempVal = tempVal.substr(2); + } } - - return 1; } + + // Execute the command with these arguments + CommandExecutor ce(argumentMap); + ce.run(); }