Class: Bio::Blat::Report::Hit

Inherits:
Object
  • Object
show all
Defined in:
lib/bio/BIOExtensions.rb

Instance Method Summary collapse

Instance Method Details

#percentage_coveredObject



51
52
53
# File 'lib/bio/BIOExtensions.rb', line 51

def percentage_covered
  ( match + mismatch ) * 100.0 / query_len.to_f
end

#wheat_armObject



47
48
49
# File 'lib/bio/BIOExtensions.rb', line 47

def wheat_arm
  wheat_chr_arm[2]
end

#wheat_chrObject



34
35
36
# File 'lib/bio/BIOExtensions.rb', line 34

def wheat_chr
  wheat_chr_arm[0,2]
end

#wheat_chr_armObject

Function to parse stuff like: IWGSC_CSS_1AL_scaff_110



29
30
31
32
# File 'lib/bio/BIOExtensions.rb', line 29

def wheat_chr_arm
  @wheat_chr_arm if @wheat_chr_arm
  @wheat_chr_arm = target_id.split('_')[2]
end

#wheat_chr_groupObject

Raises:

  • (Exception.new())


38
39
40
41
# File 'lib/bio/BIOExtensions.rb', line 38

def wheat_chr_group 
  raise Exception.new(), "No wheat group for #{target_id} #{self.inspect}"  unless wheat_chr
  wheat_chr_arm[0]
end

#wheat_genomeObject



43
44
45
# File 'lib/bio/BIOExtensions.rb', line 43

def wheat_genome
  wheat_chr_arm[1]
end