write_matrix {universalmotif} | R Documentation

## Export motifs as raw matrices.

### Description

Write motifs as simple matrices with optional headers to file.

### Usage

    write_matrix(motifs, file, positions = "columns", rownames = FALSE, type,
      sep = "", headers = TRUE, overwrite = FALSE, append = FALSE)

### Arguments

`motifs` | See `convert_motifs()` for acceptable formats.
`file` | `character(1)` File name.
`positions` | `character(1)` One of `c('columns', 'rows')`.
`rownames` | `logical(1)` Include alphabet letters as rownames.
`type` | `character(1)` One of `c('PCM', 'PPM', 'PWM', 'ICM')`. If missing will use whatever type the motif is currently stored as.
`sep` | `character(1)` Indicates how to separate individual motifs.
`headers` | `logical(1)`, `character(1)` Indicating if and how to write names.
`overwrite` | `logical(1)` Overwrite existing file.
`append` | `logical(1)` Add to an existing file.

### Value

`NULL`, invisibly.

### Author(s)

Benjamin Jean-Marie Tremblay, b2tremblay@uwaterloo.ca

### See Also

`read_matrix()`

Other write_motifs: `write_homer()`, `write_jaspar()`, `write_meme()`, `write_motifs()`, `write_transfac()`

### Examples

    motif <- create_motif()
    write_matrix(motif, tempfile(), headers = ">")

[Package universalmotif version 1.5.36 Index]