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

pmfe-scorer output is not correct #6

Open
ceheitsch opened this issue Oct 2, 2020 · 3 comments
Open

pmfe-scorer output is not correct #6

ceheitsch opened this issue Oct 2, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ceheitsch
Copy link

ceheitsch commented Oct 2, 2020

./RunPMFECommand.sh pmfe-scorer --sequence /projects/rna/rnatope/Data/Onivara/fasta/o.nivara_tRNA.fasta --structure Examples/o.nivara_t99_mfe.txt -a 3.4 -b 0 -c 0.4 -d 1

outputs

Multiloops: 0
Unpaired bases: 0
Branches: 0
w: 0 ≈ 0
Parametrized energy: 0 ≈ 0

when the signature for the Turner99 MFE structure should be 1 6 4 -321/10 (c.f. the file Examples/o.nivara_tRNA.rnasubopt-2280-120--594-370)

@maxieds maxieds self-assigned this Oct 6, 2020
@maxieds
Copy link

maxieds commented Oct 6, 2020

@ceheitsch
After doing some looking through code, there is an easy solution to this problem. Consider the output of the help options:

$ ./RunPMFECommand.sh pmfe-scorer
Options:
  --sequence arg                 Sequence file
  --structure arg                Secondary structure in dots-and-braces 
                                 notation
  -v [ --verbose ]               Write verbose debugging output
  -a [ --multiloop-penalty ] arg Multiloop penalty parameter
  -b [ --unpaired-penalty ] arg  Unpaired base penalty parameter
  -c [ --branch-penalty ] arg    Branching helix penalty parameter
  -d [ --dummy-scaling ] arg     Dummy scaling parameter
  -m [ --dangle-model ] arg (=1) Dangle model
  -t [ --num-threads ] arg (=0)  Number of threads
  -h [ --help ]                  Display this help message

So the pmfe-scorer utility is actually expecting you to pass a string as the parameter of the --structure argument, in place of a file that contains that string data, which is I believe what you were trying with the command in your first post on this issue.

Predicting some confusion, let me reiterate part of the discussion from issue #5:

  • The input as the argument to -sequence is a FASTA file, e.g., path to a file that exists on disk. As such, be careful to pass either an absolute path, or a path that is correct relative to the current working directory (cwd) within the wrapper script.
  • The input as the argument to --structure is a string in DotBracket-ish notation. When you run the next command solution, keep in mind that the input file we echo via cat <file> is relative to the cwd where ever you are running the script, e.g., from /projects/rna/PMFEUpdated-2020.09.10-*.

Therefore, the following command variant seems to work:

$ ./RunPMFECommand.sh pmfe-scorer --sequence /projects/rna/rnatope/Data/Onivara/fasta/o.nivara_tRNA.fasta --structure "`cat Examples/o.nivara_t99_mfe.txt`" -a 3.4 -b 0 -c 0.4 -d 1 -v

[2020-10-06 01:11:50.476627] [0x00007f1c3fe31800] [debug]   Starting structure scoring.
[2020-10-06 01:11:50.476737] [0x00007f1c3fe31800] [debug]   External loop energy -1.7
[2020-10-06 01:11:50.476757] [0x00007f1c3fe31800] [debug]   Stack (0, 71) with energy -3.3
[2020-10-06 01:11:50.476763] [0x00007f1c3fe31800] [debug]   Stack (1, 70) with energy -1.5
[2020-10-06 01:11:50.476770] [0x00007f1c3fe31800] [debug]   Stack (2, 69) with energy -2.1
[2020-10-06 01:11:50.476775] [0x00007f1c3fe31800] [debug]   Stack (3, 68) with energy -2.4
[2020-10-06 01:11:50.476780] [0x00007f1c3fe31800] [debug]   Stack (4, 67) with energy -1.1
[2020-10-06 01:11:50.476785] [0x00007f1c3fe31800] [debug]   Stack (5, 66) with energy -1.3
[2020-10-06 01:11:50.476809] [0x00007f1c3fe31800] [debug]   Multiloop (6, 65) with energy 4.8
[2020-10-06 01:11:50.476815] [0x00007f1c3fe31800] [debug]   Stack (9, 24) with energy -3.4
[2020-10-06 01:11:50.476820] [0x00007f1c3fe31800] [debug]   Stack (10, 23) with energy -2.1
[2020-10-06 01:11:50.476828] [0x00007f1c3fe31800] [debug]   Stack (11, 22) with energy -2.4
[2020-10-06 01:11:50.476840] [0x00007f1c3fe31800] [debug]   Hairpin (12, 21) with energy 4.1
[2020-10-06 01:11:50.476848] [0x00007f1c3fe31800] [debug]   Stack (25, 43) with energy -2.4
[2020-10-06 01:11:50.476853] [0x00007f1c3fe31800] [debug]   Stack (26, 42) with energy -3.3
[2020-10-06 01:11:50.476858] [0x00007f1c3fe31800] [debug]   Stack (27, 41) with energy -2.4
[2020-10-06 01:11:50.476863] [0x00007f1c3fe31800] [debug]   Stack (28, 40) with energy -3.4
[2020-10-06 01:11:50.476868] [0x00007f1c3fe31800] [debug]   Stack (29, 39) with energy -2.1
[2020-10-06 01:11:50.476874] [0x00007f1c3fe31800] [debug]   Hairpin (30, 38) with energy 5.7
[2020-10-06 01:11:50.476882] [0x00007f1c3fe31800] [debug]   Stack (48, 64) with energy -2.1
[2020-10-06 01:11:50.476887] [0x00007f1c3fe31800] [debug]   Stack (49, 63) with energy -3.4
[2020-10-06 01:11:50.476892] [0x00007f1c3fe31800] [debug]   Stack (50, 62) with energy -2.4
[2020-10-06 01:11:50.476897] [0x00007f1c3fe31800] [debug]   Stack (51, 61) with energy -3.3
[2020-10-06 01:11:50.476902] [0x00007f1c3fe31800] [debug]   Hairpin (52, 60) with energy 4.4
[2020-10-06 01:11:50.545483] [0x00007f1c3fe31800] [debug]   Starting structure scoring.
[2020-10-06 01:11:50.545520] [0x00007f1c3fe31800] [debug]   External loop energy -1.7
[2020-10-06 01:11:50.545530] [0x00007f1c3fe31800] [debug]   Stack (0, 71) with energy -3.3
[2020-10-06 01:11:50.545537] [0x00007f1c3fe31800] [debug]   Stack (1, 70) with energy -1.5
[2020-10-06 01:11:50.545542] [0x00007f1c3fe31800] [debug]   Stack (2, 69) with energy -2.1
[2020-10-06 01:11:50.545548] [0x00007f1c3fe31800] [debug]   Stack (3, 68) with energy -2.4
[2020-10-06 01:11:50.545553] [0x00007f1c3fe31800] [debug]   Stack (4, 67) with energy -1.1
[2020-10-06 01:11:50.545559] [0x00007f1c3fe31800] [debug]   Stack (5, 66) with energy -1.3
[2020-10-06 01:11:50.545578] [0x00007f1c3fe31800] [debug]   Multiloop (6, 65) with energy 4.8
[2020-10-06 01:11:50.545589] [0x00007f1c3fe31800] [debug]   Stack (9, 24) with energy -3.4
[2020-10-06 01:11:50.545595] [0x00007f1c3fe31800] [debug]   Stack (10, 23) with energy -2.1
[2020-10-06 01:11:50.545601] [0x00007f1c3fe31800] [debug]   Stack (11, 22) with energy -2.4
[2020-10-06 01:11:50.545608] [0x00007f1c3fe31800] [debug]   Hairpin (12, 21) with energy 4.1
[2020-10-06 01:11:50.545616] [0x00007f1c3fe31800] [debug]   Stack (25, 43) with energy -2.4
[2020-10-06 01:11:50.545622] [0x00007f1c3fe31800] [debug]   Stack (26, 42) with energy -3.3
[2020-10-06 01:11:50.545627] [0x00007f1c3fe31800] [debug]   Stack (27, 41) with energy -2.4
[2020-10-06 01:11:50.545632] [0x00007f1c3fe31800] [debug]   Stack (28, 40) with energy -3.4
[2020-10-06 01:11:50.545637] [0x00007f1c3fe31800] [debug]   Stack (29, 39) with energy -2.1
[2020-10-06 01:11:50.545643] [0x00007f1c3fe31800] [debug]   Hairpin (30, 38) with energy 5.7
[2020-10-06 01:11:50.545652] [0x00007f1c3fe31800] [debug]   Stack (48, 64) with energy -2.1
[2020-10-06 01:11:50.545657] [0x00007f1c3fe31800] [debug]   Stack (49, 63) with energy -3.4
[2020-10-06 01:11:50.545662] [0x00007f1c3fe31800] [debug]   Stack (50, 62) with energy -2.4
[2020-10-06 01:11:50.545667] [0x00007f1c3fe31800] [debug]   Stack (51, 61) with energy -3.3
[2020-10-06 01:11:50.545672] [0x00007f1c3fe31800] [debug]   Hairpin (52, 60) with energy 4.4
Multiloops: 1
Unpaired bases: 6
Branches: 4
w: -321/10 � -32.1
Parametrized energy: -271/10 � -27.1

Note that the output of running echo "`cat Examples/o.nivara_t99_mfe.txt`" is as follows:

(((((((><((((........))))((((((.......))))))>..<(((((.......))))))))))))>

Please check the output above for consistency to see if we still have any lingering errors that need to be fixed.

@ceheitsch
Copy link
Author

Confirming that when given the expected input, the pmfe-scorer code does run. However, the output is not correct. (Noting that these issues may have always been a problem.). Am going to break out the problems into separate issues for tracking purposes.

@ceheitsch
Copy link
Author

ceheitsch commented Oct 21, 2020

The output that I get does not duplicate the output above, despite cutting and pasting the command given.

[2020-10-21 11:44:39.081533] [0x00007efd4491e800] [debug]   External loop energy -1.7
[2020-10-21 11:44:39.081552] [0x00007efd4491e800] [debug]   Stack (0, 71) with energy -3.3
[2020-10-21 11:44:39.081559] [0x00007efd4491e800] [debug]   Stack (1, 70) with energy -1.5
[2020-10-21 11:44:39.081565] [0x00007efd4491e800] [debug]   Stack (2, 69) with energy -2.1
[2020-10-21 11:44:39.081571] [0x00007efd4491e800] [debug]   Stack (3, 68) with energy -2.4
[2020-10-21 11:44:39.081576] [0x00007efd4491e800] [debug]   Stack (4, 67) with energy -1.1
[2020-10-21 11:44:39.081581] [0x00007efd4491e800] [debug]   Stack (5, 66) with energy -1.3
[2020-10-21 11:44:39.081608] [0x00007efd4491e800] [debug]   Multiloop (6, 65) with energy 22.8
[2020-10-21 11:44:39.081615] [0x00007efd4491e800] [debug]   Stack (9, 24) with energy -3.4
[2020-10-21 11:44:39.081620] [0x00007efd4491e800] [debug]   Stack (10, 23) with energy -2.1
[2020-10-21 11:44:39.081627] [0x00007efd4491e800] [debug]   Stack (11, 22) with energy -2.4
[2020-10-21 11:44:39.081638] [0x00007efd4491e800] [debug]   Hairpin (12, 21) with energy 4.1
[2020-10-21 11:44:39.081646] [0x00007efd4491e800] [debug]   Stack (25, 43) with energy -2.4
[2020-10-21 11:44:39.081651] [0x00007efd4491e800] [debug]   Stack (26, 42) with energy -3.3
[2020-10-21 11:44:39.081656] [0x00007efd4491e800] [debug]   Stack (27, 41) with energy -2.4
[2020-10-21 11:44:39.081661] [0x00007efd4491e800] [debug]   Stack (28, 40) with energy -3.4
[2020-10-21 11:44:39.081666] [0x00007efd4491e800] [debug]   Stack (29, 39) with energy -2.1
[2020-10-21 11:44:39.081673] [0x00007efd4491e800] [debug]   Hairpin (30, 38) with energy 5.7
[2020-10-21 11:44:39.081681] [0x00007efd4491e800] [debug]   Stack (48, 64) with energy -2.1
[2020-10-21 11:44:39.081686] [0x00007efd4491e800] [debug]   Stack (49, 63) with energy -3.4
[2020-10-21 11:44:39.081691] [0x00007efd4491e800] [debug]   Stack (50, 62) with energy -2.4
[2020-10-21 11:44:39.081696] [0x00007efd4491e800] [debug]   Stack (51, 61) with energy -3.3
[2020-10-21 11:44:39.081702] [0x00007efd4491e800] [debug]   Hairpin (52, 60) with energy 4.4
[2020-10-21 11:44:39.154474] [0x00007efd4491e800] [debug]   Starting structure scoring.
[2020-10-21 11:44:39.154510] [0x00007efd4491e800] [debug]   External loop energy -1.7
[2020-10-21 11:44:39.154519] [0x00007efd4491e800] [debug]   Stack (0, 71) with energy -3.3
[2020-10-21 11:44:39.154525] [0x00007efd4491e800] [debug]   Stack (1, 70) with energy -1.5
[2020-10-21 11:44:39.154531] [0x00007efd4491e800] [debug]   Stack (2, 69) with energy -2.1
[2020-10-21 11:44:39.154536] [0x00007efd4491e800] [debug]   Stack (3, 68) with energy -2.4
[2020-10-21 11:44:39.154541] [0x00007efd4491e800] [debug]   Stack (4, 67) with energy -1.1
[2020-10-21 11:44:39.154546] [0x00007efd4491e800] [debug]   Stack (5, 66) with energy -1.3
[2020-10-21 11:44:39.154564] [0x00007efd4491e800] [debug]   Multiloop (6, 65) with energy 4.8
[2020-10-21 11:44:39.154570] [0x00007efd4491e800] [debug]   Stack (9, 24) with energy -3.4
[2020-10-21 11:44:39.154579] [0x00007efd4491e800] [debug]   Stack (10, 23) with energy -2.1
[2020-10-21 11:44:39.154586] [0x00007efd4491e800] [debug]   Stack (11, 22) with energy -2.4
[2020-10-21 11:44:39.154593] [0x00007efd4491e800] [debug]   Hairpin (12, 21) with energy 4.1
[2020-10-21 11:44:39.154600] [0x00007efd4491e800] [debug]   Stack (25, 43) with energy -2.4
[2020-10-21 11:44:39.154605] [0x00007efd4491e800] [debug]   Stack (26, 42) with energy -3.3
[2020-10-21 11:44:39.154610] [0x00007efd4491e800] [debug]   Stack (27, 41) with energy -2.4
[2020-10-21 11:44:39.154615] [0x00007efd4491e800] [debug]   Stack (28, 40) with energy -3.4
[2020-10-21 11:44:39.154620] [0x00007efd4491e800] [debug]   Stack (29, 39) with energy -2.1
[2020-10-21 11:44:39.154626] [0x00007efd4491e800] [debug]   Hairpin (30, 38) with energy 5.7
[2020-10-21 11:44:39.154635] [0x00007efd4491e800] [debug]   Stack (48, 64) with energy -2.1
[2020-10-21 11:44:39.154639] [0x00007efd4491e800] [debug]   Stack (49, 63) with energy -3.4
[2020-10-21 11:44:39.154644] [0x00007efd4491e800] [debug]   Stack (50, 62) with energy -2.4
[2020-10-21 11:44:39.154649] [0x00007efd4491e800] [debug]   Stack (51, 61) with energy -3.3
[2020-10-21 11:44:39.154655] [0x00007efd4491e800] [debug]   Hairpin (52, 60) with energy 4.4
Multiloops: 1
Unpaired bases: 6
Branches: 4
w: -321/10 ≈ -32.1
Parametrized energy: -91/10 ≈ -9.1

In particular note that the first instance of Multiloop (6, 65) has with energy 22.8 whereas the second has with energy 4.8. Above they are the same.

Additionally, this version has Parametrized energy: -91/10 ≈ -9.1 whereas above it is -271/10 â�� -27.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants