Sha256: 83b4de2e9a13c79618e920598b2cc001707a84aebb761e190dd5ff588548a0b5

Contents?: true

Size: 705 Bytes

Versions: 16

Compression:

Stored size: 705 Bytes

Contents

#!/usr/bin/env ruby

require 'scbi_fasta'

if ARGV.count!=3
  puts "Usage: #{File.basename($0)} database min_size name_list"
  exit
end
min_size = ARGV[1].to_i

# read keywords
keywords=File.read(ARGV[2]).split("\n")

# convert all to upcase
keywords.map { |keyword| keyword.upcase!}

# puts "Search keywords"
# keywords.each { |keyword| puts keyword}

fqr=FastaQualFile.new(ARGV[0])

all=[]

fqr.each do |n,s,c|
  keywords.each do |keyword|
    if s.length<=min_size
      # all+=c.split(" ")
      if c.upcase.index(keyword)
         # puts "[#{s.length.to_s}] - #{n} - #{c}"
        puts ">#{n} #{c}\n#{s}"
        break
      end
    end
  end
end

# puts all.sort.uniq.reject{|e| e=~/\d/}

fqr.close

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
seqtrimnext-2.0.68 bin/filter_database.rb
seqtrimnext-2.0.66 bin/filter_database.rb
seqtrimnext-2.0.62 bin/filter_database.rb
seqtrimnext-2.0.61 bin/filter_database.rb
seqtrimnext-2.0.60 bin/filter_database.rb
seqtrimnext-2.0.59 bin/filter_database.rb
seqtrimnext-2.0.57 bin/filter_database.rb
seqtrimnext-2.0.56 bin/filter_database.rb
seqtrimnext-2.0.55 bin/filter_database.rb
seqtrimnext-2.0.54 bin/filter_database.rb
seqtrimnext-2.0.52 bin/filter_database.rb
seqtrimnext-2.0.51 bin/filter_database.rb
seqtrimnext-2.0.50 bin/filter_database.rb
seqtrimnext-2.0.49 bin/filter_database.rb
seqtrimnext-2.0.48 bin/filter_database.rb
seqtrimnext-2.0.46 bin/filter_database.rb