class Genome::Genome

Attributes

features[RW]
scaffolds[R]

Public Class Methods

new(handle) click to toggle source

Create a new instance of Genome, requires a stream to fasta-formatted text. stores entire genome and features.

# File lib/genome/genome/genome.rb, line 12
def initialize handle
  @path = handle.path
  @scaffolds = Dna.new(handle, format: :fasta).to_a
  @features = []
end

Public Instance Methods

fasta() { |path| ... } click to toggle source

save self to a temporary file in the fasta format returns path to temporary file file is deleted after block

# File lib/genome/genome/genome.rb, line 21
def fasta &block
  yield @path
end
inspect() click to toggle source
# File lib/genome/genome/genome.rb, line 25
def inspect
  "#<#{self.class} #{@scaffolds.size} scaffolds, #{@features.size} features>"
end