
Read nucleotide sequence files in FASTA format
readFasta(file, rownames = FALSE)
File name of FASTA input.
Use the sequence annotation line in file (starts with
'>'
) as the row names. Will fail if there are duplicate items.
Data frame of each sequence in rows.
Sequence data in FASTA files are converted into data frame
suitable as input to bbl
. If sequence lengths are different,
instances longer than those already read will be truncated. Empty sequences
are skipped.
# NOT RUN {
file <- tempfile('data')
write('>seq1', file)
write('atgcc', file, append=TRUE)
write('>seq2', file, append=TRUE)
write('gccaa', file, append=TRUE)
system(paste0('cat ',file))
x <- readFasta(file)
x
# }
Run the code above in your browser using DataLab