diff options
author | Christoph Helma <helma@in-silico.ch> | 2013-07-10 14:28:24 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2013-07-10 14:28:24 +0200 |
commit | 9d1c4b70e890f1073b325fcfc86449bd8f8512ef (patch) | |
tree | 3b28f4d3f07fe4a389aa621e05ad7746a3a407d5 | |
parent | 0a47ab1a55a5e9e7a5ba0e332ccb1c73db47ca80 (diff) |
subjectids partially removed
-rw-r--r-- | compound.rb | 6 | ||||
-rw-r--r-- | 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 @@ -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} ." |