Ambiguous Amino Acid In Motif Search
1
3
Entering edit mode
10.8 years ago
jzabilansky ▴ 60

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
motif motif biopython amino-acids • 4.3k views
ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode
10.3 years ago
Asaf 10k

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

ADD COMMENT

Login before adding your answer.

Traffic: 1462 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6