class Bio::PolyploidTools::ArmMap

The map hast to come sorted.

Attributes

chromosome[RW]
global_reference[R]
markers[R]
reference[R]

Public Class Methods

new() click to toggle source
# File lib/bio/PolyploidTools/Marker.rb, line 81
def initialize
  @markers = Hash.new
end

Public Instance Methods

align_markers(output) click to toggle source
# File lib/bio/PolyploidTools/Marker.rb, line 85
def align_markers(output)
  Bio::Blat.align(@reference.fasta_path, @fasta_markers, output) do |hit|
    marker = markers[hit.query_id]
    best = marker.best_hit
    unless marker.best_hit 
      markers[hit.query_id].best_hit = hit
    else
      marker.best_hit = hit if hit.score > marker.best_hit.score
    end
  end
end
print_fasta_contigs_for_markers(contigs_file) click to toggle source
print_fasta_contigs_from_reference(filename) click to toggle source
print_fasta_markers(filename) click to toggle source
print_map_with_contigs(filename) click to toggle source

Protected Instance Methods

arm_selection_embl(contig_name) click to toggle source
# File lib/bio/PolyploidTools/Marker.rb, line 170
def arm_selection_embl(contig_name)
  ret = contig_name.split('_')[2][0,2]
  return ret
end