Hello, I have a weird problem while trying to import a bed file as a GRanges object. So my bed file is:
chr1 6780000 7440000 . 0 .
chr1 8430000 8910000 . 0 .
chr1 10560000 10950000 . 0 .
chr1 26910000 27150000 . 0 .
chr1 27600000 27930000 . 0 .
chr1 32040000 32850000 . 0 .
chr1 38460000 39330000 . 0 .
chr1 44670000 45750000 . 0 .
And when I use rtracklayers function import.bed, the GRanges object has the starting coordinate increased by one:
library(rtracklayer)
library(GenomicRanges)
test.bed.gr <- import.bed("Analysis/random/test.bed")
test.bed.gr
GRanges object with 8 ranges and 2 metadata columns:
seqnames ranges strand | name score
<Rle> <IRanges> <Rle> | <character> <numeric>
[1] chr1 6780001-7440000 * | <NA> 0
[2] chr1 8430001-8910000 * | <NA> 0
[3] chr1 10560001-10950000 * | <NA> 0
[4] chr1 26910001-27150000 * | <NA> 0
[5] chr1 27600001-27930000 * | <NA> 0
[6] chr1 32040001-32850000 * | <NA> 0
[7] chr1 38460001-39330000 * | <NA> 0
[8] chr1 44670001-45750000 * | <NA> 0
Thank you! This is really important to know!