[BioRuby] newick gsub(' ','_')

Naohisa GOTO ngoto at gen-info.osaka-u.ac.jp
Tue Jul 21 03:25:10 UTC 2009


On Tue, 21 Jul 2009 11:19:21 +1000
Ben Woodcroft <donttrustben at gmail.com> wrote:

> OK, thanks - that makes sense. The particular program I'm using, figtree,
> understands underscores as spaces, and so I never really had any problem in
> the first place.
> But to be academic I don't actually agree that the specification says blanks
> should be converted underscores in otherwise unquoted strings - I think
> quoting them is equally valid (and possibly supported by more programs), but
> maybe that's just me. Happy to accept the community judgement on that one.
> Would it make sense to allow quoting to be forced by the user? I don't see
> anything in the specification that is against that, so long as everything
> inside is properly escaped.

Why unquoted labels are preferred is that naive programs
that cannot understand quotes might have problems with
quotes and speces. Providing unquoted labels as many as
possible may reduce such problems, though it isn't perfect.

Programs that can understand quoted labels should also be
aware of the underscore rule in unquoted labels, and
theoretically no problem with unquoted labels.  However,
if you know any strange programs that can parse quoted labels
but can not understand underscores in unquoted labels,
please tell us.

Naohisa Goto
ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org

More information about the BioRuby mailing list