Skip to content

Instantly share code, notes, and snippets.

@sirusb
Created February 19, 2015 12:12
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/5206a1b2bd81db384d45 to your computer and use it in GitHub Desktop.
Save sirusb/5206a1b2bd81db384d45 to your computer and use it in GitHub Desktop.
# rtracklayer يمكن استعمال الدوال الجاهزة في حزمة
encodePilotRegions <- import.bed("encodePilotRegion.bed")
encodePilotRegions
#GRanges object with 44 ranges and 1 metadata column:
# seqnames ranges strand | name
# <Rle> <IRanges> <Rle> | <character>
# [1] chr1 [151158061, 151658060] * | ENr231
# [2] chr2 [ 51658705, 52158704] * | ENr112
# [3] chr2 [118294574, 118794573] * | ENr121
# [4] chr2 [220277346, 220777345] * | ENr331
# [5] chr2 [234491825, 234991888] * | ENr131
# ... ... ... ... ... ...
# [40] chr19 [54331773, 55332648] * | ENm007
# [41] chr20 [33841513, 34341514] * | ENr333
# [42] chr21 [33746366, 35442351] * | ENm005
# [43] chr21 [40322597, 40822596] * | ENr133
# [44] chr22 [31803954, 33503953] * | ENm004
# -------
# seqinfo: 21 sequences from an unspecified genome; no seqlengths
# أو يمكن تحضير كل شيء يدويا
df <- read.table("encodePilotRegion.bed",sep="\t")
head(df)
# V1 V2 V3 V4
#1 chr1 151158060 151658060 ENr231
#2 chr2 51658704 52158704 ENr112
#3 chr2 118294573 118794573 ENr121
#4 chr2 220277345 220777345 ENr331
#5 chr2 234491824 234991888 ENr131
#6 chr4 118246655 118746655 ENr113
encodePilotRegions2
#GRanges object with 44 ranges and 1 metadata column:
# seqnames ranges strand | name
# <Rle> <IRanges> <Rle> | <factor>
# [1] chr1 [151158060, 151658060] * | ENr231
# [2] chr2 [ 51658704, 52158704] * | ENr112
# [3] chr2 [118294573, 118794573] * | ENr121
# [4] chr2 [220277345, 220777345] * | ENr331
# [5] chr2 [234491824, 234991888] * | ENr131
# ... ... ... ... ... ...
# [40] chr19 [54331772, 55332648] * | ENm007
# [41] chr20 [33841512, 34341514] * | ENr333
# [42] chr21 [33746365, 35442351] * | ENm005
# [43] chr21 [40322596, 40822596] * | ENr133
# [44] chr22 [31803953, 33503953] * | ENm004
# -------
# seqinfo: 21 sequences from an unspecified genome; no seqlengths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment