[BioRuby-cvs] bioruby/lib/bio/db nexus.rb,NONE,1.1
Chris Zmasek
czmasek at dev.open-bio.org
Tue Dec 19 05:09:49 UTC 2006
Update of /home/repository/bioruby/bioruby/lib/bio/db
In directory dev.open-bio.org:/tmp/cvs-serv28474
Added Files:
nexus.rb
Log Message:
Initial commit of nexus.rb - a parser for nexus formatted data
(developed at first phyloinformatics hackathon at nescent in durham, nc, usa)
--- NEW FILE: nexus.rb ---
#
# = bio/db/nexus.rb - Nexus Standard phylogenetic tree parser / formatter
#
# Copyright:: Copyright (C) 2006 Christian M Zmasek <cmzmasek at yahoo.com>
#
# License:: Ruby's
#
# $Id: nexus.rb,v 1.1 2006/12/19 05:09:46 czmasek Exp $
#
# == Description
#
# This file contains classes that implement a parser for NEXUS formatted
# data as well as objects to store, access, and write the parsed data.
#
# The following five blocks:
# taxa, characters, distances, trees, data
# are recognizable and parsable.
#
# The parser can deal with (nested) comments (indicated by square brackets),
[...1817 lines suppressed...]
def Util::larger_than_zero( i )
return ( i != nil && i.to_i > 0 )
end
# Returns true if String str is not nil and longer than 0.
# ---
# *Arguments*:
# * (required) _str_: String
# *Returns*:: true or false
def Util::longer_than_zero( str )
return ( str != nil && str.length > 0 )
end
end # class Util
end # class Nexus
end #module Bio
More information about the bioruby-cvs
mailing list