Sha256: 8ba8df87aa061639cf73b3b847131d670e8e488be93d6381ca95d9f59a267464

Contents?: true

Size: 490 Bytes

Versions: 8

Compression:

Stored size: 490 Bytes

Contents

#!/usr/bin/ruby

require 'rubygems'
require 'biointerchange'

include BioInterchange::Phylogenetics

# Create a reader that reads phylogenetic trees in Newick format:
reader = NewickReader.new()

# Create a model from a single example tree:
# (Note: the `deserialize` method also takes streams as parameter -- not just strings.)
model = reader.deserialize('((B:0.2,(C:0.3,D:0.4)E:0.5)F:0.1)A;')

# Serialize the model as RDF N-Triples to STDOUT:
CDAORDFWriter.new(STDOUT).serialize(model)

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
biointerchange-1.0.8 examples/rdfization.rb
biointerchange-1.0.7 examples/rdfization.rb
biointerchange-1.0.6 examples/rdfization.rb
biointerchange-1.0.5 examples/rdfization.rb
biointerchange-1.0.4 examples/rdfization.rb
biointerchange-1.0.2 examples/rdfization.rb
biointerchange-1.0.1 examples/rdfization.rb
biointerchange-1.0.0 examples/rdfization.rb