Learn R Programming

rtfbs (version 0.3.15)

read.ms: Reading in sequences from file

Description

Read Multiple Sequences from a FASTA file.

Usage

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

Run this code
# NOT RUN {
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")

# }

Run the code above in your browser using DataLab