is_sequence | R Documentation |
A simple test function to ensure the provided sequence is an acceptable amino acid sequence. ProForma sequences are accepted.
is_sequence(Sequence, Message = FALSE, AlternativeGlossary = NULL)
Sequence |
An amino acid sequence which should be a single string. Required. |
Message |
Explain why the test failed. Default is FALSE. |
AlternativeGlossary |
Try a different glossary. See system.file("extdata", "Unimod_v20220602.csv", package = "pspecterlib) for formatting. |
The output will either be a "TRUE" acceptable sequence, or "FALSE" unacceptable sequence. An acceptable sequence cannot be NULL, will not have any spaces or non-letter characters, will be longer than 1 amino acid, and will not contain the letters B, J, O, U, X, or Z. ProForma notation (i.e. "TES[Acetyl]T") is now accepted.
## Not run:
# An acceptable sequence will return TRUE
is_sequence("TEST")
is_sequence("TES[Acetyl]T")
is_sequence("T[58.77]E[Acetyl]ST")
# Unacceptable sequences will return FALSE
is_sequence("TESTSEQUENCE")
is_sequence("TIRED $CIENTIST WORKING L8")
is_sequence("T")
is_sequence("T[UnfinishedEST")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.