From 9d1c4b70e890f1073b325fcfc86449bd8f8512ef Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 10 Jul 2013 14:28:24 +0200 Subject: subjectids partially removed --- compound.rb | 6 +++--- helper.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compound.rb b/compound.rb index 3373737..7ed4589 100644 --- a/compound.rb +++ b/compound.rb @@ -11,7 +11,7 @@ module OpenTox # compound = OpenTox::Compound.from_smiles("c1ccccc1") # @param [String] smiles Smiles string # @return [OpenTox::Compound] Compound - def self.from_smiles smiles, subjectid=nil + def self.from_smiles smiles inchi = obconversion(smiles,'smi','inchi') compound = Compound.new(File.join service_uri, inchi) compound.inchi = inchi @@ -22,7 +22,7 @@ module OpenTox # Create a compound from inchi string # @param [String] smiles InChI string # @return [OpenTox::Compound] Compound - def self.from_inchi inchi, subjectid=nil + def self.from_inchi inchi compound = Compound.new(File.join service_uri, inchi) compound.inchi = inchi compound @@ -31,7 +31,7 @@ module OpenTox # Create a compound from sdf string # @param [String] smiles SDF string # @return [OpenTox::Compound] Compound - def self.from_sdf sdf, subjectid=nil + def self.from_sdf sdf inchi = obconversion(sdf,'sdf','inchi') compound = Compound.new(File.join service_uri, inchi) compound.inchi = inchi diff --git a/helper.rb b/helper.rb index 9efb0a6..54b4540 100644 --- a/helper.rb +++ b/helper.rb @@ -94,7 +94,7 @@ module OpenTox metadata[RDF.type] = [ RDF::OT.NominalFeature, RDF::OT.StringFeature, RDF::OT.Feature ] # only nominal type for mixed cases metadata[RDF::OT.acceptValue] = values end - feature = OpenTox::Feature.find_or_create metadata, @subjectid # AM: find or generate + feature = OpenTox::Feature.find_or_create metadata, @subjectid features << feature unless feature.nil? ntriples << "<#{feature.uri}> <#{RDF.type}> <#{RDF::OT.Feature}>." ntriples << "<#{feature.uri}> <#{RDF::OLO.index}> #{i} ." -- cgit v1.2.3