Description Usage Arguments Details Value References See Also Examples
This function loads the parameter estimates obtained by fastPHASE (see runFastPhase) and assembles the Li and Stephens HMM, in the format required by the knockoff generation functions knockoffHaplotypes and knockoffGenotypes.
1 2 |
r_file |
a string with the path of the "_rhat.txt" file produced by fastPHASE. |
alpha_file |
a string with the path of the "_alphahat.txt" file produced by fastPHASE. |
theta_file |
a string with the path of the "_thetahat.txt" file produced by fastPHASE. |
char_file |
a string with the path of the "_origchars" file produced by fastPHASE. |
compact |
whether to assemble the explicit transition and emission matrices for the HMM (default: FALSE). |
phased |
whether to assemble a model for phased haplotypes, if compact==FALSE (default: FALSE). |
This function by default returns a structure with three fields:
"r": a numerical array of length p.
"alpha": a numerical array of size (p,K).
"theta": a numerical array of size (p,K).
If the parameter compact is FALSE, this function assembles the HMM model for the genotype data (either unphased or phased), in the format required by the knockoff generation function knockoffHMM.
A structure containing the parameters from the Li and Stephens HMM for phased haplotypes.
scheet2006SNPknock
Other fastPHASE: runFastPhase
,
writeXtoInp
1 2 3 4 5 6 7 8 9 10 11 12 | # Specify the location of the fastPHASE output files containing the parameter estimates.
# Example files can be found in the package installation directory.
r_file = system.file("extdata", "genotypes_rhat.txt", package = "SNPknock")
alpha_file = system.file("extdata", "genotypes_alphahat.txt", package = "SNPknock")
theta_file = system.file("extdata", "genotypes_thetahat.txt", package = "SNPknock")
char_file = system.file("extdata", "genotypes_origchars", package = "SNPknock")
# Read the parameter files and load the HMM
hmm = loadHMM(r_file, alpha_file, theta_file, char_file)
# Read the parameter files and load the HMM
hmm.large = loadHMM(r_file, alpha_file, theta_file, char_file, compact=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.