read_matrix: Import motifs from raw matrices.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/read_matrix.R

Description

Import simply formatted motifs.

Usage

1
2
3
read_matrix(file, skip = 0, type, positions = "columns",
  alphabet = "DNA", sep = "", headers = TRUE, rownames = FALSE,
  comment = NULL)

Arguments

file

character(1) File name.

skip

numeric(1) If not zero, will skip however many desired lines in the file before starting to read.

type

character(1) One of c('PCM', 'PPM', 'PWM', 'ICM'). If missing will try and guess which one.

positions

character(1) One of c('columns', 'rows'). Partial matching allowed. Indicate whether each position within a motif is represented as a row or a column in the file.

alphabet

character(1) One of c('DNA', 'RNA', 'AA'), or a string of letters.

sep

character(1) Indicates how individual motifs are separated.

headers

logical(1), character(1) Indicating if and how to read names.

rownames

logical(1) Are there alphabet letters present as rownames?

comment

NULL, character(1) Character denoting lines to be considered comments.

Value

list universalmotif objects.

Author(s)

Benjamin Jean-Marie Tremblay, b2tremblay@uwaterloo.ca

See Also

Other read_motifs: read_cisbp(), read_homer(), read_jaspar(), read_meme(), read_motifs(), read_transfac(), read_uniprobe()

Examples

1
2
   hocomoco <- system.file("extdata", "hocomoco.txt", package = "universalmotif")
   hocomoco <- read_matrix(hocomoco, headers = ">", positions = "rows")

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