Learn R Programming

ChIPseqR (version 1.26.0)

pos2gff: Convert genome coordinates into GFF format

Description

Provides facility to export the location of genomic features to a GFF formatted file.

Usage

pos2gff(pos, method, feature, len, strand, score, name)

Arguments

pos
Named list with one component per chromosome giving the start position of features on that chromosome.
method
Entry for method field in GFF file. Recycled as necessary
feature
Entry for feature field in GFF file. Recycled as necessary
len
Length of fetures. This is used to calculate matching end positions for each start position given in pos
strand
Entry for feature field in GFF file. Recycled as necessary
score
Entry for feature field in GFF file. Recycled as necessary
name
Entry for feature field in GFF file. Recycled as necessary

Value

A data.frame with columns 'chromosome', 'method', 'feature', 'start', 'end', 'score', 'strand'. Writing this data frame to a text file produces a GFF formatted file.

References

The GFF specification: http://www.sanger.ac.uk/Software/formats/GFF/GFF_Spec.shtml

Examples

Run this code
pos <- list(chr1=c(10, 50, 60), chr2=c(22, 200, 500))
pos2gff(pos, "test", "foo", 25, c("+", "+", "-", "+", "-", "-"), 0, "test")

Run the code above in your browser using DataLab