Build GPos from IPos
2
@maltethodberg-9690
Last seen 6 days ago
Denmark
It would be great if one could construct a GPos from and IPos, similarly to how one can construct a GRanges from an IRanges:
GRanges(seqnames=rep("chr1", 3), ranges=IRanges(start=1:3, width=1)) # Works
GPos(seqnames=rep("chr1", 3), ranges=IPos(1:3)) # Doesn't work
genomicranges
granges
gpos
• 1.3k views
@herve-pages-1542
Last seen 6 hours ago
Seattle, WA, United States
Hi,
This works with the latest devel version of GenomicRanges (1.37.13):
GPos( "A" , pos= IPos( "3-8" ))
GPos( "chr1" , pos= IPos( 1:3))
However, please note that the 2nd argument of the GPos( )
constructor function is named pos
rather than ranges
:
args( GRanges)
args( GPos)
Also note that IPos and GPos objects now exist in 2 flavors: unstitched and stitched . The stitched flavor corresponds to what IPos and GPos objects used to be. See ?IPos
and ?GPos
for more information.
Best,
H.
Login before adding your answer.
Traffic: 605 users visited in the last hour