gtDMMB / RNAStructViz

Visualization, comparison, and analysis of RNA secondary structures via a cross-platform GUI
https://github.com/gtDMMB/RNAStructViz/wiki
GNU General Public License v3.0
17 stars 5 forks source link

dot file inputs #46

Closed ceheitsch closed 4 years ago

ceheitsch commented 5 years ago

Tried to upload some dot files that I created by hand.
If the file includes a pseudoknot (as hdv.dot does) it should detect this and reject the file with a clear error message since the brackets don't match up. Not sure what the problem is with hdv_nop.dot, which has the pseudoknot removed.
Note that RNAStructViz will accept and display psuedoknots (as it should!) when given in a ct file, as in sb_523_hdv.ct.

Note that .txt extension had to be added so that github would accept the files. hdv.dot.txt hdv_nop.dot.txt sb_523_hdv.ct.txt

maxieds commented 5 years ago

@ceheitsch

Much of the problem was the parsing of space characters. This was formerly an illegal character except in the comment line, but is now fixed and allowed provided the spaces are in the same positions. Beware that in two of the sample input files you posted above, there is a trailing space character on the dot pairing data line where there is not a corresponding one on the base data line. This IS a true syntax error in my view: we need to be able to check that the string length of the base and pairing data lines is equal. After removing this discrepancy, your files should now work.

However, I am still getting a correct parse on the hdv.dot file, which is to say that there are never any unmatched open / close pairs during parsing. I assume this is a subtlety that I'm missing. Can you please explain in much more detail what conditions I'm looking for to determine the presence of a pseudoknot in the DOT file?

ceheitsch commented 5 years ago

Looking at the file again, the parentheses can nest correctly, so there indeed is no way of detecting the intended pseudoknot. Is that always the case? (It may actually be true.) If not, can you construct an example where they don't nest correctly and confirm that RNAstructviz fails gracefully? Start with the bracketing, and then work backwards to fill in the sequence info.

maxieds commented 4 years ago

Closing since this seems resolved at this point. [Added spaces as legal characters in the DOT Bracket syntax for readability.]