Sha256: fe9e132df3b4083b0d3b527977e9933aae4685eedad3fe3e7c2edf83b205f635

Contents?: true

Size: 459 Bytes

Versions: 5

Compression:

Stored size: 459 Bytes

Contents

#!/usr/bin/env ruby
#
# rev_comp.rb - Reverse complement DNA sequences
#
# Copyright::   Copyright (C) 2019 BioRuby Project
# License::     The Ruby License
#

require 'bio'

ARGV.each do |fn|
  Bio::FlatFile.open(fn) do |ff|
    ff.each do |entry|
      next if /\A\s*\z/ =~ ff.entry_raw.to_s
      na = entry.naseq
      revcomp = na.reverse_complement
      print revcomp.to_fasta("complement(#{entry.entry_id}) " + entry.definition, 70)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bio-2.0.5 sample/rev_comp.rb
bio-2.0.4 sample/rev_comp.rb
bio-2.0.3 sample/rev_comp.rb
bio-2.0.2 sample/rev_comp.rb
bio-2.0.1 sample/rev_comp.rb