Question: Ambiguous Amino Acid In Motif Search
3
gravatar for jzabilansky
5.7 years ago by
jzabilansky60
jzabilansky60 wrote:

I am currently trying to use Biopython to search for a motif in which an internal amino acid can be any amino acid except for one, is there a way to add an instance of the motif using a character such as 'X' to represent a motif sequence such as "AMXLT" or "AM{N}LT" where the {N} stands for any amino acid except for Asparagine?

Sample Code:

from Bio import motifs
from Bio.Seq import Seq
from Bio.Alphabet import IUPAC
instances = [Seq("AMXLT", IUPAC.protein), Seq("AM{N}LT", IUPAC.protein)]
m = motifs.create(instances)
for record in sequences:
    for pos,seq in m.instances.search(record[1]):
        print record[0], pos,seq
amino-acids motif biopython • 2.5k views
ADD COMMENTlink modified 5.2 years ago by Asaf5.4k • written 5.7 years ago by jzabilansky60

Not sure if this is overkill but scanprosite would obviously be able to handle this (you could define your own patterns) and there's a biopython module for handling that: http://biopython.org/DIST/docs/api/Bio.ExPASy.ScanProsite-module.html

ADD REPLYlink written 5.7 years ago by sarahhunter600
0
gravatar for Asaf
5.2 years ago by
Asaf5.4k
Israel
Asaf5.4k wrote:

IUPAC.ExtendedIUPACProtein contains X. Alternatively, you can initialize a Motif from a MEME motif etc.

ADD COMMENTlink written 5.2 years ago by Asaf5.4k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1615 users visited in the last hour