Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
c55bac1
PredictionTrackerBasePairProb layout
Fulanko Jun 22, 2019
b249550
added base-pair probability recursion
Fulanko Jun 23, 2019
7d9720a
updated PredictionTrackerBasePairProb + added dot plot (probabilities…
Fulanko Jun 29, 2019
c44bdee
fixed overallHybridizationZ
Fulanko Jun 29, 2019
8e496f7
code cleanup
Fulanko Jul 1, 2019
2d9d5f7
fixed probabilities of > 1
Fulanko Jul 1, 2019
79d6ff8
various fixes and cleanup in PredictionTrackerBasePairProb
Fulanko Jul 14, 2019
8e061e1
added versions to postscript comment
Fulanko Jul 23, 2019
306f254
added code for seedbased base-pair probs (Not working correctly)
Fulanko Aug 27, 2019
17f4bcc
Merge branch 'dev' into basepair-probs
Fulanko Sep 13, 2019
83e2dd8
rebase fixes
Fulanko Sep 13, 2019
a2c4d75
fixed some missing changes
Fulanko Sep 13, 2019
42676bf
Merge branch 'dev' into basepair-probs
Fulanko Sep 13, 2019
b6e06e0
added test for Zall
Fulanko Sep 14, 2019
3205b3e
refactored predictionTrackerBasePairProb
Fulanko Sep 14, 2019
3158bf3
changed getZ -> getHybridZ + added default argument to reportZ
Fulanko Sep 14, 2019
019422f
fixed basepairProb tracker bugs + added test
Fulanko Sep 15, 2019
b7587f7
refactor
Fulanko Sep 15, 2019
88841c0
added script for basepair prob dot plots
Fulanko Sep 17, 2019
81c2116
fixed reversed sequence in dotplot
Fulanko Sep 17, 2019
e3f01f3
added python script to compute concentrations of homo/hetero dimers
Fulanko Sep 18, 2019
f96bab0
input validation
Fulanko Sep 18, 2019
f2fbff6
outer loop changes
Fulanko Sep 19, 2019
6fd8c3e
Merge branch 'dev' into basepair-probs
Fulanko Sep 19, 2019
40e2f36
renamed test + changed IntaRNA_precisionEpsilon
Fulanko Sep 19, 2019
c956c68
renamed test
Fulanko Sep 19, 2019
7ae5cf6
changed dotplot template to inline string
Fulanko Sep 19, 2019
c0bf615
intaRNAtube.py refactoring
Fulanko Sep 19, 2019
8047b4d
added outline of intaRNA prediction to dotplot
Fulanko Sep 20, 2019
0b6bc63
Merge branch 'dev' into basepair-probs
Fulanko Sep 20, 2019
1fadec9
added tests for predictionTrackerBasePairProb
Fulanko Sep 20, 2019
20fb14f
reverted bp prob loop restrictions
Fulanko Sep 20, 2019
e57a4c8
updated prediction Tracker + added tests
Fulanko Sep 22, 2019
75d1598
fixed bpPropTracker no seed
Fulanko Sep 22, 2019
e4c3661
fixed some base pair prob tests
Fulanko Sep 23, 2019
53f2a11
added leftIndex to bp tracker + fixed dotplot dashing
Fulanko Sep 23, 2019
a0a0fa3
Merge branch 'dev' into basepair-probs
Fulanko Sep 23, 2019
bf65b7f
refactored predictionTracker code for seed-based predictions
Fulanko Sep 23, 2019
f1ca8a7
refactoring
Fulanko Sep 24, 2019
d9a0533
added non-dotted line every 10th line in dotplot
Fulanko Sep 26, 2019
bec1175
reverted Zall changes
Fulanko Sep 26, 2019
509a77f
implemented left-index based prediction (performance improvement)
Fulanko Sep 28, 2019
3a4ff69
removed unneeded loops in bp prob computation + minor fixes for seed-…
Fulanko Sep 29, 2019
d91f43b
minor changes
martin-raden Oct 2, 2019
cf3b883
simplify
martin-raden Oct 2, 2019
1b2d4df
cleanup + todos
martin-raden Oct 2, 2019
8e9d25e
comments
martin-raden Oct 2, 2019
cf94b87
comments
martin-raden Oct 2, 2019
46ac350
comments
martin-raden Oct 2, 2019
800791e
some refactoring
Fulanko Oct 2, 2019
01f0831
temporary fix for most seed-based probabilities
Fulanko Oct 4, 2019
e9a9457
working seed-based tracker (needs some more testing)
Fulanko Oct 4, 2019
64dd29f
fixed bp prob tests
Fulanko Oct 4, 2019
5c0b0de
some cleanup
Fulanko Oct 5, 2019
67ed776
Merge branch 'dev' into basepair-probs
Fulanko Oct 5, 2019
ae275df
remove python script from this branch ...
Fulanko Oct 5, 2019
827a7c1
added test with overlapping seeds
Fulanko Oct 5, 2019
4caa3b7
fixed grid spacing on large dotplots
Fulanko Oct 5, 2019
37e05b0
Merge branch 'dev' into basepair-probs
Fulanko Oct 7, 2019
7a7acd0
removed logs
Fulanko Oct 7, 2019
11d8271
bug spotted and todos added
martin-raden Oct 8, 2019
213388f
fixed numerous bugs in PredictionTracker
Fulanko Oct 8, 2019
039c4ab
fixed bug related to error in theory (all tests working now)
Fulanko Oct 8, 2019
fb2c243
added test for buggy example + added outline to dotplots
Fulanko Oct 9, 2019
efcdce1
joint brains
martin-raden Oct 9, 2019
6bfd17a
binary removed
martin-raden Oct 9, 2019
f60c07f
fixed a number of typos & bugs
Fulanko Oct 9, 2019
7359e34
renamed some variables
Fulanko Oct 10, 2019
6fbfeda
removed test binary
Fulanko Oct 10, 2019
7d1efa9
changed Interaction::Basepair to struct (+ added ostream operator)
Fulanko Oct 10, 2019
41e99b3
fixed << operators
Fulanko Oct 10, 2019
24bb796
fixed broken basepair < operator
Fulanko Oct 10, 2019
ee29e22
fixed missing Z values + index
Fulanko Oct 10, 2019
3b12617
fix for noseed bp probs ...
Fulanko Oct 10, 2019
ab30d64
kaputtgemacht.. :)
martin-raden Oct 11, 2019
1ecb8a4
fix for tests
Fulanko Oct 13, 2019
54889a0
fixed noseed bp probabilities as dedicated method + made variables const
Fulanko Oct 13, 2019
878a470
Zinit obsolete
martin-raden Oct 14, 2019
e0870fd
add missing bracket
martin-raden Oct 23, 2019
65c7762
added automatic scaling of larger dotplots + added grayscale dots
Fulanko Nov 10, 2019
f292759
removed relics from old attempts at seed-based bp probs
Fulanko Nov 13, 2019
a142e47
Merge branch 'dev' into basepair-probs
Fulanko Jan 11, 2020
6d55027
Merge branch 'dev' into basepair-probs
Fulanko Jan 28, 2020
a36c2e0
type fix in basePairProb test
Fulanko Jan 28, 2020
8addbc7
added static fill_hybridZ method to PredictorMfeEns
Fulanko Jan 28, 2020
90def0e
Merge branch 'dev' into basepair-probs
Fulanko Feb 4, 2020
d9b793e
updated seed-constrain fillHybridZ_left + moved static methods to cor…
Fulanko Feb 4, 2020
3cc6064
minor fix
Fulanko Feb 4, 2020
c3baffd
added access to hybridZ for predictionTracker
Fulanko Feb 5, 2020
896e809
Merge branch 'dev' into basepair-probs
Fulanko Feb 9, 2020
a8e839f
added trackBPprob flag + hashed ZL partitions
Fulanko Feb 9, 2020
3117185
seed-based prediction tracker cleanup + progress
Fulanko Feb 11, 2020
149d89f
getOverlappingSeed
Fulanko Feb 11, 2020
24fb307
twaks and todos
martin-raden Feb 12, 2020
f848f24
PredictionTrackerBPProb fixed ZNL:seed:ZNR case + added seedHandler.i…
Fulanko Feb 16, 2020
471f6ad
basepairProb tracker bug fixes
Fulanko Feb 17, 2020
9946f4b
predictionTrackerBPprob
Fulanko Feb 18, 2020
275ab07
fixes...
martin-raden Feb 19, 2020
f111b62
input check
martin-raden Feb 19, 2020
666eded
fix the fix
martin-raden Feb 19, 2020
97d6e16
cleanup
Fulanko Feb 19, 2020
9996634
bugfix
martin-raden Feb 20, 2020
bedb477
fixed bug in ZHR computation
Fulanko Feb 25, 2020
d1d2a2d
new variant (has missing cases?)
Fulanko Feb 25, 2020
abb5f74
added missing case
Fulanko Feb 26, 2020
e0f640f
ZR memoization
Fulanko Mar 3, 2020
21f7909
Merge branch 'dev' into basepair-probs
Fulanko Mar 3, 2020
6fcbadc
added includeBoundaries bool to isSeedBP
Fulanko Mar 3, 2020
c7473ee
updateToNextSeedWithK
Fulanko Mar 3, 2020
08b3309
seedhandler extension
martin-raden Mar 4, 2020
b1da844
added SVG dotplots with accessibility energies
Fulanko Mar 4, 2020
6959b99
improved SVG output
Fulanko Mar 5, 2020
8b0e5a2
fixed MFE in svg output + moved back to inline css
Fulanko Mar 10, 2020
3970230
bugfix
martin-raden Mar 11, 2020
6985b91
svg output fix + changes
Fulanko Mar 11, 2020
de409bf
Merge branch 'basepair-probs' of github.com:Fulanko/IntaRNA into base…
Fulanko Mar 11, 2020
fbc5a7f
fixed text positioning
Fulanko Mar 11, 2020
9b7b426
box function return now std::string
martin-raden Mar 26, 2020
cea4ea1
fprintf() formatting corrected
martin-raden Nov 10, 2023
a58f38e
basepairprob parameter docu extended
martin-raden Nov 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified autotools-init.sh
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/IntaRNA/HelixHandlerNoBulgeMax.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class HelixHandlerNoBulgeMax : public HelixHandler {
//! container type for sparse helix information for a given left-most
//! base pair (i1,i2)
//! it holds both the energy (first) as well as the length of the helix
typedef boost::unordered_map< Interaction::BasePair, HelixData > HelixHash;
typedef boost::unordered_map< Interaction::BasePair, HelixData, Interaction::BasePair::Hash, Interaction::BasePair::Equal > HelixHash;

protected:

Expand Down
10 changes: 10 additions & 0 deletions src/IntaRNA/Interaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ operator<<(std::ostream& out, const Interaction::BasePair& bp)

////////////////////////////////////////////////////////////////////////////

std::ostream&
operator<<(std::ostream& out, const Interaction::Boundary& b)
{
out <<"("<<b.i1<<":"<<b.i2<<")-("<<b.j1<<","<<b.j2<<")";
// out <<"("<<b.i1<<","<<b.j1<<","<<b.i2<<","<<b.j2<<")";
return out;
}

////////////////////////////////////////////////////////////////////////////

std::ostream&
operator<<(std::ostream& out, const Interaction& i)
{
Expand Down
94 changes: 92 additions & 2 deletions src/IntaRNA/Interaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,88 @@ class Interaction {
public:

//! type of a base pair index encoding
typedef std::pair<size_t,size_t> BasePair;
struct BasePair {
size_t first; //!< index in first sequence
size_t second; //!< index in second sequence

/**
* Construction
* @param first index in first sequence
* @param second index in second sequence
*/
BasePair( const size_t first=RnaSequence::lastPos, const size_t second=RnaSequence::lastPos )
: first(first), second(second)
{}

//! hash value computation
struct Hash {
/**
* Hash value computation for an instance
* @param i instance to hash
* @return the respective hash value
*/
size_t operator()(const BasePair &i ) const
{
size_t key = 0;
boost::hash_combine(key, i.first);
boost::hash_combine(key, i.second);
return key;
}
};

//! equality check
struct Equal {
/**
* check equality of two instances
* @param lhs instance 1
* @param rhs instance 2
* @param true if all indices are equal; false otherwise
*/
bool operator()( const BasePair & lhs, const BasePair & rhs ) const
{
return lhs.first == rhs.first
&& lhs.second == rhs.second ;
}
};

/**
* @param bp the basepair to compare to
* @return true if this basepair is considered smaller than bp
*/
const bool
operator < ( const BasePair &bp ) const {
if (first < bp.first)
return true;
else if (bp.first < first)
return false;
else if (second < bp.second)
return true;
return false;
}

/**
* equality check
* @param bp the basepair to compare to
* @return true if this basepair equals bp
*/
const bool
operator == ( const BasePair &bp ) const {
return first == bp.first
&& second == bp.second;
}

/**
* inequality check
* @param bp the basepair to compare to
* @return false if this basepair equals bp
*/
const bool
operator != ( const BasePair &bp ) const {
return first != bp.first
|| second != bp.second;
}

};

//! type of a vector encoding base pair indices that are interacting
typedef std::vector<BasePair> PairingVec;
Expand Down Expand Up @@ -88,6 +169,7 @@ class Interaction {
&& lhs.j2 == rhs.j2 ;
}
};

};


Expand Down Expand Up @@ -311,7 +393,15 @@ class Interaction {
* @param bp the Interaction base pair object to add
* @return the altered stream out
*/
friend std::ostream& operator<<(std::ostream& out, const Interaction::BasePair& bp);
friend std::ostream& operator<<(std::ostream& out, const BasePair& bp);

/**
* Prints the interaction boundary to stream
* @param out the ostream to write to
* @param b the Boundary object to add
* @return the altered stream out
*/
friend std::ostream& operator<<(std::ostream& out, const Boundary& b);

/**
* Prints the interacting base pairs to stream
Expand Down
2 changes: 2 additions & 0 deletions src/IntaRNA/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ libIntaRNA_a_HEADERS = \
PredictionTrackerSpotProb.h \
PredictionTrackerSpotProbAll.h \
PredictionTrackerProfileSpotProb.h \
PredictionTrackerBasePairProb.h \
Predictor.h \
PredictorMfe.h \
PredictorMfeSeedOnly.h \
Expand Down Expand Up @@ -120,6 +121,7 @@ libIntaRNA_a_SOURCES = \
PredictionTrackerSpotProb.cpp \
PredictionTrackerSpotProbAll.cpp \
PredictionTrackerProfileSpotProb.cpp \
PredictionTrackerBasePairProb.cpp \
PredictorMfe.cpp \
PredictorMfeSeedOnly.cpp \
PredictorMfe2d.cpp \
Expand Down
2 changes: 1 addition & 1 deletion src/IntaRNA/NussinovHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ NussinovHandler::getBasePairs(
getBasePairs(k + 1, to - 1, traceback, pairs);
}

pairs.push_back(std::pair<size_t, size_t>(k, to));
pairs.push_back(Interaction::BasePair(k, to));
}
}

Expand Down
22 changes: 20 additions & 2 deletions src/IntaRNA/PredictionTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@


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

namespace IntaRNA {

/**
* Generic interface to track prediction progress of Predictor instances.
*
*/
class PredictorMfeEns;
class PredictionTracker
{

Expand Down Expand Up @@ -43,9 +45,16 @@ class PredictionTracker
, const E_type energy
) = 0;

};

/**
* Updates the probability information.
*
* @param predictor the predictor providing the probability information
*/
virtual
void
updateZ( PredictorMfeEns *predictor, SeedHandler* seedHandler );

};

///////////////////////////////////////////////////////////////////////////

Expand All @@ -63,6 +72,15 @@ PredictionTracker::~PredictionTracker()

///////////////////////////////////////////////////////////////////////////

inline
void
PredictionTracker::updateZ( PredictorMfeEns *predictor, SeedHandler* seedHandler )
{
// override in PredictionTrackers
}

///////////////////////////////////////////////////////////////////////////


} // namespace

Expand Down
Loading