readGFF {microseq}R Documentation

Reading and writing GFF-tables

Description

Reading or writing a GFF-table from/to file.

Usage

readGFF(in.file)
writeGFF(gff.table, out.file)

Arguments

in.file

Name of file with a GFF-table.

gff.table

A table (tibble) with genomic features information.

out.file

Name of file.

Details

A GFF-table is simply a tibble with columns adhering to the format specified by the GFF3 format, see https://github.com/The-Sequence-Ontology/Specifications/blob/master/gff3.md for details. There is one row for each feature.

The following columns should always be in a full gff.table of the GFF3 format:

Missing values are described by "." in the GFF3 format. This is also done here, except for the numerical columns Start, End, Score and Phase. Here NA is used, but this is replaced by "." when writing to file.

The readGFF function will also read files where sequences in FASTA format are added after the GFF-table. This file section must always start with the line ##FASTA. This fasta object is added to the GFF-table as an attribute (use attr(gff.tbl, "FASTA") to retrieve it).

Value

readGFF returns a gff.table with the columns described above.

writeGFF writes the supplied gff.table to a text-file.

Author(s)

Lars Snipen and Kristian Hovde Liland.

See Also

findOrfs, lorfs.

Examples

# Using a GFF file in this package
gff.file <- file.path(path.package("microseq"),"extdata","small.gff")

# Reading gff-file
gff.tbl <- readGFF(gff.file)


[Package microseq version 2.1.6 Index]