Closed YiweiNiu closed 3 years ago
Hello,
Yes this sounds like a bug in sign_compartmentscore
, but I'm unsure how to replicate this bug. I'll have a closer look at what might go wrong when I have some more time. If we could replicate the bug with, for example, the test data, that would be very helpful.
Hi,
Thank you for your quick reply.
I manually ran each step of the function saddle()
, and I found it was due to NA
values in the scores
.
> sum(is.na(scores$M0))
[1] 0
> sum(is.na(scores$M1))
[1] 107
> sum(is.na(scores$M2))
[1] 107
> scores[scores$part == 'chrYp',]
chrom start end bin M0 M1 M2 part
1: chrY 0 100000 26352 0 NA NA chrYp
2: chrY 100000 200000 26353 0 NA NA chrYp
3: chrY 200000 300000 26354 0 NA NA chrYp
4: chrY 300000 400000 26355 0 NA NA chrYp
5: chrY 400000 500000 26356 0 NA NA chrYp
---
103: chrY 10200000 10300000 26454 0 NA NA chrYp
104: chrY 10300000 10400000 26455 0 NA NA chrYp
105: chrY 10400000 10500000 26456 0 NA NA chrYp
106: chrY 10500000 10600000 26457 0 NA NA chrYp
107: chrY 10600000 10700000 26458 0 NA NA chrYp
It is because that Line 111 of saddle.R removes NA
values only from the first object.
scores <- scores[!is.na(eval(as.symbol(expnames[1]))), ]
I modified this line.
for (i in expnames) {
scores <- scores[!is.na(eval(as.symbol(i))), ]
}
And it works now.
Hi YiweiNiu,
We've implemented your suggested modification in the current dev version. Thanks for spotting and fixing this bug!
Best, Teun
Hi,
When I used the ATAC-seq peaks for
compartment_score
, thesaddle
function would throw an error.And when not using the
bed
option incompartment_score
, thesaddle
function could run successfully.And it would report the same error when using
sign_compartmentscore
for this unsignedCS_discovery
object.I am using the
dev
version of GENOVA.Thanks in advance.