Entering edit mode
When importing a BED file like:
1 chr1 0 257700
2 chr1 1125300 1182900
rtracklayer::import.bed()
creates a GRanges object like:
start end width
<integer> <integer> <integer>
[1] 1 257700 257700
[2] 1125301 1182900 57600
Is this expected?
It may be something fundamentally basic but I couldn't find an answer. The starts.in.df.are.0based
argument in makeGRangesFromDataFrame()
is not recognized by rtracklayer::import.bed()
.
Pretty much the same was asked at biostars the other day: https://www.biostars.org/p/9537845/#9537847
See also this "cheat sheet" towards 0- and 1-based formats: https://www.biostars.org/p/84686/
Actually, everything is 1-based that is human-readable, except BED. Some binary formats are 1-based as well but parsers will handle that internally if you use standard tools such as
samtools
(BAM for example is 1-based).