Commit 86fed3ec authored by khalid's avatar khalid
Browse files
parent 1dc8d0e2
......@@ -6,7 +6,7 @@ library(SeqArray);
gdsFile = snakemake@input[["gds"]]
k0vsk1_png = snakemake@output[["k0vsk1_png"]]
K1_heatmap_png = snakemake@output[["K1_heatmap_png"]]
K1_heatmap_png = snakemake@output[["k1_heatmap_png"]]
k0File = snakemake@output[["k0"]]
k1File = snakemake@output[["k1"]]
......@@ -17,20 +17,25 @@ threads = snakemake@threads
gds = seqOpen(gdsFile);
switch(methode,
MoM={
# PLINK method of moment
pibd <- snpgdsIBDMoM(gds,autosome.only=FALSE,num.thread=threads )
},
EM={
#by Maximum Likelihood Estimation. EM algorithm of searching maximum value of log likelihood function
pibd <- snpgdsIBDMLE(gds, method = "EM", autosome.only=FALSE,num.thread=threads)
},
downhill.simplex = {
#by Maximum Likelihood Estimation. downhill.simplex algorithm of searching maximum value of log likelihood function
pibd <- snpgdsIBDMLE(gds, method = "downhill.simplex", autosome.only=FALSE,num.thread=threads )
}
MoM={
# PLINK method of moment
pibd <- snpgdsIBDMoM(gds,autosome.only=FALSE,num.thread=threads )
},
EM={
#by Maximum Likelihood Estimation. EM algorithm of searching maximum value of log likelihood function
#See https://github.com/zhengxwen/SeqArray/issues/73
# a temporary solution is to provide a list of snp (here all snps) to the function
variant.id <- seqGetData(gds, "variant.id")
pibd <- snpgdsIBDMLE(gds, method = "EM",snp.id=variant.id, autosome.only=FALSE,num.thread=threads)
},
downhill.simplex = {
#by Maximum Likelihood Estimation. downhill.simplex algorithm of searching maximum value of log likelihood function
#See https://github.com/zhengxwen/SeqArray/issues/73
# a temporary solution is to provide a list of snp (here all snps) to the function
variant.id <- seqGetData(gds, "variant.id")
pibd <- snpgdsIBDMLE(gds, method = "downhill.simplex",snp.id=variant.id, autosome.only=FALSE,num.thread=threads )
}
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment