crb-blast 0.6.4 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 31f0635db80697cd3967e40c6101d3036d444822
4
- data.tar.gz: e6fda579218d146723542c9baa86908210591308
3
+ metadata.gz: c6e549532d5ab7c3e2320affbd7b9db0e01dc741
4
+ data.tar.gz: 7c2a58f1f51381c673bf8906f6e12739b58a7cab
5
5
  SHA512:
6
- metadata.gz: 7bdfc592a07e9a688dc65861dfda9c993b3558186d4d59b32a7030ac087dcd9b282246ef616c8f29388ac001851cc4f96f8be29bb77e075aaa9474d1083d0bb6
7
- data.tar.gz: eb9a9932a63ebf3e6ffd3b8915db74f76c93c7931001d1912a2a6c0a0a087cb20463aa31ea95e274ad156929aab83a229bdee092690a516686bf4bc055405720
6
+ metadata.gz: 236fb67036142084a61df53041428fe7e6b96abb3ffcced4ed27f86de32d26f6a68a0165ea2052b26bdc96ed7f882b2e791ee45b228dce01b9f8a33f1b80f322
7
+ data.tar.gz: 02b62ece6ae514db40cd53a94e369c6653213420ae14a7249bc34dd4e1e92e02767d46cabbc588020969d82927203dd3cb5a2e40af37a2f6029f4eec6940dd21
@@ -45,6 +45,8 @@ module CRB_Blast
45
45
  end
46
46
  end
47
47
  end
48
+ name = "#{File.basename(query)}_#{File.basename(target)}_reciprocals.txt"
49
+ @reciprocal_hits = File.join(@working_dir, name)
48
50
  @makedb_path = which('makeblastdb')
49
51
  raise 'makeblastdb was not in the PATH' if @makedb_path.empty?
50
52
  @blastn_path = which('blastn')
@@ -347,7 +349,7 @@ module CRB_Blast
347
349
  # Load the two BLAST output files and store the hits in a hash
348
350
  #
349
351
  def load_outputs
350
- if File.exist?("#{@working_dir}/reciprocal_hits.txt")
352
+ if File.exist?(@reciprocal_hits)
351
353
  # puts "reciprocal output already exists"
352
354
  else
353
355
  @query_results = Hash.new
@@ -384,7 +386,7 @@ module CRB_Blast
384
386
 
385
387
  # fills @reciprocals with strict reciprocal hits from the blast results
386
388
  def find_reciprocals
387
- if File.exist?("#{@working_dir}/reciprocal_hits.txt")
389
+ if File.exist?(@reciprocal_hits)
388
390
  # puts "reciprocal output already exists"
389
391
  else
390
392
  @reciprocals = Hash.new
@@ -425,7 +427,7 @@ module CRB_Blast
425
427
  # Finds hits that have a lower evalue than this cutoff
426
428
  def find_secondaries
427
429
 
428
- if File.exist?("#{@working_dir}/reciprocal_hits.txt")
430
+ if File.exist?(@reciprocal_hits)
429
431
  # puts "reciprocal output already exists"
430
432
  else
431
433
  length_hash = Hash.new
@@ -534,7 +536,7 @@ module CRB_Blast
534
536
  s << "#{hit}\n"
535
537
  end
536
538
  end
537
- File.open("#{@working_dir}/reciprocal_hits.txt", "w") {|f| f.write s }
539
+ File.open(@reciprocal_hits, "w") { |f| f.write s }
538
540
  end
539
541
  end
540
542
 
@@ -3,7 +3,7 @@ module CRB_Blast
3
3
  module VERSION
4
4
  MAJOR = 0
5
5
  MINOR = 6
6
- PATCH = 4
6
+ PATCH = 5
7
7
  BUILD = nil
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crb-blast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Boursnell