#!/usr/bin/ruby read_line = [] read_line << gets while !read_line.empty? desc_line = read_line.shift break if !desc_line desc_line = (desc_line.chomp!)[1..desc_line.length] seq = "" while seq_line = gets break if seq_line[0,1] == ">" seq = seq + seq_line.chomp end read_line << seq_line # combine the data line data = desc_line # parse the data line with the following format: # YAL001C TFC3 SGDID:S000000001, Chr I from 151168-151099,151008-147596, reverse complement, intron sequence removed, Verified ORF, "Largest of six subunits of the RNA polymerase III transcription initiation factor complex (TFIIIC); part of the TauB domain of TFIIIC that binds DNA at the BoxB promoter sites of tRNA and similar genes; cooperates with Tfc6p in DNA binding" puts data.gsub(/, /, "\t") end