Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

energy functions expect window sub-word borders #29

Closed
wants to merge 12 commits into from
8 changes: 4 additions & 4 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
fold-grammars:
strategy:
matrix:
task: [default, shapes, pkiss]
task: [default, shapes, pkiss, alishapes, palikiss, knotinframe]
runs-on: ubuntu-latest
steps:
# install gapcs
- name: Install dependencies
run: sudo apt-get install flex bison make libboost-all-dev libgsl-dev python3 python3-pip python3-biopython
- name: clone gapc
run: git clone -b master https://github.com/jlab/gapc.git $GITHUB_WORKSPACE/../gapc
run: git clone -b fix_windowmode https://github.com/jlab/gapc.git $GITHUB_WORKSPACE/../gapc
- name: configure
run: cd $GITHUB_WORKSPACE/../gapc && ./configure
- name: make
run: cd $GITHUB_WORKSPACE/../gapc && make -j 2
- name: make install
run: cd $GITHUB_WORKSPACE/../gapc && sudo make install

- uses: actions/checkout@v2
- name: configure fold-grammars
run: |
Expand Down
4 changes: 3 additions & 1 deletion Misc/Applications/addRNAoptions.pl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ sub getPath {

my $content = "";
my $warn_macrostate = 0;
$warn_macrostate = 1 if ((lc($grammar) =~ m/macrostate/) and (lc($algebraproduct) =~ m/mfe|pfunc/));
if (defined($grammar) and defined($algebraproduct)) {
$warn_macrostate = 1 if ((lc($grammar) =~ m/macrostate/) and (lc($algebraproduct) =~ m/mfe|pfunc/));
}

open (IN, $infile) || die "can't read file '$infile': $!";
my $gapcCall = "";
Expand Down
30 changes: 30 additions & 0 deletions Misc/Applications/fix_table_design.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env perl

# energy functions "hl_energy", "dl_energy", "dr_energy" and "ext_mismatch_energy" of librna.so look for the previous/next base if in alignment mode up to the left/right border of the current input string.
# This is not necessarily the next character in cases where the character is a GAP.
# If in window mode, left/right borders change during sliding the window and will thus invalidate tabulated results.
# This leads to errors, if backtracing aims to recover values during the backtrace phase that have been stored in the forward phase.
# Thus, affected non-terminals *cannot* be tabulated in this combination: alignment, window-mode, backtracing.

use strict;
use warnings;
use Data::Dumper;

my ($gapc_file, $gapc_options) = @ARGV;

my $tabledesign = "";
if (($gapc_options =~ m/--window-mode/) && ($gapc_options =~ m/--k?backtrace/)) {
if ($gapc_file =~ m/ali_[nodangle|overdangle]/) {
$tabledesign = "--tab leftB --tab ml_comps --tab ml_comps1 --tab multiloop --tab rightB --tab stack --tab strong --tab struct";
} elsif ($gapc_file =~ m/ali_microstate/) {
$tabledesign = "--tab leftB --tab ml_comps --tab ml_comps1 --tab multiloop --tab rightB --tab stack --tab iloop --tab struct";
} elsif ($gapc_file =~ m/ali_macrostate/) {
$tabledesign = "--tab ml_comps1 --tab no_dl_no_ss_end --tab dl_or_ss_left_ss_end --tab no_dl_ss_end --tab iloop --tab ml_comps2 --tab ml_comps4 --tab strong --tab left_dangle --tab nodangle --tab block_dl --tab dl_or_ss_left_no_ss_end --tab noleft_dangle --tab weak --tab block_dlr --tab left_unpaired --tab ml_comps3";
} elsif ($gapc_file =~ m/ali_pKiss/) {
$tabledesign = "--tab struct --tab strong --tab weak --tab stack --tab leftB --tab rightB --tab iloop --tab multiloop --tab ml_comps --tab ml_comps1 --tab mldangle --tab pk_comps --tab middleNoDangling --tab help_pknot_free_hk --tab help_pkiss_Aleft --tab help_pkiss_Aright --tab help_pknot_free_hk_3D --tab help_pkiss_C --tab help_pkiss_D --tab knot --tab strategyA --tab strategyB --tab strategyC --tab strategyD --tab pknotsRG";
}
}
print $tabledesign;
if ($tabledesign ne "") {
print STDERR "due to alignment mode & window mode & backtracing we will use the following table design: manualtabledesign=\"$tabledesign\"\n";
}
23 changes: 11 additions & 12 deletions Misc/Test-Suite/StefanStyle/Truth/palikiss.run.out
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
(-13.95 = -10.97 + -2.98) ...[[......................{{....]]..}}. (sci: 0.470)

91 G_UCGUCCCCGCGCCUGG________________G_U___ 130
(-18.42 = -16.47 + -1.95) ..[[[..{{]]]....}}...................... (sci: 0.540)
(-18.38 = -16.43 + -1.95) ..[[[..{{]]]....}}...................... (sci: 0.540)

121 ____G_U________CUGGG_____GCCCGAGGAGACA__ 160
( 0.00 = 0.00 + 0.00) ........................................ (sci: 0.000)
Expand All @@ -79,7 +79,7 @@
(-34.91 = -30.93 + -3.98) ..[[[[.{{..]]]]............(((...[[..{{]].....}}.....................................)))...}}....... (sci: 0.380)

81 -----u-GKMkcUCGUCCCYSHRHHYRrawugmag-camryarurmY-wwyggurCUKKR-aummGMMYGRRGARACWc-MYRCrmaaa 169
(-28.66 = -25.90 + -2.76) .......[[....{{..]]..}}[[........................................{{....]].........}}..... (sci: 0.360)
(-28.65 = -25.89 + -2.76) .......[[....{{..]]..}}[[........................................{{....]].........}}..... (sci: 0.360)

#CMD: perl -I ../../Applications/lib/ x86_64-linux-gnu/pAliKiss --binPath='x86_64-linux-gnu/x86_64-linux-gnu/' --mode=subopt --allowLP=0 ROOTDIR/Misc/Test-Suite/StefanStyle/t-box.aln --Hpenalty=-12 --Kpenalty=-20 --absoluteDeviation=1 --cfactor=1.1 --consensus=consensus --minHairpinLength=6 --nfactor=1 --pairingFraction=-150 --param=BGAPDIR/share/gapc/librna/rna_turner2004.par --ribosumscoring=1 --sci=1 --shapeLevel=5 --strategy=C --temperature=25.9 --windowIncrement=10
1 ___________GCGGCCGCGCGUCGGC_G_GGGG_CAAGCGGGGUGGUACCGCGGCGCU__CGCGCACCG_GCG_____________GGCG_UCGUCCCCGCGCCUGG________________G_U________CUGGG_____GCCCGAGGAGACA__ACGCG____ 169
Expand All @@ -94,16 +94,15 @@
(-20.13 = -18.84 + -1.29) ...........[[.{{.]][[..{{]]....}}.....}} (sci: 0.570)

21 CGUCGGC_G_GGGG_CAAGCGGGGUGGUACCGCGGCGCU_ 60
(-35.57 = -30.86 + -4.71) [[[..{{...]]].....}}..[[[.{{]]]...}}.... (sci: 0.880)
(-35.47 = -30.76 + -4.71) [[[..{{...]]].....}}..[[[.{{]]]...}}.... (sci: 0.880)

41 GGGGUGGUACCGCGGCGCU__CGCGCACCG_GCG______ 80
(-27.91 = -23.74 + -4.17) ..[[[.{{]]][[.{{]]......}}.....}}....... (sci: 0.790)
(-26.96 = -23.37 + -3.59) ..[[[.{{]]][[.{{]]....}}.......}}....... (sci: 0.760)
(-26.93 = -23.82 + -3.11) .[[..{{{.]][[.{{]]....}}..}}}........... (sci: 0.760)

61 _CGCGCACCG_GCG_____________GGCG_UCGUCCCC 100
(-12.27 = -10.06 + -2.21) ...[[......................{{....]]..}}. (sci: 0.470)
(-11.98 = -9.87 + -2.11) ...[[......................{{....]]...}} (sci: 0.460)
(-12.21 = -10.00 + -2.21) ...[[......................{{....]]..}}. (sci: 0.470)
(-11.92 = -9.81 + -2.11) ...[[......................{{....]]...}} (sci: 0.460)
(-11.60 = -11.37 + -0.23) ....[[.....{{]]...................}}.... (sci: 0.440)
(-11.48 = -10.82 + -0.66) ...........[[[.............{{....]]]..}} (sci: 0.440)
(-11.44 = -10.92 + -0.52) ............[[.............{{]]......}}. (sci: 0.440)
Expand Down Expand Up @@ -214,19 +213,19 @@

41 RGGGUGGUACCGCGKBDYY--cgCGYAYYDrGMgya---- 80
( -8.35 = -1.23 + -7.12) ..(((...)))(((.........))).............. best 'nested structure'
(-39.16 = -35.58 + -3.58) ..[[[.[[...{{.]]......}}{{]]]..}}....... best 'H-type pseudoknot'
(-39.07 = -35.49 + -3.58) ..[[[.[[...{{.]]......}}{{]]]..}}....... best 'H-type pseudoknot'
no structure available best 'K-type pseudoknot'
no structure available best 'H- and K-type pseudoknot'

61 -cgCGYAYYDrGMgya---------u-GKMkcUCGUCCCY 100
( -0.07 = 0.98 + -1.05) ...(((.....))).......................... best 'nested structure'
(-19.87 = -17.17 + -2.70) ...[[......................{{....]]..}}. best 'H-type pseudoknot'
( 0.00 = 0.00 + 0.00) ........................................ best 'nested structure'
(-19.83 = -17.13 + -2.70) ...[[......................{{....]]..}}. best 'H-type pseudoknot'
no structure available best 'K-type pseudoknot'
no structure available best 'H- and K-type pseudoknot'

81 -----u-GKMkcUCGUCCCYSHRHHYRrawugmag-camr 120
( -0.07 = 1.95 + -2.02) .............((....))................... best 'nested structure'
(-23.20 = -21.35 + -1.85) .............[[..{{]].....}}............ best 'H-type pseudoknot'
(-23.10 = -21.25 + -1.85) .............[[..{{]].....}}............ best 'H-type pseudoknot'
no structure available best 'K-type pseudoknot'
no structure available best 'H- and K-type pseudoknot'

Expand Down Expand Up @@ -391,7 +390,7 @@
(-31.07 = -32.14 + 1.07) ...........[[....{{..[[..{{...]]...[[.....{{]]...}}...}}........]]............................}}.... (sci: 0.310) [{[{][{]}}]}

21 HNWHNKH-guRBGGuCAAGCRGGGUGGUACCGCGKBDYY--cgCGYAYYDrGMgya---------u-GKMkcUCGUCCCYSHRHHYRrawugmag-camr 120
(-34.22 = -34.80 + 0.58) .[[.{{....]]...[[..{{{{{]]....[[.{{........]]...........................}}..}}}}}..}}............... (sci: 0.350) [{][{][{]}}}
(-34.16 = -34.74 + 0.58) .[[.{{....]]...[[..{{{{{]]....[[.{{........]]...........................}}..}}}}}..}}............... (sci: 0.350) [{][{][{]}}}

41 RGGGUGGUACCGCGKBDYY--cgCGYAYYDrGMgya---------u-GKMkcUCGUCCCYSHRHHYRrawugmag-camryarurmY-wwyggurCUKKR 140
(-18.19 = -18.48 + 0.29) .[[..{{..]].(((.....................................)))...}}........................................ (sci: 0.210) [{]()}
Expand Down Expand Up @@ -459,7 +458,7 @@
(-78.63 = -68.74 + -9.89) .....[[.{{{{..]]...}}}}[[.......{{{{.]]..}}}}..................[[..{{]].....}}...................... (sci: 0.660) 1.0000000 [{]}[{]}[{]}

61 _CGCGCACCG_GCG_____________GGCG_UCGUCCCCGCGCCUGG________________G_U________CUGGG_____GCCCGAGGAGACA__ 160
(-24.23 = -21.23 + -3.00) ..((((.....))))..................[[..{{]].....}}.................................................... (sci: 0.230) 0.9512897 ()[{]}
(-22.23 = -20.29 + -1.94) .................................[[..{{]].....}}.................................................... (sci: 0.210) 0.9927928 [{]}

91 G_UCGUCCCCGCGCCUGG________________G_U________CUGGG_____GCCCGAGGAGACA__ACGCG____ 169
(-22.23 = -20.29 + -1.94) ...[[..{{]].....}}............................................................. (sci: 0.270) 0.9405870 [{]}
Expand Down
Loading