BioSequenceQ

BioSequenceQ[bioseq]

returns True if bioseq is a valid BioSequence expression, and False otherwise.

BioSequenceQ[bioseq,spec]

returns True if bioseq is a valid BioSequence expression matching a specification spec, and False otherwise.

BioSequenceQ[bioseq,spec1|spec2|...]

returns True if bioseq is a valid BioSequence expression matching any of the speci, and False otherwise.

Details

  • Possible values for specification include "FullySpecified", the canonical name of any "BioSequenceType" entity or the two concatenated. If an "ExtendedBioSequenceType" entity is defined, its canonical name can also be used as a specification.
  • Possible values for specification include "FullySpecified", the canonical name of any "BioSequenceType" entity, or the two concatenated. If an "ExtendedBioSequenceType" entity is defined, its canonical name can also be used as a specification. "HybridStrand" and "SequenceCollection" can be used to see if the sequence is a hybrid strand or a sequence collection, respectively.
  • The following table provides examples of these specifications:
  • "DNA","RNA","Peptide",checks that the sequence is a particular type
    "FullySpecified"checks that none of the letters are degenerate
    "FullySpecifiedDNA",checks both of the preceding specifications
  • Any combination of specifications can be supplied with Alternatives and a valid sequence will be recognized if any specification matches.

Examples

open allclose all

Basic Examples  (1)

Test whether an expression is a valid BioSequence expression:

Scope  (10)

A BioSequence with an invalid letter for the given type will be found False by BioSequenceQ:

Inputs with heads other than BioSequence will also be False:

Degenerate letters appropriate to the type of BioSequence will be recognized as valid:

The "FullySpecified" specification will enforce validating only nondegenerate letters:

Letters with a specific meaning, such as the peptide stop character, will be considered fully specified even though they do not refer to a particular chemical:

Validate the type of the BioSequence:

Validate a BioSequence being fully specified and of a particular type simultaneously:

Any letters are valid for a sequence without a type:

Sequences without a type are never fully specified:

Validate sequences for extended types:

Check that a sequence is a valid hybrid strand:

Verify that a sequence is a valid sequence collection:

Test if a sequence is a DNA or RNA BioSequence:

Test if a sequence is a peptide or circular peptide:

Wolfram Research (2020), BioSequenceQ, Wolfram Language function, https://reference.wolfram.com/language/ref/BioSequenceQ.html (updated 2021).

Text

Wolfram Research (2020), BioSequenceQ, Wolfram Language function, https://reference.wolfram.com/language/ref/BioSequenceQ.html (updated 2021).

CMS

Wolfram Language. 2020. "BioSequenceQ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/BioSequenceQ.html.

APA

Wolfram Language. (2020). BioSequenceQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BioSequenceQ.html

BibTeX

@misc{reference.wolfram_2024_biosequenceq, author="Wolfram Research", title="{BioSequenceQ}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/BioSequenceQ.html}", note=[Accessed: 22-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_biosequenceq, organization={Wolfram Research}, title={BioSequenceQ}, year={2021}, url={https://reference.wolfram.com/language/ref/BioSequenceQ.html}, note=[Accessed: 22-December-2024 ]}