On Tue, Apr 13, 2010 at 3:35 AM, margherita mutarelli <
margherita.mutarelli@gmail.com> wrote:

> Dear all,
>
> please apologize if I missed this information, but I have looked throughout
> the documentation and vignettes of the IRanges packages and I could not
> find
> this information:
>
> are the coordinates in IRanges objects considered as "0-indexed" or
> "1-indexed"?
>
> I.e. when importing the refGene.txt table (or any) from UCSC, we know that
> they are 0-indexed, meaning that the first base is not part of the
> gene/transcript/object.
> If IRanges are 1-index this means we have to subtract 1 from the start
> coordinate precedent in the table when creating an IRanges object from
> them.
>
>
When used as indices into a sequence, they are treated as 1-based. This
comes simply from all indexing in R being 1-based.

Btw, with packages like rtracklayer and GenomicFeatures, you probably do not
need to be manually importing data like the example above.



> Is it correct?
> This can be important to clarify, both when considering overlap of features
> and in junctions, since it can shift the correct exon boundaries.
>
> Cheers,
>
> Margherita
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioc-sig-sequencing mailing list
> Bioc-sig-sequencing@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
>

	[[alternative HTML version deleted]]

