Mercurial > repos > big-tiandm > mirplant2
diff quantify.pl @ 46:ca05d68aca13 draft
Uploaded
author | big-tiandm |
---|---|
date | Thu, 13 Nov 2014 22:43:35 -0500 |
parents | 0c4e11018934 |
children |
line wrap: on
line diff
--- a/quantify.pl Thu Oct 30 21:29:35 2014 -0400 +++ b/quantify.pl Thu Nov 13 22:43:35 2014 -0500 @@ -12,7 +12,7 @@ use File::Basename; #use Getopt::Std; use Getopt::Long; -use RNA; +#use RNA; my %opts; GetOptions(\%opts,"r=s","p=s","m=s","mis:i","t:i","e:i","f:i","tag:s","o=s","time:s","h"); @@ -297,9 +297,17 @@ sub structure{ foreach my $key (keys %pre_mature) { if (!(defined $pre{$key})){die "!!!!! No precursor sequence $key, please check it!\n";} - my ($str,$mfe)=RNA::fold($pre{$key}); + #my ($str,$mfe)=RNA::fold($pre{$key}); + my $rnafold=`perl -e 'print "$pre{$key}"' | RNAfold --noPS`; + my @rnafolds=split/\s+/,$rnafold; + my $str=$rnafolds[1]; + my $mfe=$rnafolds[-1]; + $mfe=~s/\(//; + $mfe=~s/\)//; + $struc{$key}{"struc"}=$str; - $struc{$key}{"mfe"}=sprintf ("%.2f",$mfe); + #$struc{$key}{"mfe"}=sprintf ("%.2f",$mfe); + $struc{$key}{"mfe"}=$mfe; foreach my $id (keys %{$pre_mature{$key}}) { ($pre_mature{$key}{$id}{"star"}[0],$pre_mature{$key}{$id}{"star"}[1])=&other_pair($pre_mature{$key}{$id}{"mature"}[0],$pre_mature{$key}{$id}{"mature"}[1],$str);