1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>How to create a new duplex structure</TITLE>
<META NAME="description" CONTENT="How to create a new duplex structure">
<META NAME="keywords" CONTENT="DeveloppersGuide">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="DeveloppersGuide.css">
<LINK REL="next" HREF="node10.html">
<LINK REL="previous" HREF="node5.html">
<LINK REL="up" HREF="DeveloppersGuide.html">
<LINK REL="next" HREF="node10.html">
</HEAD>
<BODY >
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html160"
HREF="node10.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="/usr/share/latex2html/icons/next.png"></A>
<A NAME="tex2html156"
HREF="DeveloppersGuide.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="/usr/share/latex2html/icons/up.png"></A>
<A NAME="tex2html150"
HREF="node8.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="/usr/share/latex2html/icons/prev.png"></A>
<A NAME="tex2html158"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="/usr/share/latex2html/icons/contents.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html161"
HREF="node10.html">How to add new</A>
<B> Up:</B> <A NAME="tex2html157"
HREF="DeveloppersGuide.html">MELTING - development guide</A>
<B> Previous:</B> <A NAME="tex2html151"
HREF="node8.html">Thermodynamic model for inosine</A>
<B> <A NAME="tex2html159"
HREF="node1.html">Contents</A></B>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION00060000000000000000">
How to create a new duplex structure</A>
</H1>
<P>
<SPAN CLASS="textbf">1)</SPAN> Create a new package with the name of the structure.
<BR>
<BR>
<P>
<SPAN CLASS="textbf">2)</SPAN> Create a new instance variable
<SPAN CLASS="textit">private static HashMap<String, Class<? extends PatternComputationMethod» newStructureMethod</SPAN>
of the class RegisterMethods in the melting.configuration package.
<P>
<PRE>
/**
* HasMap newStructureMethod : contains all the methods
* for the new structure computation.
*/
private static HashMap<String, Class<? extends
PatternComputationMethod>> newStructureMethod =
new HashMap<String, Class<? extends PatternComputationMethod>>();
</PRE>
<P>
<SPAN CLASS="textbf">3)</SPAN> Create a new method in the RegisterMethod class to initialise the
<SPAN CLASS="textit"><String, Class<? extends PatternComputationMethod» newStructureMethod</SPAN> you created. It must contains
all the relationships between the new model names and the matching implemented class:
<P>
<PRE>
private void initialisenewStructureMethods(){
newStructureMethod.put("model1-Name", classModel1-Name.class);
newStructureMethod.put("model2-Name", classModel2-Name.class);
newStructureMethod.put("model3-Name", classModel3-Name.class);
[...]
}
</PRE>
<P>
<SPAN CLASS="textbf">4)</SPAN> Call this method in the constructor of RegisterMethod :
<P>
<PRE>
public RegisterMethods(){
[...]
initialisenewStructureMethods();
}
</PRE>
<P>
<SPAN CLASS="textbf">5)</SPAN> Create a new <SPAN CLASS="textit">public static final String</SPAN> as instance variable of the OptionManagement
class in the melting.configuration package. This String represents the new option name you choose
to change the default model used to compute the new structure.
<P>
<PRE>
/**
* Option name to choose another method to compute the
* new structure.
*/
public static final String newStructureOption-Name =
"option-name";
</PRE>
<P>
<SPAN CLASS="textbf">6)</SPAN> Fix the default model name to use for each type of hybridization. You have to add
the following lines into the following methods of OptionManagement :
<P>
<PRE>
/**
* initialises the DNADefaultOptions HashMap of the
* OptionManagement object.
*/
private void initialisesDNADefaultOptions() {
[...]
this.DNADefaultOptions.put(newStructureOption-Name,
"DNA-defaultModel-Name");
}
/**
* initialises the RNADefaultOptions HashMap of the
* OptionManagement object.
*/
private void initialiseRNADefaultOptions() {
[...]
this.RNADefaultOptions.put(newStructureOption-Name,
"RNA-defaultModel-Name");
}
/**
* initialises the hybridDefaultOptions HashMap of the
* OptionManagement object.
*/
private void initialiseHybridDefaultOptions() {
[...]
this.hybridDefaultOptions.put(newStructureOption-Name,
"DNA/RNA-defaultModel-Name");
}
/**
* initialises the mRNADefaultOptions HashMap of the
* OptionManagement object.
*/
private void initialiseMRNADefaultOptions() {
[...]
this.mRNADefaultOptions.put(newStructureOption-Name,
"mRNA-defaultModel-Name");
}
</PRE>
<P>
<SPAN CLASS="textbf">7)</SPAN> Register the new option in the HashMap <SPAN CLASS="textit">registerPatternModels</SPAN> of OptionManagement.
You just have to add this following line into the method <SPAN CLASS="textit">private void initialiseRegisterPatternModels()</SPAN>
of OptionManagement :
<P>
<PRE>
/**
* Initialises the registerPatternModels HashMap of the OptionManagement object.
*/
private void initialiseRegisterPatternModels(){
[...]
registerPatternModels.add(newStructureOption-Name);
}
</PRE>
<P>
<SPAN CLASS="textbf">8)</SPAN> Add in the method <SPAN CLASS="textit">private void initialisePatternModels()</SPAN> of RegsiterMethods the
following line to register the new structure.
<P>
<PRE>
private void initialisePatternModels(){
[...]
// It creates a relationship between the option name
// for the new structure and the HashMap containing
// the models and the class which can compute the new
// structure.
PatternModel.put(OptionManagement.newStructureMethod,
newStructureMethod);
</PRE>
<P>
<SPAN CLASS="textbf">9)</SPAN> Add a new method in the NucleotiSequences class in the melting.sequences package to be abble
to recognize if a structure between two positions in the duplex matches the new structure you created.
<P>
<PRE>
// new method to recognize the new structure in the duplex
public boolean isNewStructure(int pos1, int pos2){
[if the subsequences between the positions pos1 and pos2
in the duplex match the new structure, you must return true.]
}
</PRE>
<P>
<SPAN CLASS="textbf">10)</SPAN> Create a new <SPAN CLASS="textit">private PatternComputationMethod</SPAN> instance variable in the NearestNeighborMode
class in the melting.nearestNeighborMode package. This new instance represents an object PatternComputationMethod
which is a new instance of one of your implemented class which can compute the new structure.
<P>
<PRE>
/**
* PatternComputationMethod newStructureMethod : represents
* the model for new structure computation.
*/
private PatternComputationMethod newStructureMethod;
</PRE>
<P>
<SPAN CLASS="textbf">11)</SPAN> Create a new method in the NearestNeighborMode class to initialise the PatternComputationMethod
newStructureMethod :
<P>
<PRE>
private void initialiseNewStructureMethod(){
// Get the option name (public static final instance
// variable of OptionManagement) which allows to change
// the model to compute the new structure.
String optionName = OptionManagement.newStructureOption-Name;
// Get the model name (model name) which allows to change
// the model to compute the new structure and initialise the
// PatternComputationMethod newStructureMethod.
String methodName = this.environment.getOptions().get(optionName);
this.newStructureMethod = initialiseMethod(optionName, methodName);
}
</PRE>
<P>
<SPAN CLASS="textbf">12)</SPAN> If the new structure you added contains perfectly matching base pairs, maybe you have to
change the method <SPAN CLASS="textit">private int [] getPositionsPattern(int pos1)</SPAN> of the NearestNeighborMode class.
<BR>
<BR>
This method defines the positions of a structure in the duplex (a perfectly matching structure or a
structure composed of non perfectly matching base pairs or composed of modified nucleic acid(s)).
<BR>
<BR>
If you need the adjacent base pairs to the non perfectly matching base pair or the modified nucleic acid,
you can add a method which corrects the positions of the structure in the duplex, in the class computing
the new structure. (see the following example and the Javadoc)
<P>
<PRE>
private int[] correctPositions(int pos1, int pos2,
int duplexLength){
if (pos1 > 0){
pos1 --;
}
if (pos2 < duplexLength - 1){
pos2 ++;
}
int [] positions = {pos1, pos2};
return positions;
}
</PRE>
<P>
<SPAN CLASS="textbf">13)</SPAN> Change the method <SPAN CLASS="textit">private PatternComputationMethod getAppropriatePatternModel(int [] positions)</SPAN>
of NearestNeighborMode to add your new structure initialisation.
<P>
<PRE>
// Method to get the adapted PatternComputationMethod to
// compute the structure defined at the positions int []
// positions.
private PatternComputationMethod getAppropriatePatternModel
(int [] positions){
// if the new structure is always a terminal structure, you
// can change the method here.
if (positions[0] == 0 || positions[1] ==
environment.getSequences().getDuplexLength() - 1){
[...]
// call the NucleotidSequences method to recognize the identity
// of the new structure
else if (environment.getSequences().isNewStructure(positions[0],
positions[1])){
if (this.newStructureMethod == null){
initialiseNewStructureMethod(); // initialise the
//PatternComputationMethod
// newStructureMethod
}
return this.newStructureMethod;
}
}
// if the structure is not always a terminal structure, you can
// change the method here.
[...]
// call the NucleotidSequences method to recognize the identity
// of the new structure
else if (environment.getSequences().isNewStructure(positions[0],
positions[1])){
if (this.newStructureMethod == null){
initialiseNewStructureMethod(); // initialise the
//PatternComputationMethod
// newStructureMethod
}
return this.newStructureMethod;
}
[...]
}
</PRE>
<P>
<SPAN CLASS="textbf">14)</SPAN> Create the new class(es) representing your model(s) for the new structure as it is explained
in the section <SPAN CLASS="textit">How to add new thermodynamic model</SPAN>.
<P>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html160"
HREF="node10.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="/usr/share/latex2html/icons/next.png"></A>
<A NAME="tex2html156"
HREF="DeveloppersGuide.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="/usr/share/latex2html/icons/up.png"></A>
<A NAME="tex2html150"
HREF="node8.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="/usr/share/latex2html/icons/prev.png"></A>
<A NAME="tex2html158"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="/usr/share/latex2html/icons/contents.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html161"
HREF="node10.html">How to add new</A>
<B> Up:</B> <A NAME="tex2html157"
HREF="DeveloppersGuide.html">MELTING - development guide</A>
<B> Previous:</B> <A NAME="tex2html151"
HREF="node8.html">Thermodynamic model for inosine</A>
<B> <A NAME="tex2html159"
HREF="node1.html">Contents</A></B> </DIV>
<!--End of Navigation Panel-->
<ADDRESS>
Computational Neurobiology
2009-08-24
</ADDRESS>
</BODY>
</HTML>
|