View source: R/sequenceCheck.R
sequenceCheck | R Documentation |
This is used validate a sequence of amino acids. It can additionally be used to load an amino acid sequence. It can also be used to coerce a sequence into a specific format.
sequenceCheck( sequence, method = "stop", outputType = "string", nonstandardResidues = NA, suppressAAWarning = FALSE, suppressOutputMessage = FALSE )
sequence |
amino acid sequence as a single character string, a vector of single characters, or an AAString object. It also supports a single character string that specifies the path to a .fasta or .fa file. |
method |
Required Setting.
|
outputType |
Required Setting. "string" By default.
|
nonstandardResidues |
Optional setting.
Expands the amino acid alphabet.
NA or Character vector required.
Default values are "ACDEFGHIKLMNPQRSTVWY". Additional letters added here.
|
suppressAAWarning |
If using nonstandardResidues,
a warning will be issued.
set |
suppressOutputMessage |
Set |
A message and sequence are returned.
If suppressOutputMessage = T
, the message is not returned.
If outputType = "None")
, the sequence is not returned.
Otherwise, outputType will determine the format of the returned sequence.
If the sequence contains an error, it will be reported
based on the value of method.
The Sequence will be assigned to the value "Sequence" if sequenceName
is not specified. Otherwise the sequence is assigned to the value of
sequenceName. This allows the sequences to be called by the user.
#Amino acid sequences can be character strings aaString <- "ACDEFGHIKLMNPQRSTVWY" #Amino acid sequences can also be character vectors aaVector <- c("A", "C", "D", "E", "F", "G", "H", "I", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "V", "W", "Y") #Alternatively, .fasta files can also be used by providing ##The path to the file as a character string ## Not run: sequenceCheck(aaString) sequenceCheck(aaVector) #To allow O and U sequenceCheck(aaString, nonstandardResidues = c("O", "U"), suppressAAWarning = TRUE) #To turn off output message sequenceCheck(aaString, suppressOutputMessage = TRUE) #To change string to be a vector sequenceCheck(aaString, outputType = "vector") #To not return a sequence but check the input sequenceCheck(aaVector, outputType = "none") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.