Sha256: 5d4636fcfba5ba91d2c7f50e48b3d3c7ca4eb811238ac6578909c933a2572ae3
Contents?: true
Size: 990 Bytes
Versions: 24
Compression:
Stored size: 990 Bytes
Contents
#!/usr/bin/env ruby # # translate.rb - translate any NA input into AA FASTA format # # Copyright (C) 2008 KATAYAMA Toshiaki <k@bioruby.org> & Pjotr Prins # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # $Id: na2aa.rb,v 1.1 2008/02/06 16:25:53 pjotr Exp $ # require 'bio' require 'pp' include Bio ARGV.each do | fn | Bio::FlatFile.auto(fn).each do | item | seq = Sequence::NA.new(item.data) aa = seq.translate aa.gsub!(/X/,'-') rec = Bio::FastaFormat.new('> '+item.definition+"\n"+aa) print rec end end
Version data entries
24 entries across 24 versions & 4 rubygems