ms: Multiple Sequence (MS) Objects

Description Usage Arguments Details Value Author(s) See Also

View source: R/tfbs.R

Description

Creates a new Multiple Sequences (MS) object to hold given sequences.

Usage

1
ms(seqs, names = NULL, offsets = NULL, pointer.only = FALSE)

Arguments

seqs

A character vector containing sequences, one per sample

names

A character vector identifying the sample name for each sequence. If NULL, use "seq1", "seq2", ...

offsets

List of integers giving the offset for each sequences from the start of its unsplit sequence. If NULL, offsets of zero are assumed for each sequence.

pointer.only

a boolean indicating whether returned alignment object should be stored by reference (see Details)

Details

Make a new multiple sequence (MS) object given a vector of character strings. They can be optionally annotated with sample names.

The number of elements in names (if provided) must match the number of elements in seqs.

An alphabet (valid non-missing characters) of "ACGT" is automatically assumed for all sequences that RTFBS operates on.

About storing objects as pointers: If pointer.only==FALSE, the MS object will be stored in R and can be viewed and modified by base R code as well as RTFBS functions. Setting pointer.only=TRUE will cause the object to be stored by reference, as an external pointer to an object created by C code. This may be necessary to improve performance, but the object can then only be viewed/manipulated via RTFBS functions. Furthermore, if an object is stored as a pointer, then its value is liable to be changed when passed as an argument to a function.

Value

An ms object. These are stored in an array-like format, so that they can be subsetted with the [] operator.

Author(s)

Nick Peterson

See Also

Functions for accessing/viewing ms objects: sequences.ms, offsets.ms, length.ms, lengths.ms, names.ms, print.ms, write.ms, [.ms, as.pointer.ms, from.pointer.ms, is.pointer.ms


rtfbs documentation built on Jan. 22, 2020, 1:07 a.m.