writeFasta2 | R Documentation |
prot
.
This function also allows comparing the main vector of sequences with a reference vector ref
to check if any of the sequences therein are truncated.Write sequences in fasta format to file
This function writes sequences from character vector as fasta formatted file (from UniProt)
Line-headers are based on names of elements of input vector prot
.
This function also allows comparing the main vector of sequences with a reference vector ref
to check if any of the sequences therein are truncated.
writeFasta2(
prot,
fileNa = NULL,
ref = NULL,
lineLength = 60,
eol = "\n",
truSuf = "_tru",
silent = FALSE,
debug = FALSE,
callFrom = NULL
)
prot |
(character) vector of sequenes, names will be used for fasta-header |
fileNa |
(character) name (and path) for file to be written |
ref |
(character) optional/additional set of (reference-) sequences (only for comparison to |
lineLength |
(integer, length=1) number of sequence characters per line (default 60, should be >1 and <10000) |
eol |
(character) the character(s) to print at the end of each line (row); for example, eol = "\r\n" will produce Windows' line endings on a Unix-alike OS |
truSuf |
(character) suffix to be added for sequences found truncated when comparing with |
silent |
(logical) suppress messages |
debug |
(logical) supplemental messages for debugging |
callFrom |
(character) allows easier tracking of messages produced |
Sequences without any names will be given generic headers like protein01 ... etc.
This function writes the sequences from prot
as fasta formatted-file
readFasta2
for reading fasta, write.fasta
from the package seqinr
prots <- c(SEQU1="ABCDEFGHIJKL", SEQU2="CDEFGHIJKLMNOP")
writeFasta2(prots, fileNa=file.path(tempdir(),"testWrite.fasta"), lineLength=6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.