brettc / partitionfinder

PartitionFinder discovers optimal partitioning schemes for DNA sequences.
Other
60 stars 42 forks source link

semi colons #1

Closed roblanf closed 13 years ago

roblanf commented 13 years ago

We have a couple of issues that could be solved by making people use semi-colons at the end of lines in the .cfg file.

  1. This example of partitions:

part1 = 1-100\3 12S = 101-1000

at the moment, our parser thinks the "12" is a site in the 'part1' partition. Since 12S, 16S, 28S etc are common genes for phylogenetics, we'll see this problem a lot.

  1. This example of a user screw-up where you accidentally add something rubbish after defining an option

models = all k

If we made people use semi-colons, we could get around both of these problems, and have a much better crack at giving people useful parser error messages, which I suspect will be where most of our problems come from if and when people start using the program.

What do you think? Happy to implement this.

R

brettc commented 13 years ago

I think this is a good plan. But notice that missing semicolons will now cause syntax errors. Give it a go.

roblanf commented 13 years ago

better syntax errors from this I reckon. I can make it really clear in the manual and in the FAQ that you need semi-colons. We can even catch any parsing errors which we don't understand and send a nice message suggesting people double check their semi-colons.

brettc commented 13 years ago

Sounds good. Let me know how you go. I want to fix the error handling in the parser at some stage before release.

But if I do anything now it will be sorting out the saving of the config.

Brett

On 7 July 2011 11:08, RobertLanfear reply@reply.github.com wrote:

better syntax errors from this I reckon. I can make it really clear in the manual and in the FAQ that you need semi-colons. We can even catch any parsing errors which we don't understand and send a nice message suggesting people double check their semi-colons.

Reply to this email directly or view it on GitHub: https://github.com/brettc/partitionfinder/issues/1#issuecomment-1521370

roblanf commented 13 years ago

Semi-colons are now enforced in the input file. Everything is better.