Class: Mspire::Lipid
- Inherits:
-
Object
- Object
- Mspire::Lipid
- Defined in:
- lib/mspire/lipid.rb,
lib/mspire/lipid/ion.rb,
lib/mspire/lipid/search.rb,
lib/mspire/lipid/search/bin.rb,
lib/mspire/lipid/search/hit.rb,
lib/mspire/lipid/ion/fragment.rb,
lib/mspire/lipid/modification.rb,
lib/mspire/lipid/search/query.rb,
lib/mspire/lipid/search/db_isobar_group.rb,
lib/mspire/lipid/search/probability_distribution.rb
Defined Under Namespace
Classes: Ion, Modification, Search
Constant Summary collapse
- CHAIN_PREFIXES =
goes from 1 to 99
{ 'meth' => 1, 'eth' => 2, 'prop' => 3, 'but' => 4, 'pent' => 5, 'hex' => 6, 'hept' => 7, 'oct' => 8, 'non' => 9, 'dec' => 10, 'undec' => 11, 'dodec' => 12, 'tridec' => 13, 'tetradec' => 14, 'pentadec' => 15, 'hexadec' => 16, 'heptadec' => 17, 'octadec' => 18, 'nonadec' => 19, 'eicos' => 20, 'heneicos' => 21, 'docos' => 22, 'tricos' => 23, 'tetracos' => 24, 'pentacos' => 25, 'hexacos' => 26, 'heptacos' => 27, 'octacos' => 28, 'nonacos' => 29 }
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ Lipid
constructor
A new instance of Lipid.
- #inspect ⇒ Object
Constructor Details
#initialize(*args) ⇒ Lipid
Returns a new instance of Lipid.
10 11 12 |
# File 'lib/mspire/lipid.rb', line 10 def initialize(*args) (@lm_id,@common_name,@systematic_name,@formula,@mass,@category,@main_class,@sub_class,@pubchem_sid, @inchi_key, @kegg_id, @chebi_id, @structure) = args end |
Class Method Details
.members ⇒ Object
4 5 6 |
# File 'lib/mspire/lipid.rb', line 4 def self.members [:lm_id,:common_name,:systematic_name,:formula,:mass,:category,:main_class,:sub_class,:pubchem_id,:inchi_key,:kegg_id,:chebi_id,:structure] end |
Instance Method Details
#inspect ⇒ Object
14 15 16 17 |
# File 'lib/mspire/lipid.rb', line 14 def inspect cut_common_name = (common_name.size <= 20) ? common_name : (common_name[0,20]+"...") "<#{lm_id}: #{formula}: #{mass} #{cut_common_name}>" end |