This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to extract the pair probabilities from *_dp.ps file using mountain.pl?

I have a question about the mountain.pl script:How to extract the pair probabilities from *_dp.ps file using mountain.pl?

According to the descritpion of mountain.pl script: definition of pair probabilities for base i is the mean pair probabilities enclode the base i. But the mountain.pl count the sum instead. This is the reason why mountain.pl failed to process RNAplfold output *_dp.ps.

$ RNAplfold --version 
RNAplfold 2.4.14

$ cat 5S.seq
> 5S rRNA from methanospirillum hungatii
UCAAUAGCGGCCACAGCAGGUGUGUCACACCCGUUCCCAUUCCGAACACGGAAGUUAAGACACCUCACGUGGAUGACGGUACUGAGGUACGCGAGUCCUCGGGAAAUCAUCCUCGCUGCUAUUGUU

$ RNAplfold -W 70 -u 28 < 5S.seq # output files: 5S_dp.ps, 5S_lunp
$ ./ViennaRNA-2.4.14/src/Utils/mountain.pl 5S_dp.ps
Can't take log of -0.036633 at ./ViennaRNA-2.4.14/src/Utils/mountain.pl line 66, <> line 385.

Here are the line report error in mountain.pl:

# line-66 of mountain.pl
$sp[$i] += (1-$pp[$i])*log(abs(1-$pp[$i]));

The description of mountain.pl script:

# produce Pauline Hogeweg's mountain representation *_dp.ps files
# writes 3 sets of x y data separated by a "&"
# the first two sets are mountain representations from base pair probabilities
# and mfe structure, respectively.
# definition: mm[i],mp[i] = (mean) number of base pairs enclosing base i
# third set a measure of well-definedness: the entropy of the pair probs of
# base i, sp[i] = -Sum p_i * ln(p_i). Well-defined regions have low entropy.
rna secondary structure

0 answers

No answers yet.

Log in to answer this question.