Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Armin Rauschenberger
joinet
Commits
2d00e676
Commit
2d00e676
authored
Jul 26, 2018
by
Rauschenberger
Browse files
automation
parent
c1b98027
Changes
1
Hide whitespace changes
Inline
Side-by-side
R/functions.R
View file @
2d00e676
...
...
@@ -861,12 +861,22 @@ test.multiple <- function(Y,X,map,rho=c(0,0.5,1),spec=1,steps=20){
steps
[
length
(
steps
)]
<-
max
-
sum
(
steps
[
-
length
(
steps
)])
}
if
(
TRUE
){
# temporary trial, delete this!
max
<-
limit
<-
steps
<-
100
if
(
TRUE
){
max
<-
p
/
0.05+1
limit
<-
ceiling
(
0.05
*
max
/
p
)
steps
<-
diff
(
limit
^
seq
(
from
=
log
(
100
),
to
=
log
(
max
)
/
log
(
limit
),
length.out
=
pmin
(
p
,
steps
)))
steps
[
steps
<
100
]
<-
100
for
(
i
in
1
:
10
){
cond
<-
steps
>
10
^
i
&
steps
<
10
^
(
i
+1
)
steps
[
cond
]
<-
ceiling
(
steps
[
cond
]
/
10
^
i
)
*
10
^
i
}
steps
<-
steps
[
cumsum
(
steps
)
<=
max
]
steps
[
length
(
steps
)
+1
]
<-
max
-
sum
(
steps
)
}
if
(
max
!=
sum
(
steps
)){
stop
(
"Invalid combination?"
,
call.
=
FALSE
)}
if
(
any
(
steps
<
0
)){
stop
(
"negative step"
,
call.
=
FALSE
)}
if
(
max
!=
sum
(
steps
)){
stop
(
"invalid step"
,
call.
=
FALSE
)}
if
(
spec
==
1
){
pvalue
<-
lapply
(
X
=
seq_len
(
p
),
FUN
=
function
(
i
)
spliceQTL
::
test.single
(
Y
=
Y
,
X
=
X
,
map
=
map
,
i
=
i
,
limit
=
limit
,
steps
=
steps
,
rho
=
rho
))
}
else
{
...
...
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