Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mmassaviol
WAWmassaviol
Commits
0848081d
Commit
0848081d
authored
Sep 13, 2021
by
khalid
Browse files
Use a SNP relate format before calling snpgdsIBDMLE
parent
86fed3ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/Relatedness_gds/Relatedness_gds.script.R
View file @
0848081d
...
...
@@ -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
)
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment