Module contents

SNPknock module

knockoffDMC Class for knockoffs of a discrete Markov chain.
knockoffDMC.sample(self, X) Sample a knockoff copy of each row of X.
knockoffHMM Class for knockoffs of a hidden Markov model.
knockoffHMM.sample(self, X) Samples a knockoff copy of each row of X.
knockoffGenotypes Class for knockoffs of a hidden Markov model.
knockoffGenotypes.sample(self, X) Samples a knockoff copy of each row of X.
knockoffHaplotypes Class for knockoffs of a hidden Markov model.
knockoffHaplotypes.sample(self, X) Samples a knockoff copy of each row of X.

SNPknock.fastphase submodule

fastphase.writeXtoInp(X, out_file[, phased]) Convert the genotype data matrix X (consisting of 0,1 and 2’s) into the fastPhase input format and saves it to a text file.
fastphase.runFastPhase(X_file, out_path[, …]) This function calls fastPhase to fit an HMM to the genotype data.
fastphase.loadHMM(r_file, alpha_file, …[, …]) Load the parameter estimates obtained by fastPhase and assembles the HMM model for the genotype data.

SNPknock.models submodule

models.DMC(pInit, Q) Discrete Markov chain model.
models.DMC.sample([n]) Sample the observations from their marginal distribution.
models.HMM(pInit, Q, pEmit) Hidden Markov model with a discrete emission distribution.
models.HMM.sample([n]) Sample the n observations of the hidden Markov model.