structureCheck.py not working for RNA
Closed this issue · 2 comments
I'm trying to evaluate secondary structor of RNA sequences with rna1995
(as defined in the NUPACK user guide http://www.nupack.org/downloads/serve_public_file/nupack_user_guide_3.1.pdf?type=pdf).
python structureCheck.py -f my.bed -F 13 -s 780 -T 50 -R -m rna1995
However, I'm getting the error
Traceback (most recent call last):
File "/mnt/home/stephen.williams/Apps/OligoMiner/structureCheck.py", line 552, in <module>
main()
File "/mnt/home/stephen.williams/Apps/OligoMiner/structureCheck.py", line 544, in main
startTime,
File "/mnt/home/stephen.williams/Apps/OligoMiner/structureCheck.py", line 384, in runStructureChecker
sc.run()
File "/mnt/home/stephen.williams/Apps/OligoMiner/structureCheck.py", line 154, in run
p = self.prob_check(probeSeq, struct_in)
File "/mnt/home/stephen.williams/Apps/OligoMiner/structureCheck.py", line 124, in prob_check
prob_val = float(p.stdout.readlines()[14])
ValueError: could not convert string to float: % Magnesium concentration: 0.0000 M
I assume structureCheck.py
is trying to convert -m rna1995
to a float.
Thanks for your advice on how to move forward.
Thanks for bringing this to our attention. It looks like the cause of this issue was that NUPACK adds this warning message to its output when run in RNA mode:
% ************************************************************************ %
% WARNING: No salt corrections availabe for RNA. Using 1 M Na and 0 M Mg. %
% ************************************************************************ %
and so the resulting prob
value was not on the line of stdout where the python code was expecting to find it.
I've updated the stdout parsing logic so that it finds the prob
value and also alerts the user to this caveat about salt corrections being ignored in RNA mode.
Let me know if you run into any other issues!
Thank you @conorcamplisson!