Entering edit mode
7.9 years ago
modockesner
▴
10
Hi, I am new at genomic ranges and have a gr ranges data set and am trying to convert it into a bed files. However, when I attempt to get a list of chromosome using seqnames(gr), it produces a list like
RleList of length 29646
$NM_008866
factor-Rle of length 1 with 1 run
Lengths: 1
Values : chr1
Levels(66): chr1 chr2 chr3 ... chrUn_GL456396 chrUn_JH584304
$NM_001159750
factor-Rle of length 1 with 1 run
Lengths: 1
Values : chr1
Levels(66): chr1 chr2 chr3 ... chrUn_GL456396 chrUn_JH584304
$NM_011541
factor-Rle of length 1 with 1 run
Lengths: 1
Values : chr1
Levels(66): chr1 chr2 chr3 ... chrUn_GL456396 chrUn_JH584304
How do I extract the "chr?" names from this list. I tried inverse.rle(seqnames(gr) and this fails!
Perhaps take a look at a previous thread on conversion: How To Write Data In A Granges Object To A Bed File.