Skip to content

Commit

Permalink
better formatting of transfac files
Browse files Browse the repository at this point in the history
  • Loading branch information
VorontsovIE committed Nov 30, 2016
1 parent 1289090 commit 7870ddc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/formatters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def in_transfac_format(motif_pcms)
result << "BF #{uniprot}; Species: #{species}\n"
end
result << "XX\n"
result << 'P0 ' + ['A', 'C', 'G', 'T'].join("\t") << "\n"
result << "P0 A C G T\n"
rounded_pcm.matrix.each_with_index do |pos, pos_index|
result << ('%02d ' % (pos_index + 1)) + [*pos, consensus[pos_index]].join("\t") << "\n"
result << "%02d %6.20g %6.20g %6.20g %6.20g %s\n" % [pos_index + 1, *pos, consensus[pos_index]]
end
result << "XX\n"
result << "//\n"
Expand Down

0 comments on commit 7870ddc

Please sign in to comment.