BioSequenceModify
gives the result of applying the modification "mod" to the sequence seq.
represents an operator form of BioSequenceModify that can be applied to a biomolecular sequence.
Details

- Bond modifications:
-
{"AddBond",{i1,i2}} add a higher-order bond between letters at i1 and i2 {"AddBond",Bond[{i1,i2},"type"]} add a bond of the given type between the given indices {"DeleteBond",{i1,i2}} remove all higher-order bonds between the given indices {"DeleteBond",Bond[{i1,i2},"type"]} remove the specified bond between the given indices - Circularity adjustment modifications:
-
"MakeCircular" convert a linear sequence into a circular sequence "MakeLinear" convert a circular sequence into a linear sequence {"MakeLinear",i} convert to a linear sequence, starting at the i position
- Collection modifications:
-
{"AddToCollection",{seq1,seq2,…}} incorporate a list of sequences into a sequence collection "SplitDisconnectedCollection" separate unbonded clusters into separate collections - Representation-only modifications:
-
"InnermostBondRepresentation" represent bonds at the innermost applicable sequence "OutermostBondRepresentation" represent bonds at the outermost sequence "CanonicalRepresentation" convert all sequences and bonds to a canonical form - Translation modifications:
-
"DropIncompleteCodons" drop incomplete codons from the end of DNA or RNA "DropToStartCodon" drop letters from DNA or RNA until a start codon is found "DropFromStopLetter" drop the letters from a peptide after a stop letter is found
Examples
open allclose allBasic Examples (12)Summary of the most common use cases

https://wolfram.com/xid/0c0rop47925i0-3d5rmr

Delete a bond from a sequence:

https://wolfram.com/xid/0c0rop47925i0-jdgraf

Represent all bonds at the innermost sequence, with all letters included:

https://wolfram.com/xid/0c0rop47925i0-russbw

Represent all bonds at the outermost sequence:

https://wolfram.com/xid/0c0rop47925i0-6lp7g6

Canonicalize the representation of bonds and sequences into a sorted and reduced form:

https://wolfram.com/xid/0c0rop47925i0-q5q6gz

Convert a linear sequence to a circular sequence:

https://wolfram.com/xid/0c0rop47925i0-4eu9i7

Convert a circular sequence to a linear sequence:

https://wolfram.com/xid/0c0rop47925i0-dcjuuh

Add a list of sequences into a sequence collection:

https://wolfram.com/xid/0c0rop47925i0-gxuqil

Separate the unbound components of a sequence collection into separate collections:

https://wolfram.com/xid/0c0rop47925i0-3twyki

Drop letters at the end of a nucleotide sequence so only complete codons are present for translation:

https://wolfram.com/xid/0c0rop47925i0-h06cnf

Drop the letters up to a start codon in the default genetic translation table:

https://wolfram.com/xid/0c0rop47925i0-uux46f

Drop terms after the stop letter in a peptide sequence:

https://wolfram.com/xid/0c0rop47925i0-lgjgsz

Scope (23)Survey of the scope of standard use cases
"AddBond" (4)
A bond type does not need to be specified to insert a bond. If one is not given, it will be inferred:

https://wolfram.com/xid/0c0rop47925i0-6eg7n


https://wolfram.com/xid/0c0rop47925i0-8ps7dj

The type of the bond inferred may depend on the letters being linked:

https://wolfram.com/xid/0c0rop47925i0-8ipf3g


https://wolfram.com/xid/0c0rop47925i0-wgwdns

Bonds can be added to hybrid strands:

https://wolfram.com/xid/0c0rop47925i0-xge3ai


https://wolfram.com/xid/0c0rop47925i0-gleai2

Bonds can be added to sequence collections:

https://wolfram.com/xid/0c0rop47925i0-2dmffo


https://wolfram.com/xid/0c0rop47925i0-cm7odz

"AddToCollection" (3)
A single sequence can also be added to a collection:

https://wolfram.com/xid/0c0rop47925i0-n7k839
A single motif or hybrid sequence will be modified into a collection:

https://wolfram.com/xid/0c0rop47925i0-ym4yn6

If there are multiple sequence collections, they will be merged in the result:

https://wolfram.com/xid/0c0rop47925i0-fhiklb

"CanonicalRepresentation" (3)
If sequences are identical, canonicalization will use strand-level bonds for ordering:

https://wolfram.com/xid/0c0rop47925i0-qhlkrx

If the sequences and strand-level bonds are identical, canonicalization will use sequence bonds for ordering:

https://wolfram.com/xid/0c0rop47925i0-ml6xai

In addition to sorting, single-strand collections are reduced to the strand and single motif hybrids are reduced to the motif:

https://wolfram.com/xid/0c0rop47925i0-4u36jg

"DeleteBond" (2)
Delete all higher-order bonds between the two indexes:

https://wolfram.com/xid/0c0rop47925i0-5hsgv0

Deleting bonds always works on the outermost form, which is the form given by the "SequenceBondList" property:

https://wolfram.com/xid/0c0rop47925i0-j91axq


https://wolfram.com/xid/0c0rop47925i0-d4ojrn


https://wolfram.com/xid/0c0rop47925i0-uta0h8

"DropToStartCodon" (3)
Any genetic translation table entity can be used to specify start codons:

https://wolfram.com/xid/0c0rop47925i0-za3w73

A specific codon or list of codons can be used as the start codon specification:

https://wolfram.com/xid/0c0rop47925i0-qey558


https://wolfram.com/xid/0c0rop47925i0-i56qrd

Modifications can be created in an operator form for later use:

https://wolfram.com/xid/0c0rop47925i0-tfn1i

Modifications with further specifications can also be used in operator form:

https://wolfram.com/xid/0c0rop47925i0-k42v01

"InnermostBondRepresentation" (1)
"MakeCircular" (2)
"MakeLinear" (3)
Circular RNA sequences can be converted to linear RNA sequences:

https://wolfram.com/xid/0c0rop47925i0-5b7rzb

Circular peptide sequences can be converted to linear peptide sequences:

https://wolfram.com/xid/0c0rop47925i0-xqhc89

Start the linear sequence from a specific position:

https://wolfram.com/xid/0c0rop47925i0-rlaqs

Relative bond positions are preserved when converting circular sequences to linear sequences:

https://wolfram.com/xid/0c0rop47925i0-jp6b2y

"OutermostBondRepresentation" (1)
Applications (1)Sample problems that can be solved with this function

https://wolfram.com/xid/0c0rop47925i0-kd2wrs
Various peptides can be related to each other through a circular permutation:

https://wolfram.com/xid/0c0rop47925i0-gh3w5d


https://wolfram.com/xid/0c0rop47925i0-wx6l5


https://wolfram.com/xid/0c0rop47925i0-bmunen


https://wolfram.com/xid/0c0rop47925i0-julvqd


https://wolfram.com/xid/0c0rop47925i0-j7xxc1


https://wolfram.com/xid/0c0rop47925i0-ktpd7h

Possible Issues (2)Common pitfalls and unexpected behavior
Neat Examples (1)Surprising or curious use cases
Represent the protein preproinsulin as a BioSequence:

https://wolfram.com/xid/0c0rop47925i0-e5yc2o
Remove the signal peptide sequence to make proinsulin:

https://wolfram.com/xid/0c0rop47925i0-d92i6z

Add the disulfide bonds and split the proinsulin sequence to make insulin:

https://wolfram.com/xid/0c0rop47925i0-dymanb


https://wolfram.com/xid/0c0rop47925i0-bav907

Wolfram Research (2020), BioSequenceModify, Wolfram Language function, https://reference.wolfram.com/language/ref/BioSequenceModify.html (updated 2021).
Text
Wolfram Research (2020), BioSequenceModify, Wolfram Language function, https://reference.wolfram.com/language/ref/BioSequenceModify.html (updated 2021).
Wolfram Research (2020), BioSequenceModify, Wolfram Language function, https://reference.wolfram.com/language/ref/BioSequenceModify.html (updated 2021).
CMS
Wolfram Language. 2020. "BioSequenceModify." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/BioSequenceModify.html.
Wolfram Language. 2020. "BioSequenceModify." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/BioSequenceModify.html.
APA
Wolfram Language. (2020). BioSequenceModify. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BioSequenceModify.html
Wolfram Language. (2020). BioSequenceModify. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BioSequenceModify.html
BibTeX
@misc{reference.wolfram_2025_biosequencemodify, author="Wolfram Research", title="{BioSequenceModify}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/BioSequenceModify.html}", note=[Accessed: 03-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_biosequencemodify, organization={Wolfram Research}, title={BioSequenceModify}, year={2021}, url={https://reference.wolfram.com/language/ref/BioSequenceModify.html}, note=[Accessed: 03-June-2025
]}