lib/genomer/plugin.rb in genomer-0.0.5 vs lib/genomer/plugin.rb in genomer-0.0.6
- old
+ new
@@ -80,20 +80,18 @@
# The genome scaffold constructed from the files in the "ROOT/assembly/" directory.
#
# @return [Array] An array of Scaffolder::Region instances
def scaffold
- YAML::ENGINE.yamler = 'syck'
+ YAML::ENGINE.yamler = 'syck' if defined?(YAML::ENGINE)
Scaffolder.new(YAML.load(File.read(scaffold_file)),sequence_file)
end
def annotations(options = {})
attns = Scaffolder::AnnotationLocator.new(
scaffold_file,sequence_file,annotation_file)
- attns.sort_by! do |attn|
- [attn.start,attn.end]
- end
+ attns = attns.sort_by{|attn| [attn.start,attn.end] }
if value = options[:reset]
start = value.to_s =~ /^[-+]?[0-9]+$/ ? value.to_i : 1
genes = attns.select{|i| i.feature == 'gene'}