<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://teaching.healthtech.dtu.dk:443/22118/index.php?action=history&amp;feed=atom&amp;title=Searching_for_motifs_in_sequences</id>
	<title>Searching for motifs in sequences - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://teaching.healthtech.dtu.dk:443/22118/index.php?action=history&amp;feed=atom&amp;title=Searching_for_motifs_in_sequences"/>
	<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk:443/22118/index.php?title=Searching_for_motifs_in_sequences&amp;action=history"/>
	<updated>2026-07-15T11:59:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://teaching.healthtech.dtu.dk:443/22118/index.php?title=Searching_for_motifs_in_sequences&amp;diff=338&amp;oldid=prev</id>
		<title>WikiSysop: /* Input and output */</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk:443/22118/index.php?title=Searching_for_motifs_in_sequences&amp;diff=338&amp;oldid=prev"/>
		<updated>2026-05-21T16:39:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Input and output&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:39, 21 May 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l31&quot;&gt;Line 31:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  T	8&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  T	8&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The output should list all matches in each fasta entry, clearly stating the location of the match.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The output should list all matches in each fasta entry, clearly stating the location of the match&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.&amp;lt;br&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Note that a description file can describe a simple 1-part signal, a 2-part signal as shown here, a 3-part signal by adding another *-line plus bases, and so forth. It is strongly preferred that the program can handle all such cases&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Details===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Details===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk:443/22118/index.php?title=Searching_for_motifs_in_sequences&amp;diff=22&amp;oldid=prev</id>
		<title>WikiSysop: Created page with &quot;__NOTOC__ ===Description=== A sequence motif is typically a short sequence pattern of DNA or amino acid sequence that is conserved across various gene families or organisms. Sequence motifs are recognizable and could be a promoter, a binding site or a domain that folds into a specific structure. The mechanism for finding motifs is often Hidden Markov Models or Neural Networks, which both require a lot of examples of the motif to work, but here you will explore a differen...&quot;</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk:443/22118/index.php?title=Searching_for_motifs_in_sequences&amp;diff=22&amp;oldid=prev"/>
		<updated>2025-09-26T11:21:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__ ===Description=== A sequence motif is typically a short sequence pattern of DNA or amino acid sequence that is conserved across various gene families or organisms. Sequence motifs are recognizable and could be a promoter, a binding site or a domain that folds into a specific structure. The mechanism for finding motifs is often Hidden Markov Models or Neural Networks, which both require a lot of examples of the motif to work, but here you will explore a differen...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
===Description===&lt;br /&gt;
A sequence motif is typically a short sequence pattern of DNA or amino acid sequence that is conserved across various gene families or organisms. Sequence motifs are recognizable and could be a promoter, a binding site or a domain that folds into a specific structure. The mechanism for finding motifs is often Hidden Markov Models or Neural Networks, which both require a lot of examples of the motif to work, but here you will explore a different method, which just needs a consensus sequence (or what you think the consensus sequence is). It uses a model where sites in the sequence are weighted after importance and finds those matches which are close.&amp;lt;br&amp;gt;&lt;br /&gt;
The program is given a fasta file with DNA or amino acid sequences and a file containing a description of the signal to search for. It will then display all occurrences of a match in each fasta entry.&lt;br /&gt;
&lt;br /&gt;
===Input and output===&lt;br /&gt;
The program is given a fasta file, a signal description file and a deviation (a number) as input on the command line. Deviation is the deviation allowed from the original signal description.&lt;br /&gt;
The fasta file can contain more than one sequence/entry.&lt;br /&gt;
The signal description file is a tab separated file. Each line consists of either&lt;br /&gt;
1) one or more allowed letters at this position and a penalty for having a mismatch at that position.&lt;br /&gt;
2) the star character * denoting unimportant characters in the sequence and an interval where these unimportant characters are allowed.&lt;br /&gt;
3) the hash character # meaning this line is a comment, and should be ignored by the program.&lt;br /&gt;
&lt;br /&gt;
As an example of a signal description file, here is a prokaryotic promoter, which is a 2-parts signal that can be described as:&lt;br /&gt;
&lt;br /&gt;
 # -35 element&lt;br /&gt;
 T	7&lt;br /&gt;
 T	8&lt;br /&gt;
 G	6&lt;br /&gt;
 A	5&lt;br /&gt;
 C	5&lt;br /&gt;
 A	5&lt;br /&gt;
 # intervening unimportant bases&lt;br /&gt;
 *	15-21&lt;br /&gt;
 # -10 element&lt;br /&gt;
 T	8&lt;br /&gt;
 A	8&lt;br /&gt;
 T	6&lt;br /&gt;
 A	6&lt;br /&gt;
 AT	5&lt;br /&gt;
 T	8&lt;br /&gt;
&lt;br /&gt;
The output should list all matches in each fasta entry, clearly stating the location of the match.&lt;br /&gt;
&lt;br /&gt;
===Details===&lt;br /&gt;
The deviation is an important factor. If the deviation is set to 0, then search for the signal is reduced to an exact match. If the deviation is set to 16 in the above example, then mismatches with the combined penalty of 16 or less are allowed. In the promoter example the following signals would match (ignoring intervening bases, not complete list):&lt;br /&gt;
 TTGXXX*TATAAT&lt;br /&gt;
 TTGACA*XXTAAT&lt;br /&gt;
 TTGXXA*TAXAAT&lt;br /&gt;
&lt;br /&gt;
Note: I do not consider an approach based heavily on regular expression as a good idea, but you are free to do as you like. Due to the flexibility in the signal caused by the gaps, several different matches can be found from a specific position in the sequence. You should find all matches, not just the first one.&lt;br /&gt;
It needs to be understood that the program/algorithm is completely general and can search for any kind of signal in any kind of text sequences. It is not limited to life science.&lt;br /&gt;
&lt;br /&gt;
Fasta file to use as example in the projects: [https://teaching.healthtech.dtu.dk/material/22118/motif.fsa motif.fsa]&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
</feed>