tab2gff: creates a gff3-like table

View source: R/parsers.R

tab2gffR Documentation

creates a gff3-like table

Description

Creates a table with columns as present in gff3 genome annotation files, including ;-separated attribute lists. Columns with RGB colors can be used to create snapgene-specific note in attributes.

Usage

tab2gff(
  tab,
  columns = c(seqid = "chr", source = "source", type = "type", start = "start", end =
    "end", score = "score", strand = "strand", phase = "phase"),
  attributes = c(ID = "ID", Name = "name", Alias = "alias", Parent = "parent", color =
    "color"),
  notes,
  sep = "; ",
  source = c("chromosome", "plasmid")
)

Arguments

tab

input table of genomic features with chromosome coordinate information

columns

a named string vector mapping from columns in tab (values) to the first 7 columns required for the gff3 file (names)

attributes

a named string vector mapping from columns in tab (values) to values in the attribute list; the names of the vector will become the key in the attribute list ("<key> = <value>") and attributes will be separated by arugment sep

notes

as arguments but output will be "note=<key>=<value>

sep

separator for attribute list

source

identifier of main source feature (chromosome)


raim/segmenTools documentation built on April 25, 2024, 10:14 a.m.