Hi,
I have a bed file containing chromosome number and start to end position of reads. This bed file is 0-based so the first read starts from 0 instead of one.
I converted the bed file into GRanges object in the following way:
I end up with a GRanges object of my bed file where the starting positions are all shifted by one nucleotide i.e. 0 become 1, 5 becomes 6, and so on. However, the end position is not shifted. It seems to me that the function trims one nucleotide of every read at the starting point. So, can anyone explain to me what is actually happen and what was the motivation?
Thanks. Cheers.
I have a bed file containing chromosome number and start to end position of reads. This bed file is 0-based so the first read starts from 0 instead of one.
I converted the bed file into GRanges object in the following way:
Code:
makeGRangesFromDataFrame(mybedfile, starts.in.df.are.0based=T, seqinfo = Seqinfo(seqnames=as.character(unique(mybedfile$chr)), seqlengths = seq.lengths))
Thanks. Cheers.
Comment