Closed mtanic closed 4 years ago
Good morning,
Thanks for your interest in annotatr. I have sort of a busy day, but I wanted to let you know that I saw this, and I'll take a look by Friday.
Raymond
Thank you Raymond. I look forward gearing your comments.
Hi Raymond,
I got the correct number when using lapply to get the total width on the same object that gives negative values for inter-CGI, but have no idea why it behaves differently?!
lapply(annotations_CpGs.grl, function(x) sum(width(reduce(x))))
$hg19_cpg_islands
[1] 21842742
$hg19_cpg_shores
[1] 101866654
$hg19_cpg_shelves
[1] 87006497
$hg19_cpg_inter
[1] 2926445371
> sum(width(reduce(annotations_CpGs.grl)))
hg19_cpg_islands hg19_cpg_shores hg19_cpg_shelves
21842742 101866654 87006497
hg19_cpg_inter
-1368521925
Very interesting. I don't really know why this would happen, but suspect that it's something to do with the GRangesList
object and how the functions operate on it, rather than having something to do with the annotatr
package per se.
If you don't mind, I'll go ahead and close the issue.
Hi I was using hg19_cpgs annotations for CGI, shelves, shores and inter-CGI regions but when counting the size of each feature type I get negative values for inter-CGI regions. I am not sure how is this possible?
When I make separate annotations for each feature category and count width and compare it to the either the hg19_cpgs or manually mergeed GRangesList I get the same width for all features except for inter-CGI!
Do you know what could be the cause of this behaviour?
this is my code: