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 +4 -4
- data/lib/crb-blast/crb-blast.rb +6 -4
- data/lib/crb-blast/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6e549532d5ab7c3e2320affbd7b9db0e01dc741
|
4
|
+
data.tar.gz: 7c2a58f1f51381c673bf8906f6e12739b58a7cab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 236fb67036142084a61df53041428fe7e6b96abb3ffcced4ed27f86de32d26f6a68a0165ea2052b26bdc96ed7f882b2e791ee45b228dce01b9f8a33f1b80f322
|
7
|
+
data.tar.gz: 02b62ece6ae514db40cd53a94e369c6653213420ae14a7249bc34dd4e1e92e02767d46cabbc588020969d82927203dd3cb5a2e40af37a2f6029f4eec6940dd21
|
data/lib/crb-blast/crb-blast.rb
CHANGED
@@ -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?(
|
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?(
|
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?(
|
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(
|
539
|
+
File.open(@reciprocal_hits, "w") { |f| f.write s }
|
538
540
|
end
|
539
541
|
end
|
540
542
|
|
data/lib/crb-blast/version.rb
CHANGED