# Turn-back primer optimization computer scripts # Copyright: (c) 2011 RIKEN Omics Science Center # Author: Yasumasa Kimura (y.kimura.g@gmail.com) # Version: 1.0 0. Prepare softwares and files * Softwares below must be installed before running our scripts : ruby (http://www.ruby-lang.org/en/) R (http://www.r-project.org/) ssearch35_t (included in fasta-35 ftp://ftp.ebi.ac.uk/pub/software/unix/fasta/fasta3/) UNAfold package (unafold-3.6 http://dinamelt.bioinfo.rpi.edu/download.php) FastaGrep (http://bioinfo.ebc.ee/download/) * File needed : Script : TP_loop.rb DNA_property.rb P.calculate.fit.y.max.R P.calculate.parameter.rb P.get.TP_sequence.3end.rb parameter.R Files of the fitted model : r134_04_lasso.neg.paper.max.beta.pval.txt r134_04_lasso.neg.paper.max.scale.txt r134_04_lasso.pos.paper.max.beta.pval.txt r134_04_lasso.pos.paper.max.scale.txt 1. Make target file containing your target sequence ( described as in later explanation ) 2. Make input configuration file for producing primer sequences ( described as in later explanation ) file format : target_file (target sequence file name, made in 1.) wt_mt 0 (please ignore this parameter) name (name of the target) annl_3end (3'end positions of annealing site on the target sequence, separated by comma ",") annl_5end (limit of 5'end position) tb_3end (3'end positions of turn-back site on the target sequence, separated by comma ",") tb_5end (limit of 5'end position) l_annl (lengths of anneal region (X), separated by comma ",") l_tb (lengths of turn-back region (Z), separated by comma ",") y (lengths between anneal and turn-back (Y), separated by comma ",") direction (direction of primers "F" or "R") base_pos 0 (position taken as an original point in the target sequence) n_group (the number of output files divided for parallel computing) example (forward, "i.input.example.f.txt") : target_file i.target.example.txt wt_mt 0 name example annl_3end 128,129,130,131,132,133,134,135,136,137,138,139,140 annl_5end 100 tb_3end 158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180 tb_5end 130 l_annl 16,18,20,22 l_tb 8,10,12,14 y 15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35 direction F base_pos 0 n_group 1 example (reverse, "i.input.example.r.txt") : target_file i.target.example.txt wt_mt 0 name example annl_3end 237,241,245,249 annl_5end 300 tb_3end 195,201,207,213 tb_5end 250 l_annl 18,22 l_tb 10,14 y 15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35 direction R base_pos 0 n_group 1 3. Run "P.get.TP_sequence.3end.rb" to generate primer sequences ruby P.get.TP_sequence.3end.rb * will be generated as an output file. The file name is "r.TP_sequence.(target name).(primer type).(base_pos).txt". This file is used in 4. as a input file. 4. Run "P.calculate.parameter.rb" to calculate parameters for each primer ruby P.calculate.parameter.rb * will be generated as an output file. You have to put the name. This file is used in 5. as a input file. * file is optional. The file is tab-delimited format : 1. primer id 2. primer sequence if this file is specified then the parameters related to hetero primers will be calculated. 5. Run "P.calculate.fit.y.max.R" to predict reaction speeds R --vanilla --slave --args < P.calculate.fit.y.max.R * The following two files will be generated as output files. You have to put the names. - : the file contains predicted target reaction speeds. - : the file contains predicted background reaction speeds. Those predicted reaction speed file are tab-delimited format : 1. primer id 2. primer sequence 3. predicted reaction speed Example: i. ruby P.get.TP_sequence.3end.rb i.input.example.r.txt ii. ruby P.calculate.parameter.rb r.TP_sequence.example.Tr.0.txt i.target.example.txt r.parameter.example.txt i.hetero.example.f.txt iii. R --vanilla --slave --args r.parameter.example.txt r.speed.target.example.txt r.speed.bckgrd.example.txt < P.calculate.fit.y.max.R iv. The result will be "r.speed.target.example.txt" and "r.speed.bckgrd.example.txt" for the target and background amplification speed, respectively # Reference: Kimura,Y., de Hoon,M.J.L., Aoki,S., Ishizu,Y., Kawai,Y., Kogo,Y., Daub,C.O., Lezhava,A., Arner,E. and Hayashizaki,Y. (2011) Optimization of turn-back primers in isothermal amplification. Nucleic acids research, 39, e59.