Skip to content

Instantly share code, notes, and snippets.

@sirusb
Created February 18, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sirusb/6d0851b5b951c3c8eebe to your computer and use it in GitHub Desktop.
Save sirusb/6d0851b5b951c3c8eebe to your computer and use it in GitHub Desktop.
gr[1:2]
#GRanges object with 2 ranges and 1 metadata column:
# seqnames ranges strand | score
# <Rle> <IRanges> <Rle> | <numeric>
# [1] chr1 [ 130, 379] + | 0.0297835641540587
# [2] chr1 [30050, 31349] + | 0.42395940516144
# -------
# seqinfo: 3 sequences from an unspecified genome; no seqlengths
start(gr)
#[1] 130 30050 4509 69098
end(gr)
#[1] 379 31349 4908 69687
width(gr)
#[1] 250 1300 400 590
seqnames(gr)
#factor-Rle of length 4 with 3 runs
# Lengths: 2 1 1
# Values : chr1 chr2 chrX
#Levels(3): chr1 chr2 chrX
values(gr)
#DataFrame with 4 rows and 1 column
# score
# <numeric>
#1 0.02978356
#2 0.42395941
#3 0.11233843
#4 0.80039317
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment