Sha256: 46d1eb70a9c6bc19916f764c404a22d5e8e179c6508e2f14d6ed2e78cda90650

Contents?: true

Size: 760 Bytes

Versions: 53

Compression:

Stored size: 760 Bytes

Contents

#!/usr/bin/env ruby


found_cointigs = Set.new
Bio::DB::Exonerate.align({:query=>temp_fasta_query, :target=>target, :model=>model, :chunk=>chunk, :total_chunks=>}) do |aln|
  if aln.identity > min_identity
    exo_f.puts aln.line
    unless found_cointigs.include?(aln.target_id) #We only add once each contig. Should reduce the size of the output file. 
      found_cointigs.add(aln.target_id)
      entry = fasta_file.index.region_for_entry(aln.target_id)
      raise ExonerateException.new,  "Entry not found! #{aln.target_id}. Make sure that the #{target_id}.fai was generated properly." if entry == nil
      region = entry.get_full_region
      seq = fasta_file.fetch_sequence(region)
      contigs_f.puts(">#{aln.target_id}\n#{seq}")
    end
  end  
end

Version data entries

53 entries across 53 versions & 2 rubygems

Version Path
bio-polyploid-tools-0.9.2 bin/find_best_exonerate.rb
bio-polyploid-tools-0.9.1 bin/find_best_exonerate.rb
bio-polyploid-tools-0.9.0 bin/find_best_exonerate.rb
bio-polyploid-tools-0.8.9 bin/find_best_exonerate.rb
bio-polyploid-tools-0.8.8 bin/find_best_exonerate.rb
bio-polyploid-tools-0.8.7 bin/find_best_exonerate.rb
bio-polyploid-tools-0.8.6 bin/find_best_exonerate.rb
bio-polyploid-tools-0.8.5 bin/find_best_exonerate.rb
bio-polyploid-tools-0.8.4 bin/find_best_exonerate.rb
bio-polyploid-tools-0.8.3 bin/find_best_exonerate.rb
bio-polyploid-tools-0.8.2 bin/find_best_exonerate.rb
bio-polyploid-tools-0.8.1 bin/find_best_exonerate.rb
bio-polyploid-tools-0.8.0 bin/find_best_exonerate.rb
bio-polyploid-tools-0.7.3 bin/find_best_exonerate.rb
bio-polyploid-tools-0.7.2 bin/find_best_exonerate.rb
bio-polyploid-tools-0.7.1 bin/find_best_exonerate.rb
bio-polyploid-tools-0.7.0 bin/find_best_exonerate.rb
bio-polyploid-tools-0.6.1 bin/find_best_exonerate.rb
bio-polyploid-tools-0.6.0 bin/find_best_exonerate.rb
bio-polyploid-tools-0.5.2 bin/find_best_exonerate.rb