Class: Bio::GenPept

Inherits:
NCBIDB show all
Includes:
NCBIDB::Common
Defined in:
lib/bio/db/genbank/genpept.rb

Defined Under Namespace

Classes: Locus

Constant Summary

Constants included from NCBIDB::Common

NCBIDB::Common::DELIMITER, NCBIDB::Common::TAGSIZE

Instance Method Summary collapse

Methods included from NCBIDB::Common

#acc_version, #accession, #accessions, #comment, #common_name, #definition, #features, #gi, #initialize, #keywords, #nid, #organism, #origin, #references, #segment, #source, #taxonomy, #version, #versions

Methods inherited from NCBIDB

#initialize

Methods inherited from DB

#exists?, #fetch, #get, open, #tags

Instance Method Details

#circularObject



35
# File 'lib/bio/db/genbank/genpept.rb', line 35

def circular;		locus.circular;		end

#dateObject



37
# File 'lib/bio/db/genbank/genpept.rb', line 37

def date;		locus.date;		end

#dbsourceObject

DBSOURCE



55
56
57
# File 'lib/bio/db/genbank/genpept.rb', line 55

def dbsource
  get('DBSOURCE')
end

#divisionObject



36
# File 'lib/bio/db/genbank/genpept.rb', line 36

def division;		locus.division;		end

#entry_idObject



33
# File 'lib/bio/db/genbank/genpept.rb', line 33

def entry_id;		locus.entry_id;		end

#lengthObject Also known as: aalen



34
# File 'lib/bio/db/genbank/genpept.rb', line 34

def length;		locus.length;		end

#locusObject



30
31
32
# File 'lib/bio/db/genbank/genpept.rb', line 30

def locus
  @data['LOCUS'] ||= Locus.new(get('LOCUS'))
end

#seqObject Also known as: aaseq

ORIGIN



41
42
43
44
45
46
# File 'lib/bio/db/genbank/genpept.rb', line 41

def seq
  unless @data['SEQUENCE']
    origin
  end
  Bio::Sequence::AA.new(@data['SEQUENCE'])
end

#seq_lenObject



50
51
52
# File 'lib/bio/db/genbank/genpept.rb', line 50

def seq_len
  seq.length
end