[med-svn] [libfreecontact-perl] 36/46: Imported Upstream version 0.07

Laszlo Kajan lkajan at alioth.debian.org
Thu Sep 19 15:55:05 UTC 2013


This is an automated email from the git hooks/post-receive script.

lkajan pushed a commit to branch master
in repository libfreecontact-perl.

commit b5d66043f5352b573709c1443467089d6c63538b
Author: Laszlo Kajan <lkajan at debian.org>
Date:   Mon Jul 15 16:10:40 2013 +0200

    Imported Upstream version 0.07
---
 Changes            |    4 ++++
 FreeContact.xs     |    4 ++--
 FreeContact.xsp    |   12 ++++++------
 META.yml           |    2 +-
 lib/FreeContact.pm |   12 ++++++++----
 t/02test.t         |    9 +++++----
 6 files changed, 26 insertions(+), 17 deletions(-)

diff --git a/Changes b/Changes
index bafb435..88c72f9 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
 Revision history for Perl extension FreeContact.
 
+0.07  Mon Jun 17 16:27:46 CEST 2013
+	- Corrected 'fro' test to check for precision < 1e-5.
+	- Renamed "gap_incovm" to "apply_gapth".
+
 0.06  Sun Jun 16 00:36:16 CEST 2013
 	- New method get_seq_weights() for obtaining sequence weight vector and total weight of alignment.
 
diff --git a/FreeContact.xs b/FreeContact.xs
index 09fa024..50c0df8 100644
--- a/FreeContact.xs
+++ b/FreeContact.xs
@@ -40,8 +40,8 @@ typedef freecontact::predictor::freq_vec_t	freq_vec_t;
 \
         XPUSHs(sv_2mortal(newSVpvn("cov20", 5)));\
         XPUSHs(sv_2mortal(newSViv((__ps).cov20)));\
-        XPUSHs(sv_2mortal(newSVpvn("gap_incovm", 10)));\
-        XPUSHs(sv_2mortal(newSViv((__ps).gap_incovm)));\
+        XPUSHs(sv_2mortal(newSVpvn("apply_gapth", 11)));\
+        XPUSHs(sv_2mortal(newSViv((__ps).apply_gapth)));\
         XPUSHs(sv_2mortal(newSVpvn("rho", 3)));\
         XPUSHs(sv_2mortal(newSVnv((__ps).rho)));
 
diff --git a/FreeContact.xsp b/FreeContact.xsp
index 6c7e5ad..943312c 100644
--- a/FreeContact.xsp
+++ b/FreeContact.xsp
@@ -63,14 +63,14 @@ predictor::_get_seq_weights( freq_vec_t* __aliw, double* __wtot, ali_t& __ali, d
 /*    cont_res_t      run( ali_t& __ali, double __cp,
                         double __density, double __gapth, U16 __mincontsep,
                         double __pseudocnt, double __pscnt_weight, bool __estimate_ivcov, double __shrink_lambda,
-                        bool __cov20, bool __gap_incovm, double __rho,
+                        bool __cov20, bool __apply_gapth, double __rho,
                         bool __veczw = true, int __num_threads = 0, time_res_t *__timing = NULL
                     );*/
 };
 
 %{
 cont_res_t
-predictor::_run( __ali, __cp, __density, __gapth, __mincontsep, __pseudocnt, __pscnt_weight, __estimate_ivcov, __shrink_lambda, __cov20, __gap_incovm, __rho, __veczw = true, __num_threads = 0, __icme_timeout = 1800, __timing = NULL )
+predictor::_run( __ali, __cp, __density, __gapth, __mincontsep, __pseudocnt, __pscnt_weight, __estimate_ivcov, __shrink_lambda, __cov20, __apply_gapth, __rho, __veczw = true, __num_threads = 0, __icme_timeout = 1800, __timing = NULL )
     ali_t& __ali
     double __cp
     double __density
@@ -81,7 +81,7 @@ predictor::_run( __ali, __cp, __density, __gapth, __mincontsep, __pseudocnt, __p
     bool __estimate_ivcov
     double __shrink_lambda
     bool __cov20
-    bool __gap_incovm
+    bool __apply_gapth
     double __rho
     bool __veczw
     int __num_threads
@@ -92,7 +92,7 @@ predictor::_run( __ali, __cp, __density, __gapth, __mincontsep, __pseudocnt, __p
   CODE:
     try {
       if(items>=17 && SvROK(ST(16)) && SvTYPE(SvRV(ST(16))) == SVt_PVHV) __timing = &timing;
-      RETVAL = THIS->run( __ali, __cp, __density, __gapth, __mincontsep, __pseudocnt, __pscnt_weight, __estimate_ivcov, __shrink_lambda, __cov20, __gap_incovm, __rho, __veczw, __num_threads, __icme_timeout, __timing );
+      RETVAL = THIS->run( __ali, __cp, __density, __gapth, __mincontsep, __pseudocnt, __pscnt_weight, __estimate_ivcov, __shrink_lambda, __cov20, __apply_gapth, __rho, __veczw, __num_threads, __icme_timeout, __timing );
     }
     catch (freecontact::icme_timeout_error& e)
     {
@@ -111,7 +111,7 @@ predictor::_run( __ali, __cp, __density, __gapth, __mincontsep, __pseudocnt, __p
 
 %{
 cont_res_t
-predictor::_run_with_seq_weights(ali_t& __ali, freq_vec_t &__aliw, double __wtot, double __density, double __gapth, U16 __mincontsep, double __pseudocnt, double __pscnt_weight, bool __estimate_ivcov, double __shrink_lambda, bool __cov20, bool __gap_incovm, double __rho, int __num_threads = 0, time_t __icme_timeout = 1800, time_res_t *__timing = NULL)
+predictor::_run_with_seq_weights(ali_t& __ali, freq_vec_t &__aliw, double __wtot, double __density, double __gapth, U16 __mincontsep, double __pseudocnt, double __pscnt_weight, bool __estimate_ivcov, double __shrink_lambda, bool __cov20, bool __apply_gapth, double __rho, int __num_threads = 0, time_t __icme_timeout = 1800, time_res_t *__timing = NULL)
   PREINIT:
     time_res_t timing;
   CODE:
@@ -120,7 +120,7 @@ predictor::_run_with_seq_weights(ali_t& __ali, freq_vec_t &__aliw, double __wtot
       RETVAL = THIS->run( __ali, __aliw, __wtot,
         __density, __gapth, __mincontsep,
         __pseudocnt, __pscnt_weight, __estimate_ivcov, __shrink_lambda,
-        __cov20, __gap_incovm, __rho,
+        __cov20, __apply_gapth, __rho,
         __num_threads, __icme_timeout, __timing );
     }
     catch (freecontact::icme_timeout_error& e)
diff --git a/META.yml b/META.yml
index a0bea3e..fc17db3 100644
--- a/META.yml
+++ b/META.yml
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               FreeContact
-version:            0.06
+version:            0.07
 abstract:           fast protein contact predictor
 author:
     - Laszlo Kajan <lkajan at rostlab.org>
diff --git a/lib/FreeContact.pm b/lib/FreeContact.pm
index 8447299..0eeface 100644
--- a/lib/FreeContact.pm
+++ b/lib/FreeContact.pm
@@ -35,7 +35,7 @@ our @EXPORT = qw(
 	
 );
 
-our $VERSION = '0.06';
+our $VERSION = '0.07';
 
 require XSLoader;
 XSLoader::load('FreeContact', $VERSION);
@@ -72,7 +72,7 @@ sub                 FreeContact::Predictor::run
     return $self->_run($args{ali}, $args{clustpc},
         $args{density}, $args{gapth}, $args{mincontsep},
         $args{pseudocnt}, $args{pscnt_weight}, $args{estimate_ivcov}, $args{shrink_lambda},
-        $args{cov20}, $args{gap_incovm}, $args{rho},
+        $args{cov20}, $args{apply_gapth}, $args{rho},
         defined($args{veczw}) ? $args{veczw} : 1, $args{num_threads} || 0, defined($args{icme_timeout}) ? $args{icme_timeout} : 1800, $args{timing}
     );
 }
@@ -85,7 +85,7 @@ sub                 FreeContact::Predictor::run_with_seq_weights
     return $self->_run_with_seq_weights($args{ali}, $args{aliw}, $args{wtot},
         $args{density}, $args{gapth}, $args{mincontsep},
         $args{pseudocnt}, $args{pscnt_weight}, $args{estimate_ivcov}, $args{shrink_lambda},
-        $args{cov20}, $args{gap_incovm}, $args{rho},
+        $args{cov20}, $args{apply_gapth}, $args{rho},
         $args{num_threads} || 0, defined($args{icme_timeout}) ? $args{icme_timeout} : 1800, $args{timing}
     );
 }
@@ -183,7 +183,7 @@ Defaults for the arguments are obtained with get_ps_evfold().
 
 =item run( ali => I<[]>, clustpc => dbl, density => dbl, gapth => dbl, mincontsep => uint,
     pseudocnt => dbl, pscnt_weight => dbl, estimate_ivcov => bool, shrink_lambda => dbl,
-    cov20 => bool, gap_incovm => bool, veczw => bool, rho => dbl,
+    cov20 => bool, apply_gapth => bool, veczw => bool, rho => dbl,
     [num_threads => int], [icme_timeout => int], [timing => I<{}>] )
 
 Defaults for the arguments are obtained with get_ps_evfold().
@@ -197,6 +197,10 @@ row must hold the query, with no gaps.
 
 =item TODO
 
+=item clustpc
+
+BLOSUM-style clustering similarity threshold [0-1].
+
 =item icme_timeout
 
 Inverse covariance matrix estimation timeout in seconds. Default: 1800.
diff --git a/t/02test.t b/t/02test.t
index f99063e..7591f76 100644
--- a/t/02test.t
+++ b/t/02test.t
@@ -30,11 +30,12 @@ sub check_obj {
     my $res = FreeContact::Predictor->new(dbg => 1)->run(ali => \@aln, num_threads => $num_threads, timing => $timing);
 
     my $evfold_24_42 = 0.0129471030086279; # 0-based indices
+    my $prec_threshold = 5e-5;
 
     is(reftype($res), 'HASH');
 
-    #use Data::Dumper; warn(Dumper($res));
-    ok(abs($res->{fro}->[2741]->[2]-$evfold_24_42)/$evfold_24_42 < 1e-6, 'precision test'); # 25 K 43 N 0.230969 0.0129471
+    #use Data::Dumper; warn(Dumper($res->{fro}->[2741]));
+    ok(abs($res->{fro}->[2741]->[2]-$evfold_24_42)/$evfold_24_42 < $prec_threshold, 'precision test'); # 25 K 43 N 0.230969 0.0129471
     ok($timing->{num_threads} == $num_threads, "timing results test");
 
     #use Data::Dumper; warn(Dumper($timing));
@@ -53,8 +54,8 @@ sub check_obj {
         ok(abs($wtot-620.777)/620.777 < 1e-6, 'wtot test');
 
         my $res = FreeContact::Predictor->new(dbg => 1)->run_with_seq_weights(ali => \@aln, aliw => $aliw, wtot => $wtot, num_threads => $num_threads, timing => $timing);
-warn($res->{fro}->[2741]->[2]);
-        ok(abs($res->{fro}->[2741]->[2]-$evfold_24_42)/$evfold_24_42 < 1e-6, 'wtot precision test'); # [ 2, 3, 8.08998+- ]
+
+        ok(abs($res->{fro}->[2741]->[2]-$evfold_24_42)/$evfold_24_42 < $prec_threshold, 'wtot precision test'); # [ 2, 3, 8.08998+- ]
     }
 }
 

-- 
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/libfreecontact-perl.git



More information about the debian-med-commit mailing list