| 1 |
<HTML> |
| 2 |
|
| 3 |
<HEAD> |
| 4 |
<TITLE>User Guide To SMap</TITLE> |
| 5 |
|
| 6 |
<LINK rel=stylesheet type="text/css" |
| 7 |
href="../wdoc.css" |
| 8 |
title="Style sheet for wdoc developer documents"> |
| 9 |
|
| 10 |
</HEAD> |
| 11 |
|
| 12 |
<BODY> |
| 13 |
|
| 14 |
<BLOCKQUOTE> |
| 15 |
<DIV ALIGN=CENTER> |
| 16 |
<IMG SRC="./acedb-logo.gif" ALT="[ACEDB 4_9 DOCUMENTATION]" align=middle> |
| 17 |
<H3> |
| 18 |
ACEDB Version 4_9 |
| 19 |
</H3> |
| 20 |
</DIV> |
| 21 |
|
| 22 |
|
| 23 |
<DIV ALIGN=CENTER> |
| 24 |
|
| 25 |
<H1 align=center>User Guide To SMap</H1> |
| 26 |
|
| 27 |
<ADDRESS> |
| 28 |
Originally written by<BR> |
| 29 |
Simon Kelley <[email protected]> and |
| 30 |
Ed Griffiths <[email protected]>, February 2002 |
| 31 |
</ADDRESS> |
| 32 |
|
| 33 |
</DIV> |
| 34 |
|
| 35 |
|
| 36 |
<H2>Background</H2> |
| 37 |
|
| 38 |
<P>To be written. |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
<H2>How it works</H2> |
| 43 |
|
| 44 |
|
| 45 |
<H3>Smap: what does it do?</H3> |
| 46 |
|
| 47 |
<ul> |
| 48 |
<li>Represents relationship between DNA sequences. |
| 49 |
<li>Maps co-ordinates in one sequence on to co-ordinates in another related sequence. |
| 50 |
<li>Maps co-ordinates in spliced sequences onto co-ordinates in unspliced sequences |
| 51 |
(ie removes introns.) |
| 52 |
<li>Assembles long DNA sequences from short DNA sequences and manage mismatches, |
| 53 |
insertions and deletions. |
| 54 |
</ul> |
| 55 |
|
| 56 |
|
| 57 |
<H3>The basic idea.</H3> |
| 58 |
|
| 59 |
<p>Database stores co-ordinate mapping from PARENTS to CHILDREN as a hierachy of objects: |
| 60 |
|
| 61 |
<p><img src="./tree.jpg" align="center"> |
| 62 |
|
| 63 |
<p>SMap calculates co-ordinate mapping from CHILDREN to PARENTS. |
| 64 |
|
| 65 |
<p>SMap then projects DNA sequence from CHILDREN to PARENTS: |
| 66 |
|
| 67 |
<p><IMG SRC="./map.jpg" align="center"> |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
<h3>How it works at the moment.</H3> |
| 73 |
|
| 74 |
<pre><code>?Sequence DNA UNIQUE ?DNA Int |
| 75 |
Subsequence ?Sequence Int Int |
| 76 |
Source_Exons Int Int |
| 77 |
</code></pre> |
| 78 |
|
| 79 |
<P><IMG SRC="old.jpg" align="center"> |
| 80 |
|
| 81 |
<pre><code> Subsequence A 1 20 |
| 82 |
Subsequence B 21 33 |
| 83 |
Subsequence C 30 40 |
| 84 |
</code></pre> |
| 85 |
|
| 86 |
<p>Bases 11-13 in sequence "B" must match bases 1-3 in sequence "C" |
| 87 |
|
| 88 |
|
| 89 |
<P>The Source_Exons tag modifies the co-ords for children on this |
| 90 |
object so that introns are mapped out of the co-ordinate system: |
| 91 |
|
| 92 |
<P><IMG SRC="exon.jpg" align="center"> |
| 93 |
|
| 94 |
|
| 95 |
<P>Problems. |
| 96 |
|
| 97 |
<ul> |
| 98 |
<li>Cannot build longer sequence from parts of child sequences. |
| 99 |
<li>Cannot cope with mismatches when more than one child sequence has DNA for a region. |
| 100 |
<li>Cannot represent insertions and deletions between child and parent sequences, apart from exons special case. |
| 101 |
</ul> |
| 102 |
|
| 103 |
|
| 104 |
<h3>Aims for Smap.</H3> |
| 105 |
|
| 106 |
<ul> |
| 107 |
<li>Be free to represent biological data in the database without needing to modify it to allow assembly into aggregate sequence objects. |
| 108 |
<li>Keep information on how to modify underlying sequence objects to make aggregate objects separately from those objects. |
| 109 |
<li>Allow flexibility for curators in how they store sets of features which map onto DNA sequence. |
| 110 |
</ul> |
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
<h3>The Smap models.</H3> |
| 115 |
|
| 116 |
<pre><code>?Sequence DNA UNIQUE ?DNA UNIQUE Int |
| 117 |
S_Child Subsequence ?Sequence Int Int #SMap_info |
| 118 |
Homol_data ?Homol_data Int Int #SMap_info |
| 119 |
Feature_data ?Feature_data Int Int #Smap_info |
| 120 |
. |
| 121 |
. |
| 122 |
. |
| 123 |
|
| 124 |
?SMap_info Align Int UNIQUE Int UNIQUE Int |
| 125 |
Mismatch Int UNIQUE Int |
| 126 |
</code></pre> |
| 127 |
|
| 128 |
|
| 129 |
<pre><code>Align tag |
| 130 |
first Int is position in parent, |
| 131 |
second Int is position in child, |
| 132 |
third Int is length (optional in almost all cases). |
| 133 |
|
| 134 |
Mismatch tag |
| 135 |
no Ints - whole sequence, |
| 136 |
one Int - single base, |
| 137 |
two Ints - range. |
| 138 |
</code></pre> |
| 139 |
|
| 140 |
|
| 141 |
<h3>Insertions, deletions.</H3> |
| 142 |
|
| 143 |
<P>Insertion in child sequence. |
| 144 |
|
| 145 |
<P><IMG SRC="ins.jpg" align="center"> |
| 146 |
|
| 147 |
<pre><code>Parent: S_Child Subsequence Child P1 P4 Align P1 C1 |
| 148 |
P3 C3 |
| 149 |
</code></pre> |
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
<h3>Insertions, deletions.</H3> |
| 154 |
|
| 155 |
<P>Deletion in child sequence. |
| 156 |
|
| 157 |
<P><IMG SRC="del.jpg" align="center"> |
| 158 |
|
| 159 |
<pre><code>Parent: S_Child Subsequence Child P1 P4 Align P1 C1 |
| 160 |
P3 C3 |
| 161 |
</code></pre> |
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
<h3>Mismatches</H3> |
| 166 |
|
| 167 |
<P>For each base position in the final sequence, there will exist zero or more bases |
| 168 |
in the child sequences with the "mismatch" property set, and zero or more bases in the |
| 169 |
child sequences without the "mismatch" property set. |
| 170 |
|
| 171 |
<ol> |
| 172 |
<li>All "no mismatch" bases at a position must match, and they take prioriy over |
| 173 |
"mismatch" bases. |
| 174 |
<li>If there are zero "no mismatch" bases at a position, but all the "mismatch" basess |
| 175 |
agree, the result is an unambiguous base code. |
| 176 |
<li>If there are zero "no mismatch" bases at a position and the "mismatch" bases |
| 177 |
disagree, the result is an ambiguous IUPAC code. |
| 178 |
</ol> |
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
<h3>Mismatches - example</H3> |
| 183 |
|
| 184 |
<pre>Mismatch = lower case |
| 185 |
No mismatch = UPPER case |
| 186 |
|
| 187 |
Child 1 Child 2 Result |
| 188 |
|
| 189 |
A A A |
| 190 |
A C error |
| 191 |
A c A |
| 192 |
a C C |
| 193 |
a a A |
| 194 |
a c M |
| 195 |
</pre> |
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
<h3>Source Exons are just an SMap.</H3> |
| 200 |
|
| 201 |
<P><IMG SRC="exon.jpg" align="center"> |
| 202 |
|
| 203 |
<P>Current implementation uses Source_exons tags for backwards compatibility. |
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
<h3>Smap object need not contain DNA.</H3> |
| 208 |
|
| 209 |
<pre><code>?Sequence DNA UNIQUE ?DNA UNIQUE Int |
| 210 |
S_Child Subsequence ?Sequence Int Int #SMap_info |
| 211 |
Homol_data ?Homol_data Int Int #SMap_info |
| 212 |
Feature_data ?Feature_data Int Int #Smap_info |
| 213 |
|
| 214 |
|
| 215 |
?Homol_data Homol DNA_homol ?Sequence ?Method Float Int Int Int Int |
| 216 |
Pep_homol ?Protein ?Method Float Int Int Int Int |
| 217 |
|
| 218 |
|
| 219 |
?Feature_data Feature ?Method Int Int Float Text |
| 220 |
</code></pre> |
| 221 |
|
| 222 |
<P>An important SMap function is calculating mappings of objects other than DNA sequence. |
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
<h3>Applications</H3> |
| 227 |
|
| 228 |
<ul> |
| 229 |
<li>Overlaps with allowed mismatches and indels in contigs. |
| 230 |
<li>Build a "Golden Path" |
| 231 |
<li>Map an EMBL record onto a reference sequence. |
| 232 |
</ul> |
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
<h3>Golden Path</H3> |
| 237 |
|
| 238 |
<P><IMG SRC="gold.jpg" align="center"> |
| 239 |
|
| 240 |
|
| 241 |
<pre><code>Path: S_Child Subsequence Child1 start1 end1 Align start1 offset1 |
| 242 |
Child2 start2 end2 Align start2 offset2 |
| 243 |
Child3 start3 end3 Align start3 offset3 |
| 244 |
Child4 start4 end4 Align start4 offset4 |
| 245 |
</code></pre> |
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
<h3>Representation of EMBL record.</H3> |
| 250 |
|
| 251 |
<pre><code>Chromosome: S_Child Embl_data 10000 11000 Align ...... |
| 252 |
Mismatch |
| 253 |
|
| 254 |
Embl_data: DNA ....... |
| 255 |
Homol DNA_homol seq1 method1 3.0 1 100 121 221 |
| 256 |
seq2 method2 4.0 300 340 400 440 |
| 257 |
Feature method3 500 550 6.0 "Repeat" |
| 258 |
</code></pre> |
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
<h3>Summary</H3> |
| 263 |
|
| 264 |
|
| 265 |
<ul> |
| 266 |
<li>Flexible method for mapping co-ordinate systems. |
| 267 |
<li>Represents insertions and deletions. |
| 268 |
<li>Controls sequence mismatches. |
| 269 |
<li>Allows grouping of data about a DNA sequence to suit the needs of the database |
| 270 |
administrators and users. |
| 271 |
</ul> |
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
<H2>Changes in Behaviour</H2> |
| 276 |
|
| 277 |
<P>This chapter briefly documents the changes in behaviour in the virtual sequence |
| 278 |
building mechanism that underlies fmap, giface, gff dumping etc., i.e. the central |
| 279 |
AceDB mechanism for composing sequences and their associated features. |
| 280 |
|
| 281 |
<P>This work used to be done by fMapConvert(), a monolithic and huge routine |
| 282 |
in w7/fmapcontrol.c. This routine has been replaced by a set of routines in |
| 283 |
w7/smapconvert.c which use the new Smap code from w6/smap.c. |
| 284 |
|
| 285 |
|
| 286 |
<H3>Principle changes in behaviour</H3> |
| 287 |
|
| 288 |
|
| 289 |
<H4>All features</H4> |
| 290 |
|
| 291 |
<P>The old code was forgiving but also inaccurate in that features with incorrect |
| 292 |
or missing coordinates were often mapped, but mapped inaccurately or inappropriately. |
| 293 |
These features will not now be mapped, e.g. features with coordinates |
| 294 |
partly or wholly outside that of their parents will not now be mapped. |
| 295 |
|
| 296 |
|
| 297 |
<H4>Allele</H4> |
| 298 |
|
| 299 |
<P>Section from Sequence class: |
| 300 |
<pre> Allele ?Allele XREF Sequence UNIQUE Int UNIQUE Int UNIQUE Text |
| 301 |
// start, stop, replacement sequence |
| 302 |
// if an insertion point Text is transposon name (distinguished |
| 303 |
// by containing non ACTG letters), and (n, n+1) = T A, so indicates |
| 304 |
// direction (if known). |
| 305 |
// if a deletion, put '-' as the replacement sequence |
| 306 |
</pre> |
| 307 |
|
| 308 |
|
| 309 |
<P>Alleles will not be mapped unless they have both start and end coordinates, as |
| 310 |
before the allele does not have to text attached to it. |
| 311 |
|
| 312 |
|
| 313 |
<H4>Assembly_tags</H4> |
| 314 |
|
| 315 |
<P>Section from Sequence class: |
| 316 |
<pre> Assembly_tags Text Int Int Text // type, start, stop, comment |
| 317 |
</pre> |
| 318 |
|
| 319 |
<P>Assembly_tags will not be mapped unless they have both start and end. |
| 320 |
|
| 321 |
|
| 322 |
<H4>Oligo</H4> |
| 323 |
|
| 324 |
<P>Section from Sequence class: |
| 325 |
<pre>Oligo ?Oligo XREF In_sequence Int UNIQUE Int // for OSP and human mapping mostly |
| 326 |
</pre> |
| 327 |
|
| 328 |
<P>fMapConvert() used to call fMapOspPositionOligo() if the Oligo had no coordinates, |
| 329 |
this routine attempted to position the oligo by matching its dna to the look->dna. |
| 330 |
It would then insert this data into the object (with the potential that it could |
| 331 |
update the database). Its also bad because it relies on having the dna, which |
| 332 |
will not always be true. |
| 333 |
|
| 334 |
|
| 335 |
<HR> |
| 336 |
<H3 ALIGN="CENTER">ACEDB Version 4_9</H3> |
| 337 |
|
| 338 |
<HR> |
| 339 |
<ADDRESS><a href="mailto:[email protected]">Ed Griffiths <[email protected]></a></ADDRESS> |
| 340 |
<!-- hhmts start --> |
| 341 |
Last modified: Wed Jun 5 14:16:49 BST 2002 |
| 342 |
<!-- hhmts end --> |
| 343 |
</BODY> |
| 344 |
</HTML> |