Commit 0848081d authored by khalid's avatar khalid
Browse files

Use a SNP relate format before calling snpgdsIBDMLE

parent 86fed3ec
......@@ -26,7 +26,15 @@ switch(methode,
#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")
#sinon il faut transformer le seqarray en format SNPrelate
tmp = tempfile(pattern = "tmp", fileext = "snpRelate")
seqGDS2SNP(genofile, tmp, dosage=FALSE, compress.geno="LZMA_RA", compress.annotation="LZMA_RA", optimize=TRUE, verbose=TRUE)
#ouvrir le fichier
genofile <- snpgdsOpen(tmp)
pibd <- snpgdsIBDMLE(gds, method = "EM",snp.id=variant.id, autosome.only=FALSE,num.thread=threads)
unlink(tmp)
},
downhill.simplex = {
......@@ -34,7 +42,17 @@ switch(methode,
#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 )
#sinon il faut transformer le seqarray en format SNPrelate
tmp = tempfile(pattern = "tmp", fileext = "snpRelate")
seqGDS2SNP(genofile, tmp, dosage=FALSE, compress.geno="LZMA_RA", compress.annotation="LZMA_RA", optimize=TRUE, verbose=TRUE)
#ouvrir le fichier
genofile <- snpgdsOpen(tmp)
pibd <- snpgdsIBDMLE(genofile, method = "downhill.simplex",snp.id=variant.id, autosome.only=FALSE,num.thread=threads )
unlink(tmp)
}
)
......
Supports Markdown
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