<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=Findseq</id>
	<title>Findseq - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=Findseq"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Findseq&amp;action=history"/>
	<updated>2026-05-15T00:52:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Findseq&amp;diff=7961&amp;oldid=prev</id>
		<title>Pyadmin: 1 revision</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Findseq&amp;diff=7961&amp;oldid=prev"/>
		<updated>2014-03-28T02:16:24Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:16, 28 March 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Pyadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Findseq&amp;diff=7960&amp;oldid=prev</id>
		<title>Hongbo zhu: add reference to Psico function select_pepseq</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Findseq&amp;diff=7960&amp;oldid=prev"/>
		<updated>2013-01-03T15:19:07Z</updated>

		<summary type="html">&lt;p&gt;add reference to Psico function select_pepseq&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = script&lt;br /&gt;
|filename  = findseq.py&lt;br /&gt;
|author    = [[User:Inchoate|Jason Vertrees]]&lt;br /&gt;
|license   = BSD&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Overview &amp;amp; Motivation =&lt;br /&gt;
Anyone ever give you a protein and then say, find the sequence &amp;quot;FLVEW&amp;quot;?  Well, this script will find any string or regular expression in a given object and return that selection for you.  Here's an example,&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
reinitialize&lt;br /&gt;
import findseq&lt;br /&gt;
# fetch two sugar-binding PDB&lt;br /&gt;
fetch 1tvn, async=0&lt;br /&gt;
# Now, find FATEW in 1tvn, similarly&lt;br /&gt;
findseq FATEW, 1tvn&lt;br /&gt;
# lower-case works, too&lt;br /&gt;
findseq fatew, 1tvn&lt;br /&gt;
# how about a regular expression?&lt;br /&gt;
findseq F.*W, 1tvn&lt;br /&gt;
 &lt;br /&gt;
# Find the regular expression:&lt;br /&gt;
#  ..H[TA]LVWH&lt;br /&gt;
# in the few proteins loaded.&lt;br /&gt;
# I then showed them as sticks and colored them to highlight matched AAs&lt;br /&gt;
for x in cmd.get_names(): findseq.findseq(&amp;quot;..H[TA]LVWH&amp;quot;, x, &amp;quot;sele_&amp;quot;+x, firstOnly=1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:SeqFinder.png|center|thumb|400px|Red residues were those matching the regular expression '..H[TA]LVWH'.]]&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
I built this to be rather flexible.  You call it as:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;findseq needle, haystack[, selName[, het[, firstOnly ]]]&amp;lt;/source&amp;gt; where the options are:&lt;br /&gt;
:: '''needle''' the sequence of amino acids to find.  Should be a string of one letter amino acid abbreviations.  Can also be a string-style regular expression (eg. FW.*QQ).&lt;br /&gt;
:: '''haystack''' the PyMOL object or selection in which to search&lt;br /&gt;
:: '''selName''' the name of the returned selection.  If you leave this blank, it'll be ''foundSeqXYZ'' where XYZ is some random integer (eg. foundSeq1435); if you supply ''sele'' then the usual PyMOL ''(sele)'' is used; and, finally, if it's anything else, then that will be used verbatim.  Defaults to ''foundSeqXYZ'' so as not to overwrite any selections you might have in ''sele''.&lt;br /&gt;
:: '''het''' 0/1 -- if 0 then heteroatoms are not considered; if 1 then they are; defaults to 0&lt;br /&gt;
:: '''firstOnly''' 0/1 -- if 0 then all matches are selected and returned; if 1 then only the first is returned&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
select_pepseq@[[Psico]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:ObjSel_Scripts]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
</feed>