read_fasta {tidysq} | R Documentation |
Read a FASTA file
Description
Reads a FASTA file that contains nucleotide or amino acid
sequences and returns a tibble
with obtained data.
Usage
read_fasta(
file_name,
alphabet = NULL,
NA_letter = getOption("tidysq_NA_letter"),
safe_mode = getOption("tidysq_safe_mode"),
on_warning = getOption("tidysq_on_warning"),
ignore_case = FALSE
)
Arguments
file_name |
[ |
alphabet |
[ |
NA_letter |
[ |
safe_mode |
[ |
on_warning |
[ |
ignore_case |
[ |
Details
All rules of creating sq
objects are the same as in sq
.
Value
A tibble
with number of rows equal to the
number of sequences and two columns:
namespecifies name of a sequence, used in functions like
find_motifs
sqcontains extracted sequence itself
See Also
Functions from input module:
import_sq()
,
random_sq()
,
sq()
Examples
fasta_file <- system.file(package = "tidysq", "examples/example_aa.fasta")
# In this case, these two calls are equivalent in result:
read_fasta(fasta_file)
read_fasta(fasta_file, alphabet = "ami_bsc")
## Not run:
# It's possible to read FASTA file from URL:
read_fasta("https://www.uniprot.org/uniprot/P28307.fasta")
## End(Not run)