ChromosomeCoordinates: Coordinates that can be pasted in a genome browser

Description Usage Arguments Details Value Author(s) See Also

Description

'ChromosomeCoordinates“ takes a data frame that contains chromosomal coordinates dispatched in several columns (chromosome, strand, etc.), and returns a character vector of chromosomal coordinates that can be used for instance as row names.

Usage

1
ChromosomeCoordinates(osctable, system = "phosphate")

Arguments

osctable

A data frame where each row contain chromosomal coordinates

system

Coordinate system: phosphate (0-based) or nucleotide (1-based).

Details

Notes about chromosomal coordinates

Phosphate-based (0-based)

Popular format including BED are said to be zero-based and open, numbering the first base of a chromosome as zero and not including the end position of the coordinates in the feature.

A biological interpretation is that they number the phosphates.

1
2
3
 0                  1                  2                  3
Base - phosphate - Base - phosphate - Base - phosphate - Base - phosphate ...
           1                   2                  3                  4

In the above example, the coordinate 1-2 indicates base 1.

Nucleotide-based (1-based)

Other popular formats, in particular GFF, are said to be 1-based and inclusice, numbering the first base of a chromomsome as 1 and including the end position of the coordinates in the feature.

1
2
 1                  2                  3                  4
Base - phosphate - Base - phosphate - Base - phosphate - Base - phosphate ...

In the above example, the coordinate 1-2 indicates bases 1 and 2.

Conversions between the systems

1
2
3
 1                  2                  3                  4
Base - phosphate - Base - phosphate - Base - phosphate - Base - phosphate ...
          1                   2                  3                  4

Value

A character vector of chromosomal coordinates, like chr1:1397306-1397353+.

Author(s)

Charles Plessy

See Also

read.osc


charles-plessy/oscR documentation built on May 13, 2019, 3:31 p.m.