pos2gff: Convert genome coordinates into GFF format

Description Usage Arguments Value Author(s) References Examples

View source: R/package.R

Description

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

Usage

1
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.

Author(s)

Peter Humburg

References

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

Examples

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

ChIPseqR documentation built on Nov. 8, 2020, 6:49 p.m.