Skip to content

Commit

Permalink
Merge pull request #191 from BackofenLab/dev
Browse files Browse the repository at this point in the history
v3.2.1
  • Loading branch information
martin-raden authored Nov 27, 2020
2 parents ea591b6 + 2daa731 commit d4a63f0
Show file tree
Hide file tree
Showing 23 changed files with 111 additions and 63 deletions.
55 changes: 54 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,64 @@
# changes in development version since last release
################################################################################


# IntaRNA

################################################################################
################################################################################


################################################################################
### version 3.2.1
################################################################################

# IntaRNA
- support for multi-seq input when `seedQ|TRange` given
- BUGFIX: Andronescu07 energy parameter set was not loaded by name without file
- BUGFIX: 'outMinPu' was not fully implemented
- BUILDFIX: non-global import of boost::bind

# CopomuS :
- exit value 0 if no favorable interaction was found

################################################################################

201127 Martin Raden
* bin/CommandLineParsing :
* changing import and usage of boost::bind and boost::placeholders namespace
(thanks to Behra Phani Rama Krishna)

200615 Martin Raden
* IntaRNA/OutputConstraint :
+ maxED : maximal ED penalty of each interacting subsequence
* bin/CommandLineParsing :
* getOutputConstraint() :
+ energy argument to setup OutputConstraint constructor call
* IntaRNA/Predictor :
* updateZall() :
+ check for OutputConstraint.maxED
* IntaRNA/PredictorMfe :
* updateOptima() :
+ check for OutputConstraint.maxED
* IntaRNA/PredictorMfe* :
* obsolete OutputConstraint variable removed

200602 Martin Raden
* bin/CommandLineParsing :
+ sequence error information now with sequence ID rather than number

200602 Martin Raden
* bin/CommandLineParsing :
+ explicit seedQ|TRange check for each sequence (support for multi-seq input)

200429 Martin Raden
* python/copomus/candidate_selectors.py :
* bugfix: sys.exit(0) if not favorable interaction was found

200312 Martin Raden
* bin/CommandLineParsing :
* validate_energyFile() :
+ bugfix: missing check for predefined Andronescu07 data set name

################################################################################
### version 3.2.0
################################################################################
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

AC_PREREQ([2.65])
# 5 argument version only available with aclocal >= 2.64
AC_INIT([IntaRNA], [3.2.0], [], [intaRNA], [http://www.bioinf.uni-freiburg.de] )
AC_INIT([IntaRNA], [3.2.1], [], [intaRNA], [http://www.bioinf.uni-freiburg.de] )

# minimal required version of the boost library
BOOST_REQUIRED_VERSION=1.50.0
Expand Down
4 changes: 2 additions & 2 deletions python/copomus/candidate_selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def get_mfe_bps(query: str, target: str, qidxpos0: int, tidxpos0: int, param_fil
data = i.run(query, target, qidxpos0, tidxpos0, 'bpList', threads, param_file=param_file)
if not data or not data['bpList']:
print('No favorable interaction between the specified sequences!')
sys.exit(1)
sys.exit(0)
for t in data['bpList'].strip().split(':'):
t_index, q_index = [int(x) for x in t.strip('(').strip(')').split(',')]
candidates.append((q_index, t_index)) # note we do query first, then target
Expand All @@ -48,7 +48,7 @@ def get_mfe_bps_so(query: str, target: str, qidxpos0: int, tidxpos0: int, param_
data = i.run(query, target, qidxpos0, tidxpos0, 'start1,end1,start2,end2', threads, param_file=param_file)
if not data:
print('No favorable interaction between the specified sequences!')
sys.exit(1)
sys.exit(0)
data = i.run(query, target, qidxpos0, tidxpos0, 'bpList', threads, 1000, param_file,
['--qRegion', f"{data['start2']}-{data['end2']}", '--tRegion', f"{data['start1']}-{data['end1']}"])
for subopt in data:
Expand Down
2 changes: 2 additions & 0 deletions src/IntaRNA/OutputConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ OutputConstraint::OutputConstraint(
, const bool noGUend
, const bool needZall
, const bool needBPs
, const E_type maxED
)
:
reportMax(reportMax)
Expand All @@ -26,6 +27,7 @@ OutputConstraint::OutputConstraint(
, noGUend(noGUend)
, needZall(needZall)
, needBPs(needBPs)
, maxED(maxED)
{
if(deltaE < (E_type)0.0) throw std::runtime_error("OutputConstraint(deltaE="+toString(deltaE)+") not >= 0.0");
}
Expand Down
7 changes: 6 additions & 1 deletion src/IntaRNA/OutputConstraint.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#define INTARNA_OUTPUTCONSTRAINT_H_

#include "IntaRNA/general.h"
#include "IntaRNA/Accessibility.h"

namespace IntaRNA {

Expand Down Expand Up @@ -58,6 +59,9 @@ class OutputConstraint
//! whether or not interaction base pairs have to be traced for output generation
const bool needBPs;

//! maximal ED penalty of each interacting subsequence to be considered for output
const E_type maxED;

public:

/**
Expand All @@ -83,7 +87,8 @@ class OutputConstraint
, const bool noLP = false
, const bool noGUend = false
, const bool needZall = false
, const bool needBPs = true );
, const bool needBPs = true
, const E_type maxED = Accessibility::ED_UPPER_BOUND);

//! destruction
virtual ~OutputConstraint();
Expand Down
9 changes: 9 additions & 0 deletions src/IntaRNA/Predictor.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,15 @@ updateZall( const size_t i1, const size_t j1
return;
}

// check ED penalties
if (output.getOutputConstraint().maxED < Accessibility::ED_UPPER_BOUND
&& (energy.getED1(i1,j1) > output.getOutputConstraint().maxED
|| energy.getED2(i2,j2) > output.getOutputConstraint().maxED)
)
{
return;
}

// increment Zall with BW of overall energy
incrementZall(
energy.getBoltzmannWeight(
Expand Down
9 changes: 9 additions & 0 deletions src/IntaRNA/PredictorMfe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ updateOptima( const size_t i1, const size_t j1
return;
}

// check ED penalties
if (output.getOutputConstraint().maxED < Accessibility::ED_UPPER_BOUND
&& (energy.getED1(i1,j1) > output.getOutputConstraint().maxED
|| energy.getED2(i2,j2) > output.getOutputConstraint().maxED)
)
{
return;
}

// update Zall if needed
if (incrementZall) {
updateZall( i1,j1, i2,j2, interE, isHybridE );
Expand Down
3 changes: 0 additions & 3 deletions src/IntaRNA/PredictorMfe2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ PredictorMfe2d::
predict( const IndexRange & r1
, const IndexRange & r2 )
{
// temporary access
const OutputConstraint & outConstraint = output.getOutputConstraint();

#if INTARNA_MULITHREADING
#pragma omp critical(intarna_omp_logOutput)
#endif
Expand Down
2 changes: 0 additions & 2 deletions src/IntaRNA/PredictorMfe2dHeuristic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ predict( const IndexRange & r1
, const IndexRange & r2
)
{
// temporary access
const OutputConstraint & outConstraint = output.getOutputConstraint();
#if INTARNA_MULITHREADING
#pragma omp critical(intarna_omp_logOutput)
#endif
Expand Down
2 changes: 0 additions & 2 deletions src/IntaRNA/PredictorMfe2dHeuristicSeed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ PredictorMfe2dHeuristicSeed::
predict( const IndexRange & r1
, const IndexRange & r2 )
{
// temporary access
const OutputConstraint & outConstraint = output.getOutputConstraint();
#if INTARNA_MULITHREADING
#pragma omp critical(intarna_omp_logOutput)
#endif
Expand Down
2 changes: 0 additions & 2 deletions src/IntaRNA/PredictorMfe2dHeuristicSeedExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ void
PredictorMfe2dHeuristicSeedExtension::
predict( const IndexRange & r1, const IndexRange & r2 )
{
// temporary access
const OutputConstraint & outConstraint = output.getOutputConstraint();
#if INTARNA_MULITHREADING
#pragma omp critical(intarna_omp_logOutput)
#endif
Expand Down
2 changes: 0 additions & 2 deletions src/IntaRNA/PredictorMfe2dSeed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ void
PredictorMfe2dSeed::
predict( const IndexRange & r1, const IndexRange & r2 )
{
// temporary access
const OutputConstraint & outConstraint = output.getOutputConstraint();
#if INTARNA_MULITHREADING
#pragma omp critical(intarna_omp_logOutput)
#endif
Expand Down
2 changes: 0 additions & 2 deletions src/IntaRNA/PredictorMfe2dSeedExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ void
PredictorMfe2dSeedExtension::
predict( const IndexRange & r1, const IndexRange & r2 )
{
// temporary access
const OutputConstraint & outConstraint = output.getOutputConstraint();
#if INTARNA_MULITHREADING
#pragma omp critical(intarna_omp_logOutput)
#endif
Expand Down
2 changes: 0 additions & 2 deletions src/IntaRNA/PredictorMfeEns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ void
PredictorMfeEns::
traceBack( Interaction & interaction )
{
// temporary access
const OutputConstraint & outConstraint = output.getOutputConstraint();
// check if something to trace
if (interaction.basePairs.size() < 2) {
return;
Expand Down
2 changes: 0 additions & 2 deletions src/IntaRNA/PredictorMfeEns2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ PredictorMfeEns2d::
predict( const IndexRange & r1
, const IndexRange & r2 )
{
// temporary access
const OutputConstraint & outConstraint = output.getOutputConstraint();
#if INTARNA_MULITHREADING
#pragma omp critical(intarna_omp_logOutput)
#endif
Expand Down
2 changes: 0 additions & 2 deletions src/IntaRNA/PredictorMfeEns2dHeuristic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ predict( const IndexRange & r1
, const IndexRange & r2
)
{
// temporary access
const OutputConstraint & outConstraint = output.getOutputConstraint();
#if INTARNA_MULITHREADING
#pragma omp critical(intarna_omp_logOutput)
#endif
Expand Down
2 changes: 0 additions & 2 deletions src/IntaRNA/PredictorMfeEns2dHeuristicSeedExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ void
PredictorMfeEns2dHeuristicSeedExtension::
predict( const IndexRange & r1, const IndexRange & r2 )
{
// temporary access
const OutputConstraint & outConstraint = output.getOutputConstraint();
#if INTARNA_MULITHREADING
#pragma omp critical(intarna_omp_logOutput)
#endif
Expand Down
2 changes: 0 additions & 2 deletions src/IntaRNA/PredictorMfeEns2dSeedExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ void
PredictorMfeEns2dSeedExtension::
predict( const IndexRange & r1, const IndexRange & r2 )
{
// temporary access
const OutputConstraint & outConstraint = output.getOutputConstraint();
#if INTARNA_MULITHREADING
#pragma omp critical(intarna_omp_logOutput)
#endif
Expand Down
4 changes: 0 additions & 4 deletions src/IntaRNA/PredictorMfeEnsSeedOnly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ void
PredictorMfeEnsSeedOnly::
predict( const IndexRange & r1, const IndexRange & r2 )
{
// temporary access
const OutputConstraint & outConstraint = output.getOutputConstraint();
#if INTARNA_MULITHREADING
#pragma omp critical(intarna_omp_logOutput)
#endif
Expand Down Expand Up @@ -97,8 +95,6 @@ void
PredictorMfeEnsSeedOnly::
traceBack( Interaction & interaction )
{
// temporary access
const OutputConstraint & outConstraint = output.getOutputConstraint();
// check if something to trace
if (interaction.basePairs.size() < 2) {
return;
Expand Down
4 changes: 0 additions & 4 deletions src/IntaRNA/PredictorMfeSeedOnly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ void
PredictorMfeSeedOnly::
predict( const IndexRange & r1, const IndexRange & r2 )
{
// temporary access
const OutputConstraint & outConstraint = output.getOutputConstraint();
#if INTARNA_MULITHREADING
#pragma omp critical(intarna_omp_logOutput)
#endif
Expand Down Expand Up @@ -95,8 +93,6 @@ void
PredictorMfeSeedOnly::
traceBack( Interaction & interaction )
{
// temporary access
const OutputConstraint & outConstraint = output.getOutputConstraint();
// check if something to trace
if (interaction.basePairs.size() < 2) {
return;
Expand Down
Loading

0 comments on commit d4a63f0

Please sign in to comment.