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-polymarker-1.3.3 bin/find_best_exonerate.rb
bio-polymarker-1.3.2 bin/find_best_exonerate.rb
bio-polymarker-1.3.1 bin/find_best_exonerate.rb
bio-polymarker-1.3.0 bin/find_best_exonerate.rb
bio-polyploid-tools-1.2.1 bin/find_best_exonerate.rb
bio-polyploid-tools-1.2.0 bin/find_best_exonerate.rb
bio-polyploid-tools-1.1.2 bin/find_best_exonerate.rb
bio-polyploid-tools-1.1.1 bin/find_best_exonerate.rb
bio-polyploid-tools-1.1.0 bin/find_best_exonerate.rb
bio-polyploid-tools-1.0.0 bin/find_best_exonerate.rb
bio-polyploid-tools-0.10.1 bin/find_best_exonerate.rb
bio-polyploid-tools-0.10.0 bin/find_best_exonerate.rb
bio-polyploid-tools-0.9.10 bin/find_best_exonerate.rb
bio-polyploid-tools-0.9.9 bin/find_best_exonerate.rb
bio-polyploid-tools-0.9.8 bin/find_best_exonerate.rb
bio-polyploid-tools-0.9.7 bin/find_best_exonerate.rb
bio-polyploid-tools-0.9.6 bin/find_best_exonerate.rb
bio-polyploid-tools-0.9.5 bin/find_best_exonerate.rb
bio-polyploid-tools-0.9.4 bin/find_best_exonerate.rb
bio-polyploid-tools-0.9.3 bin/find_best_exonerate.rb