Skip to content

Instantly share code, notes, and snippets.

@coela
Created September 10, 2011 09:17
Show Gist options
  • Save coela/1208141 to your computer and use it in GitHub Desktop.
Save coela/1208141 to your computer and use it in GitHub Desktop.
cal free energy
sub add_free_energy{
my $gb = shift;
for my $cds ($gb->feature('CDS')){
my $before = $gb->before_startcodon($cds,4);
my $after = substr ($gb->get_geneseq($cds), 0 , 30);
my $freeenergy = `echo "$after" | hybrid-ss-min --stream`;
chomp $freeenergy;
$gb->{$cds}->{'free_energy'} = $freeenergy;
}
return $gb;
}
#gb = add_free_energy($gb);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment