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

Version Path
bio-2.0.0 sample/na2aa.rb
bio-1.6.0.pre.20181210 sample/na2aa.rb
bio-1.5.2 sample/na2aa.rb
bio-1.5.1 sample/na2aa.rb
bio-1.5.0 sample/na2aa.rb
bioruby-bio-1.2.9.9001 sample/na2aa.rb
bioruby-bio-1.2.9.9501 sample/na2aa.rb
bioruby-bio-1.3.0.5000 sample/na2aa.rb
bioruby-bio-1.3.0.9901 sample/na2aa.rb
bioruby-bio-1.3.0 sample/na2aa.rb
bioruby-bio-1.3.1.5000 sample/na2aa.rb
jandot-bio-1.2.1 sample/na2aa.rb
ngoto-bio-1.2.9.9001 sample/na2aa.rb
ngoto-bio-1.2.9.9501 sample/na2aa.rb
ngoto-bio-1.3.0.5000 sample/na2aa.rb
ngoto-bio-1.3.0 sample/na2aa.rb
ngoto-bio-1.3.1.5000 sample/na2aa.rb
bio-1.4.3.0001 sample/na2aa.rb
bio-1.4.3 sample/na2aa.rb
bio-1.4.2 sample/na2aa.rb