write_matrix: Export motifs as raw matrices.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/write_matrix.R

Description

Write motifs as simple matrices with optional headers to file.

Usage

1
2
3
write_matrix(motifs, file, positions = "columns", rownames = FALSE, type,
  sep = "", headers = TRUE, overwrite = FALSE, append = FALSE,
  digits = 6)

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.

digits

numeric(1) Number of digits to use for motif positions.

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

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

universalmotif documentation built on April 8, 2021, 6 p.m.