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


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


  • 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.
  • The following table provides examples of these specifications:
  • "FullySpecified"checks that none of the letters are degenerate
    "DNA","RNA","Peptide",checks that the sequence is a particular type
    "FullySpecifiedDNA",checks both of the above specifications


open allclose all

Basic Examples  (1)

Test whether an expression is a valid BioSequence expression:

Scope  (6)

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:

Wolfram Research (2020), BioSequenceQ, Wolfram Language function,


Wolfram Research (2020), BioSequenceQ, Wolfram Language function,


@misc{reference.wolfram_2021_biosequenceq, author="Wolfram Research", title="{BioSequenceQ}", year="2020", howpublished="\url{}", note=[Accessed: 22-September-2021 ]}


@online{reference.wolfram_2021_biosequenceq, organization={Wolfram Research}, title={BioSequenceQ}, year={2020}, url={}, note=[Accessed: 22-September-2021 ]}


Wolfram Language. 2020. "BioSequenceQ." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2020). BioSequenceQ. Wolfram Language & System Documentation Center. Retrieved from