WriteGenes {DECIPHER} | R Documentation

## Write Genes to a File

### Description

Writes predicted genes to a file in GenBank (gbk) or general feature format (gff).

### Usage

    WriteGenes(x,
               file = "",
               format = "gbk",
               append = FALSE)

### Arguments

`x` | An object of class `Genes`.
`file` | A connection or a character string naming the file path where the tree should be exported. If "" (the default), the tree is printed to the standard output connection, the console unless redirected by sink.
`format` | Character specifying `"gbk"` or `"gff"` output format.
`append` | Logical indicating whether to append to an existing `file`. Only applicable if `file` is a character string. If `FALSE` (the default), then the file is overwritten.

### Details

`WriteGenes` will write a `"Genes"` object to a GenBank (if `format` is `"gbk"`) or general feature format (if `format` is `"gff"`) file.

### Value

`NULL`.

### Author(s)

Erik Wright eswright@pitt.edu

### See Also

`ExtractGenes`, `FindGenes`, `Genes-class`

### Examples

    # import a test genome
    fas <- system.file("extdata",
    	"Chlamydia_trachomatis_NC_000117.fas.gz",
    	package="DECIPHER")
    genome <- readDNAStringSet(fas)

    x <- FindGenes(genome)
    WriteGenes(x[1:10,], format="gbk")
    WriteGenes(x[1:10,], format="gff")

[Package DECIPHER version 2.20.0 Index]