User:Khronus
From 2011.igem.org
(<<Pasted personal_code>>) |
|||
Line 11: | Line 11: | ||
Here is our team [https://igem.org/Team.cgi?id=535 roster] in the '''UNG server'''. | Here is our team [https://igem.org/Team.cgi?id=535 roster] in the '''UNG server'''. | ||
+ | |||
+ | |||
+ | |||
+ | #!/usr/bin/perl -w | ||
+ | |||
+ | use strict; | ||
+ | |||
+ | # prog1.1 | ||
+ | # Bruno Contreras-Moreira | ||
+ | # Nearest Neighbor dG calculator | ||
+ | |||
+ | # global variables | ||
+ | my $T = 37; # temperature(C) | ||
+ | my $windowL = 15; # window length, http://www.biomedcentral.com/1471-2105/6/1 | ||
+ | my %NNparams = ( | ||
+ | # SantaLucia J (1998) PNAS 95(4): 1460-1465. | ||
+ | # [NaCl] 1M, 37C & pH=7 | ||
+ | # H(enthalpy): kcal/mol , S(entropy): cal/k·mol | ||
+ | # stacking dinucleotides | ||
+ | 'AA/TT' , {'H',-7.9, 'S',-22.2}, | ||
+ | 'AT/TA' , {'H',-7.2, 'S',-20.4}, | ||
+ | 'TA/AT' , {'H',-7.2, 'S',-21.3}, | ||
+ | 'CA/GT' , {'H',-8.5, 'S',-22.7}, | ||
+ | 'GT/CA' , {'H',-8.4, 'S',-22.4}, | ||
+ | 'CT/GA' , {'H',-7.8, 'S',-21.0}, | ||
+ | 'GA/CT' , {'H',-8.2, 'S',-22.2}, | ||
+ | 'CG/GC' , {'H',-10.6,'S',-27.2}, | ||
+ | 'GC/CG' , {'H',-9.8, 'S',-24.4}, | ||
+ | 'GG/CC' , {'H',-8.0, 'S',-19.9}, | ||
+ | # initiation costs | ||
+ | 'G' , {'H', 0.1, 'S',-2.8 }, | ||
+ | 'A' , {'H', 2.3, 'S',4.1 }, | ||
+ | # symmetry correction | ||
+ | 'sym' , {'H', 0, 'S',-1.4 } ); | ||
+ | |||
+ | #Se declaran los vectores donde se guardarán las secuencias cortadas en longitudes de 15 y 50. | ||
+ | my (@seq_win_50, @seq_win_100) = (0,0); | ||
+ | my ($start,$length,$a,$b,$D,$E1,$E2,$corazon) = (0,0,0,0,0,0,0,0); | ||
+ | |||
+ | my $seq = "GATTCGTCGCAGTGCGCTGCAATATAAAGTGCATTACGACACCACCCTGAACGGCGGCTTTGCCACCGCGATGGCGCTGAATGCCGATGCGACTGAAAAAGTAATTTCGGTGCAGGAAATGCACGCACAGATCAAATAATAGCGTGTCATGGCAGATATTTTTCATCCGCTAATTTGATCGAATAACTAATACGGTTCTCTGATGAGGACCGTTTTTTTTTGCCCATTAAGTAAATCTTTTGGGGAATCGATATTTTTGATGACATAAGCAGGATTTAGCTCACACTTATCGACGGTGAAGTTGCATACTATCGATATATCCACAATTTTAATATGGCCTTGTTTAATTGCTTCAAAACGAGTCATAGCCAGACTTTTAATTTGTGAAACTGGAGTTCGTATGTGTGAAGGATATGTTGAAAAACCACTCTACTTGTTAATCGCCGAATGG"; | ||
+ | |||
+ | #Hasta ahora el programa sólo separa las ventanas de tamaño 15 del primer set de 50 y 100 número de ventanas. | ||
+ | for(my $a=0; $a<50; $a++){ | ||
+ | $start = $a; | ||
+ | $length = $windowL; | ||
+ | $seq_win_50[$a] = substr($seq,$start,$length); | ||
+ | } | ||
+ | |||
+ | for(my $b=100; $b<200; $b++){ | ||
+ | $start = $b; | ||
+ | $length = $windowL; | ||
+ | $seq_win_100[$b] = substr($seq,$start,$length); | ||
+ | } | ||
+ | |||
+ | my$bug = duplex_deltaG($seq_win_50[0],$T,$windowL); | ||
+ | print $bug; | ||
+ | die; | ||
+ | |||
+ | #Aquí en adelante ya no funciona... | ||
+ | for(my $n=0;$n<50;$n++){ | ||
+ | $E1 += duplex_deltaG($seq_win_50[$n],$T,$windowL); | ||
+ | } | ||
+ | $E1 /= 50; | ||
+ | |||
+ | for(my $m=0;$m<100;$m++){ | ||
+ | $E2 += duplex_deltaG($seq_win_100[$m],$T,$windowL); | ||
+ | } | ||
+ | $E2 /= 100; | ||
+ | |||
+ | $D = $E1 - $E2; | ||
+ | print $D; | ||
+ | |||
+ | #Función de Bruno | ||
+ | sub duplex_deltaG | ||
+ | { | ||
+ | my ($seq,$tCelsius,$winsize) = @_; | ||
+ | |||
+ | my ($DNAstep,$nt,$dG,$win_dG) = ('','',0,0); | ||
+ | my @sequence = split(//,uc($seq)); | ||
+ | my $tK = 273.15 + $tCelsius; | ||
+ | |||
+ | sub complement{ $_[0] =~ tr/ATGC/TACG/; return $_[0] } | ||
+ | |||
+ | # add dG for overlapping dinculeotides | ||
+ | for(my $n=0;$n<=$winsize;$n++) | ||
+ | { | ||
+ | $DNAstep = $sequence[$n].$sequence[$n+1].'/'. | ||
+ | complement($sequence[$n].$sequence[$n+1]); | ||
+ | |||
+ | if(!defined($NNparams{$DNAstep})) | ||
+ | { | ||
+ | $DNAstep = reverse($DNAstep); | ||
+ | } | ||
+ | |||
+ | $dG = ((1000*$NNparams{$DNAstep}{'H'})- | ||
+ | ($tK*$NNparams{$DNAstep}{'S'})) | ||
+ | / 1000 ; | ||
+ | |||
+ | $win_dG += $dG; | ||
+ | } | ||
+ | |||
+ | |||
+ | # add correction for helix initiation | ||
+ | $nt = $sequence[0]; # first pair | ||
+ | if(!defined($NNparams{$nt})){ $nt = complement($nt) } | ||
+ | $win_dG += ((1000*$NNparams{$nt}{'H'})- | ||
+ | ($tK*$NNparams{$nt}{'S'})) | ||
+ | / 1000; | ||
+ | |||
+ | $nt = $sequence[$winsize]; # last pair | ||
+ | if(!defined($NNparams{$nt})){ $nt = complement($nt) } | ||
+ | $win_dG += ((1000*$NNparams{$nt}{'H'})- | ||
+ | ($tK*$NNparams{$nt}{'S'})) | ||
+ | / 1000; | ||
+ | |||
+ | # please complete for symmetry correction | ||
+ | |||
+ | return $win_dG; | ||
+ | } |
Revision as of 02:20, 17 May 2011
Hi, my name is Daniel.
We have available two servers https://2011.igem.org/ and https://igem.org/.
I have personal information in both:
Our team wiki is here, in the 2011 server. This link will be very helpfull since, for the time being, iGEM pages are difficult to navigate.
Here is our team roster in the UNG server.
- !/usr/bin/perl -w
use strict;
- prog1.1
- Bruno Contreras-Moreira
- Nearest Neighbor dG calculator
- global variables
my $T = 37; # temperature(C) my $windowL = 15; # window length, http://www.biomedcentral.com/1471-2105/6/1 my %NNparams = ( # SantaLucia J (1998) PNAS 95(4): 1460-1465. # [NaCl] 1M, 37C & pH=7 # H(enthalpy): kcal/mol , S(entropy): cal/k·mol # stacking dinucleotides 'AA/TT' , {'H',-7.9, 'S',-22.2}, 'AT/TA' , {'H',-7.2, 'S',-20.4}, 'TA/AT' , {'H',-7.2, 'S',-21.3}, 'CA/GT' , {'H',-8.5, 'S',-22.7}, 'GT/CA' , {'H',-8.4, 'S',-22.4}, 'CT/GA' , {'H',-7.8, 'S',-21.0}, 'GA/CT' , {'H',-8.2, 'S',-22.2}, 'CG/GC' , {'H',-10.6,'S',-27.2}, 'GC/CG' , {'H',-9.8, 'S',-24.4}, 'GG/CC' , {'H',-8.0, 'S',-19.9}, # initiation costs 'G' , {'H', 0.1, 'S',-2.8 }, 'A' , {'H', 2.3, 'S',4.1 }, # symmetry correction 'sym' , {'H', 0, 'S',-1.4 } );
- Se declaran los vectores donde se guardarán las secuencias cortadas en longitudes de 15 y 50.
my (@seq_win_50, @seq_win_100) = (0,0); my ($start,$length,$a,$b,$D,$E1,$E2,$corazon) = (0,0,0,0,0,0,0,0);
my $seq = "GATTCGTCGCAGTGCGCTGCAATATAAAGTGCATTACGACACCACCCTGAACGGCGGCTTTGCCACCGCGATGGCGCTGAATGCCGATGCGACTGAAAAAGTAATTTCGGTGCAGGAAATGCACGCACAGATCAAATAATAGCGTGTCATGGCAGATATTTTTCATCCGCTAATTTGATCGAATAACTAATACGGTTCTCTGATGAGGACCGTTTTTTTTTGCCCATTAAGTAAATCTTTTGGGGAATCGATATTTTTGATGACATAAGCAGGATTTAGCTCACACTTATCGACGGTGAAGTTGCATACTATCGATATATCCACAATTTTAATATGGCCTTGTTTAATTGCTTCAAAACGAGTCATAGCCAGACTTTTAATTTGTGAAACTGGAGTTCGTATGTGTGAAGGATATGTTGAAAAACCACTCTACTTGTTAATCGCCGAATGG";
- Hasta ahora el programa sólo separa las ventanas de tamaño 15 del primer set de 50 y 100 número de ventanas.
for(my $a=0; $a<50; $a++){ $start = $a; $length = $windowL; $seq_win_50[$a] = substr($seq,$start,$length); }
for(my $b=100; $b<200; $b++){ $start = $b; $length = $windowL; $seq_win_100[$b] = substr($seq,$start,$length); }
my$bug = duplex_deltaG($seq_win_50[0],$T,$windowL); print $bug; die;
- Aquí en adelante ya no funciona...
for(my $n=0;$n<50;$n++){ $E1 += duplex_deltaG($seq_win_50[$n],$T,$windowL); } $E1 /= 50;
for(my $m=0;$m<100;$m++){ $E2 += duplex_deltaG($seq_win_100[$m],$T,$windowL); } $E2 /= 100;
$D = $E1 - $E2; print $D;
- Función de Bruno
sub duplex_deltaG {
my ($seq,$tCelsius,$winsize) = @_;
my ($DNAstep,$nt,$dG,$win_dG) = (,,0,0); my @sequence = split(//,uc($seq)); my $tK = 273.15 + $tCelsius;
sub complement{ $_[0] =~ tr/ATGC/TACG/; return $_[0] }
# add dG for overlapping dinculeotides for(my $n=0;$n<=$winsize;$n++) { $DNAstep = $sequence[$n].$sequence[$n+1].'/'. complement($sequence[$n].$sequence[$n+1]);
if(!defined($NNparams{$DNAstep})) { $DNAstep = reverse($DNAstep); }
$dG = ((1000*$NNparams{$DNAstep}{'H'})- ($tK*$NNparams{$DNAstep}{'S'})) / 1000 ;
$win_dG += $dG; }
# add correction for helix initiation
$nt = $sequence[0]; # first pair
if(!defined($NNparams{$nt})){ $nt = complement($nt) }
$win_dG += ((1000*$NNparams{$nt}{'H'})-
($tK*$NNparams{$nt}{'S'}))
/ 1000;
$nt = $sequence[$winsize]; # last pair if(!defined($NNparams{$nt})){ $nt = complement($nt) } $win_dG += ((1000*$NNparams{$nt}{'H'})- ($tK*$NNparams{$nt}{'S'})) / 1000;
# please complete for symmetry correction
return $win_dG; }