PatternQuery:Use Cases: Difference between revisions
No edit summary |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
==== Find all post-translational modified aminoacids ==== | ==== Find all post-translational modified aminoacids ==== | ||
*i.e. Those | *i.e. Those incorporated in the protein backbone and not hetero atoms | ||
<syntaxhighlight lang="python"> | <syntaxhighlight lang="python"> | ||
NotAminoAcids(). | NotAminoAcids(). | ||
Line 19: | Line 19: | ||
*There is a variety of different zinc fingers based on the surrounding residues, in our example we will focus on those comprising two zinc and two his residues (Cys2His2). | *There is a variety of different zinc fingers based on the surrounding residues, in our example we will focus on those comprising two zinc and two his residues (Cys2His2). | ||
<syntaxhighlight lang="python">Atoms("Zn").ConnectedResidues(1).Filter(lambda m: (m.Count(Residues("His")) == 2) & (m.Count(Residues("Cys")) == 2)) </syntaxhighlight> | <syntaxhighlight lang="python"> | ||
Atoms("Zn"). | |||
ConnectedResidues(1). | |||
Filter(lambda m: | |||
(m.Count(Residues("His")) == 2) & (m.Count(Residues("Cys")) == 2)) </syntaxhighlight> | |||
At first the zinc atoms are selected together with their bonded residues. Additionally, these patterns are filtered according to the content of their amino acids. | |||
====Identify all the residues, which contain a sugar ring==== | ====Identify all the residues, which contain a sugar ring==== | ||
* This task can be decomposed to two individual subtasks, since sugars contain either pentose or furanose ring. Pentose ring contains 4 carbon and an oxygen atom. Similarly, furanose ring is composed of 5 carbon atoms and an oxygen atom. | * This task can be decomposed to two individual subtasks, since sugars contain either pentose or furanose ring. Pentose ring contains 4 carbon and an oxygen atom. Similarly, furanose ring is composed of 5 carbon atoms and an oxygen atom. | ||
<syntaxhighlight lang="python">Or(Rings(4 * ["C"] + ["O"]).ConnectedResidues(0), Rings(5 * ["C"] + ["O"]).ConnectedResidues(0)) </syntaxhighlight> | <syntaxhighlight lang="python"> | ||
Or(Rings(4 * ["C"] + ["O"]).ConnectedResidues(0), | |||
Rings(5 * ["C"] + ["O"]).ConnectedResidues(0)) </syntaxhighlight> | |||
By specifying the <code>Ring()</code> queries, we select only the ring part of the molecule. By extending the <code>Ring()</code> query with <syntaxhighlight lang="python">ConnectedResidues(0)</syntaxhighlight> only the residue which includes this ring is selected. Last but not least we can join both queries with <syntaxhighlight lang="python">Or()</syntaxhighlight> in order to merge results. | By specifying the <code>Ring()</code> queries, we select only the ring part of the molecule. By extending the <code>Ring()</code> query with <syntaxhighlight lang="python">ConnectedResidues(0)</syntaxhighlight> only the residue which includes this ring is selected. Last but not least we can join both queries with <syntaxhighlight lang="python">Or()</syntaxhighlight> in order to merge results. | ||
Line 34: | Line 38: | ||
====Identify all binding sites of PA-IIL lectin in different organisms==== | ====Identify all binding sites of PA-IIL lectin in different organisms==== | ||
*Binding sites of this type of lectin comprise of two calcium atoms close to each other and a binded sugar residue. | *Binding sites of this type of lectin comprise of two calcium atoms close to each other and a binded sugar residue. | ||
<syntaxhighlight lang="python">Near(4, Atoms("Ca"), Atoms("Ca")) | <syntaxhighlight lang="python"> | ||
Near(4, Atoms("Ca"), Atoms("Ca")) | |||
.ConnectedResidues(1) | |||
.Filter(lambda l: | |||
l.Count(Or(Rings(5 * ["C"] + ["O"]), Rings(4 * ["C"] + ["O"]))) > 0) | |||
.Filter(lambda l: l.Count(Atoms("P")) == 0)</syntaxhighlight> | |||
<syntaxhighlight lang="python">Near(4, Atoms("Ca"), Atoms("Ca")). | At first we select all the pairs of calcium atoms, if they are in a vicinity of 4Å and less by <syntaxhighlight lang="python">Near(4, Atoms("Ca"), Atoms("Ca"))</syntaxhighlight> Subsequently all the bonded residues are checked if they contain either pyranose or furanose ring. only the patterns containing either pentose <syntaxhighlight lang="python">(Rings(5 * ["C"] + ["O"]))</syntaxhighlight> or furanose <syntaxhighlight lang="python">(Rings(4 * ["C"] + ["O"]))</syntaxhighlight> are returned. Since a sugar moiety is an integral part of nucleotides, there is a final simple check, assuring, that no patterns containing phosphorus, i.e. nucleotide are retained. |
Latest revision as of 13:42, 25 April 2015
In this section you can find several biologically relevant examples of different queries.
Find all post-translational modified aminoacids
[edit]- i.e. Those incorporated in the protein backbone and not hetero atoms
NotAminoAcids().
Filter(lambda m: m.Count(HetResidues()) == 0)
This query queries all the non-standard amino acids for their presence among Hetatom entries. Equivalently:
NotAminoAcids().
Filter(lambda m: m.Contains(HetResidues()).Not())
Find all heteroatoms, which are not covalently bonded to the protein structure
[edit]- Takes all the heteroatoms and queries them for being connected to any amino acid of a given protein
HetResidues().
Filter(lambda m: m.IsNotConnectedTo(AminoAcids()))
Identify Zinc fingers
[edit]- There is a variety of different zinc fingers based on the surrounding residues, in our example we will focus on those comprising two zinc and two his residues (Cys2His2).
Atoms("Zn").
ConnectedResidues(1).
Filter(lambda m:
(m.Count(Residues("His")) == 2) & (m.Count(Residues("Cys")) == 2))
At first the zinc atoms are selected together with their bonded residues. Additionally, these patterns are filtered according to the content of their amino acids.
Identify all the residues, which contain a sugar ring
[edit]- This task can be decomposed to two individual subtasks, since sugars contain either pentose or furanose ring. Pentose ring contains 4 carbon and an oxygen atom. Similarly, furanose ring is composed of 5 carbon atoms and an oxygen atom.
Or(Rings(4 * ["C"] + ["O"]).ConnectedResidues(0),
Rings(5 * ["C"] + ["O"]).ConnectedResidues(0))
By specifying the Ring()
queries, we select only the ring part of the molecule. By extending the Ring()
query with
ConnectedResidues(0)
only the residue which includes this ring is selected. Last but not least we can join both queries with
Or()
in order to merge results.
Identify all binding sites of PA-IIL lectin in different organisms
[edit]- Binding sites of this type of lectin comprise of two calcium atoms close to each other and a binded sugar residue.
Near(4, Atoms("Ca"), Atoms("Ca"))
.ConnectedResidues(1)
.Filter(lambda l:
l.Count(Or(Rings(5 * ["C"] + ["O"]), Rings(4 * ["C"] + ["O"]))) > 0)
.Filter(lambda l: l.Count(Atoms("P")) == 0)
At first we select all the pairs of calcium atoms, if they are in a vicinity of 4Å and less by
Near(4, Atoms("Ca"), Atoms("Ca"))
Subsequently all the bonded residues are checked if they contain either pyranose or furanose ring. only the patterns containing either pentose
(Rings(5 * ["C"] + ["O"]))
or furanose
(Rings(4 * ["C"] + ["O"]))
are returned. Since a sugar moiety is an integral part of nucleotides, there is a final simple check, assuring, that no patterns containing phosphorus, i.e. nucleotide are retained.