lib/scaffolder/test/helpers.rb in scaffolder-test-helpers-0.3.0 vs lib/scaffolder/test/helpers.rb in scaffolder-test-helpers-0.4.0

- old
+ new

@@ -2,10 +2,11 @@ require 'bio' require 'scaffolder' require 'scaffolder/test/sequence' require 'scaffolder/test/unresolved' +require 'scaffolder/test/annotation' module Scaffolder::Test module Helpers def generate_scaffold_files(entries) @@ -26,8 +27,14 @@ end end file end + def generate_gff3_file(records,file = Tempfile.new("gff")) + gff = Bio::GFF::GFF3.new + gff.records = records.map{|r| r.to_gff3_record} + File.open(file.path,'w'){|out| out.print(gff) } + file + end end end