Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zeller Group
SIAMCAT
Commits
c1cd12c5
Commit
c1cd12c5
authored
Jul 28, 2021
by
Jakob Wirbel
Browse files
enforce tab limit for bioconductor.
parent
724e37b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
R/check_associations.r
View file @
c1cd12c5
...
...
@@ -186,8 +186,8 @@ check.associations <- function(siamcat, fn.plot=NULL, color.scheme = "RdYlBu",
# check that each entry in "paired" has two samples associated with
# a different label, filter out the rest
groups
<-
unique
(
meta
[[
paired
]])
if
(
verbose
>
2
)
message
(
"+++ Starting with "
,
length
(
groups
),
" pairings"
)
if
(
verbose
>
2
)
message
(
"+++ Starting with "
,
length
(
groups
),
" pairings"
)
groups.red
<-
groups
[
vapply
(
groups
,
FUN
=
function
(
x
){
temp
<-
label
$
label
[
rownames
(
meta
[
meta
[[
paired
]]
==
x
,])]
if
(
length
(
unique
(
temp
))
!=
2
){
...
...
@@ -1372,17 +1372,17 @@ analyse.binary.marker <- function(feat, label, detect.lim, colors,
}
else
{
pairing.info
<-
sort
(
pairing.info
)
x.pos
<-
x
[
names
(
which
(
label
$
label
[
names
(
pairing.info
)]
==
positive.label
))]
positive.label
))]
x.neg
<-
x
[
names
(
which
(
label
$
label
[
names
(
pairing.info
)]
==
negative.label
))]
negative.label
))]
if
(
take.log
==
TRUE
){
fc
<-
mean
(
log10
(
x.pos
+
detect.lim
)
-
log10
(
x.neg
+
detect.lim
))
log10
(
x.neg
+
detect.lim
))
}
else
{
fc
<-
mean
(
x.pos
-
x.neg
)
}
p.val
<-
wilcox.test
(
x.pos
,
x.neg
,
exact
=
FALSE
,
paired
=
TRUE
)
$
p.value
paired
=
TRUE
)
$
p.value
# AU-ROC
temp
<-
roc
(
cases
=
x.pos
,
controls
=
x.neg
,
...
...
@@ -1397,7 +1397,6 @@ analyse.binary.marker <- function(feat, label, detect.lim, colors,
}
if
(
verbose
)
pb
$
tick
()
return
(
c
(
'fc'
=
fc
,
'p.val'
=
p.val
,
'auc'
=
aucs
[
2
],
...
...
Write
Preview
Supports
Markdown
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