-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected behaviour with stretching w/o anchor #49
Comments
It looks like the default is to stretch out from the centre, , which is not what my documentation says, so this is at least unexpected in that regard. What output would expect here? Stretching by 2 away from the start and end? > x %>% mutate(start = start - 2L, end = end + 2L)
GRanges object with 2 ranges and 0 metadata columns:
seqnames ranges strand
<Rle> <IRanges> <Rle>
[1] 1 8-202 +
[2] 2 98-302 -
-------
seqinfo: 2 sequences from an unspecified genome; no seqlengths |
Probably should behave however the |
|
wondering if we could refactor here to have stretch just work inside |
@sa-lee I would expect Personally, I wouldn't mind an error (or warning + default anchor) if the interval is not anchored. |
Agreed, I would have expected |
Note that this also happens for: > stretch(anchor_center(x), 2)
seqnames ranges strand
<Rle> <IRanges> <Rle>
[1] 1 104-106 +
[2] 2 199-201 - (start, end, 5p, 3p anchors work as expected) |
Okey I'll change the default/centering to be like |
I didn't realize at before, but I'm also confused about > stretch(anchor_end(x), 2)
seqnames ranges strand
<Rle> <IRanges> <Rle>
[1] 1 12-200 +
[2] 2 102-300 - This seems to shorten rather than stretch? |
plyranges=1.0.3 reported at tidyomics/plyranges#49
Yep that looks wrong to me too. It should go the the other way. Turns out there was a wayward |
🎉 |
Hi,
I'm trying to
stretch
a genomic region using different anchoring. I also tried without anchoring, which yielded the (unexpected) result below:Why does it change the regions this way? (anchored stretching works as expected)
Using
IRanges_2.14.10
andplyranges_1.0.3
(current Bioconductor release).The text was updated successfully, but these errors were encountered: