Mercurial > repos > big-tiandm > mirplant2
comparison miRDeep_plant.pl @ 46:ca05d68aca13 draft
Uploaded
author | big-tiandm |
---|---|
date | Thu, 13 Nov 2014 22:43:35 -0500 |
parents | 0c4e11018934 |
children |
comparison
equal
deleted
inserted
replaced
45:2cb6add23dfe | 46:ca05d68aca13 |
---|---|
1 #!/usr/bin/perl | 1 #!/usr/bin/perl |
2 | 2 |
3 use warnings; | 3 use warnings; |
4 use strict; | 4 use strict; |
5 use Getopt::Std; | 5 use Getopt::Std; |
6 use RNA; | 6 #use RNA; |
7 | 7 |
8 | 8 |
9 ################################# MIRDEEP ################################################# | 9 ################################# MIRDEEP ################################################# |
10 | 10 |
11 ################################## USAGE ################################################## | 11 ################################## USAGE ################################################## |
383 my $cpt_sup = 0; | 383 my $cpt_sup = 0; |
384 my $cpt_inf = 0; | 384 my $cpt_inf = 0; |
385 my $cpt_ega = 1; | 385 my $cpt_ega = 1; |
386 | 386 |
387 my ($seq,$number_of_randomizations)=@_; | 387 my ($seq,$number_of_randomizations)=@_; |
388 my $str =$seq; | 388 #my $str =$seq; |
389 my $mfe = RNA::fold($seq,$str); | 389 #my $mfe = RNA::fold($seq,$str); |
390 my $rnafold=`perl -e 'print "$seq"' | RNAfold --noPS`; | |
391 my @rawfolds=split/\s+/,$rnafold; | |
392 my $str=$rawfolds[1]; | |
393 my $mfe=$rawfolds[-1]; | |
394 $mfe=~s/\(//; | |
395 $mfe=~s/\)//; | |
390 | 396 |
391 for (my $i=0;$i<$number_of_randomizations;$i++) { | 397 for (my $i=0;$i<$number_of_randomizations;$i++) { |
392 $seq = shuffle_sequence_dinucleotide($seq); | 398 $seq = shuffle_sequence_dinucleotide($seq); |
393 $str = $seq; | 399 #$str = $seq; |
394 | 400 |
395 my $rand_mfe = RNA::fold($str,$str); | 401 #my $rand_mfe = RNA::fold($str,$str); |
402 $rnafold=`perl -e 'print "$seq"' | RNAfold --noPS`; | |
403 my @rawfolds=split/\s+/,$rnafold; | |
404 my $str=$rawfolds[1]; | |
405 my $rand_mfe=$rawfolds[-1]; | |
406 $rand_mfe=~s/\(//; | |
407 $rand_mfe=~s/\)//; | |
396 | 408 |
397 if ($rand_mfe < $mfe) { | 409 if ($rand_mfe < $mfe) { |
398 $cpt_inf++; | 410 $cpt_inf++; |
399 } | 411 } |
400 if ($rand_mfe == $mfe) { | 412 if ($rand_mfe == $mfe) { |