read.ms: Reading in sequences from file

Description Usage Arguments Value See Also Examples

View source: R/tfbs.R

Description

Read Multiple Sequences from a FASTA file.

Usage

1
read.ms(filename, pointer.only = FALSE)

Arguments

filename

The name of the input file containing the sequences. File should be in FASTA format.

pointer.only

If TRUE, sequences within the MS will be stored by reference as external pointers to objects created by C code, rather than directly in R memory. This improves performance and may be necessary for large files, but reduces functionality.

Value

MS object containing sequences read from file

See Also

ms for further description of MS objects and pointer.only option.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
require("rtfbs")
exampleArchive <- system.file("extdata", "NRSF.zip", package="rtfbs")
seqFile <- "input.fas"
unzip(exampleArchive, seqFile)
# Read in FASTA file "input.fas" from the examples into an 
#   MS (multiple sequences) object
seqs <- read.ms(seqFile)
# Print the number of sequences in the MS object and whether
#   stored in C or R
print(seqs)
unlink("input.fas")

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