bio-polyploid-tools 1.2.0 → 1.2.1
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/.travis.yml +9 -4
- data/VERSION +1 -1
- data/bin/polymarker.rb +6 -5
- data/bin/polymarker_capillary.rb +1 -1
- data/bio-polyploid-tools.gemspec +13 -11
- data/lib/bio/BFRTools.rb +5 -5
- data/lib/bio/PolyploidTools/SNP.rb +1 -1
- data/lib/bio/db/primer3.rb +6 -2
- data/test/data/7B_marker_test.txt +1 -0
- data/test/data/{7B_amplicon_test_reference.fa.ndb → PST130_7067.fa.ndb} +0 -0
- data/test/data/PST130_7067.fa.nhr +0 -0
- data/test/data/PST130_7067.fa.nin +0 -0
- data/test/data/PST130_7067.fa.not +0 -0
- data/test/data/PST130_7067.fa.nsq +0 -0
- data/test/data/{7B_amplicon_test_reference.fa.ntf → PST130_7067.fa.ntf} +0 -0
- data/test/data/PST130_7067.fa.nto +0 -0
- data/test/test_bfr.rb +11 -11
- data/test/test_integration.rb +76 -0
- data/test/test_snp_parsing.rb +3 -3
- metadata +15 -13
- data/test/data/7B_amplicon_test_reference.fa.nhr +0 -0
- data/test/data/7B_amplicon_test_reference.fa.nin +0 -0
- data/test/data/7B_amplicon_test_reference.fa.not +0 -0
- data/test/data/7B_amplicon_test_reference.fa.nsq +0 -0
- data/test/data/7B_amplicon_test_reference.fa.nto +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0d5a3af7b47246e8be286fd81aa93319375bcc3b09c3f7a8fe18435a187d301
|
4
|
+
data.tar.gz: 594953032a8c400e0f0868f44ee82f80d38d784b9f377f0c39b16ae42b930884
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 811df7eeae83f8ab557254d0dd8845639105d3e2ac81896d8a2507456cbfd50fd739a3369deadc8deaf9ad9421f8ea620072610af4311fc27528cf4cc318dde4
|
7
|
+
data.tar.gz: ed90f0431a82e2492a703b607ccc92c4ea339a12c9098084112b885221fe8e3745e192ff92f971b751bad0ad5ddf851f3128266db98b5966d8686e6379a6a0de
|
data/.travis.yml
CHANGED
@@ -7,13 +7,18 @@ addons:
|
|
7
7
|
- libncurses5-dev
|
8
8
|
- libtinfo-dev
|
9
9
|
- exonerate
|
10
|
+
- blast2
|
11
|
+
- ncbi-blast+
|
12
|
+
- mafft
|
13
|
+
- primer3
|
10
14
|
before_install:
|
11
15
|
- gem update --system
|
12
16
|
- export RUBYOPT="-W1"
|
13
17
|
rvm:
|
14
|
-
- 2.3
|
15
|
-
- 2.4
|
16
|
-
- 2.5
|
17
|
-
- 2.6
|
18
|
+
- 2.3
|
19
|
+
- 2.4
|
20
|
+
- 2.5
|
21
|
+
- 2.6
|
22
|
+
- 2.7
|
18
23
|
|
19
24
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.1
|
data/bin/polymarker.rb
CHANGED
@@ -41,7 +41,7 @@ options[:database] = false
|
|
41
41
|
options[:filter_best] = false
|
42
42
|
options[:aligner] = :blast
|
43
43
|
options[:max_hits] = 8
|
44
|
-
options[:max_specific_primers] =
|
44
|
+
options[:max_specific_primers] = 20
|
45
45
|
options[:primer_3_preferences] = {
|
46
46
|
:primer_product_size_range => "50-150" ,
|
47
47
|
:primer_max_size => 25 ,
|
@@ -288,18 +288,19 @@ file.close
|
|
288
288
|
#chr_group = chromosome[0]
|
289
289
|
write_status "Searching markers in genome"
|
290
290
|
exo_f = File.open(exonerate_file, "w")
|
291
|
+
contigs_f = nil
|
291
292
|
contigs_f = File.open(temp_contigs, "w") if options[:extract_found_contigs]
|
292
293
|
filename=path_to_contigs
|
293
294
|
#puts filename
|
294
295
|
target=filename
|
295
296
|
|
296
|
-
fasta_file = Bio::DB::Fasta::FastaFile.new(
|
297
|
+
fasta_file = Bio::DB::Fasta::FastaFile.new(fasta: target)
|
297
298
|
fasta_file.load_fai_entries
|
298
299
|
|
299
300
|
found_contigs = Set.new
|
300
301
|
|
301
302
|
|
302
|
-
def do_align(aln, exo_f, found_contigs, min_identity,fasta_file,options)
|
303
|
+
def do_align(aln, exo_f, found_contigs, min_identity,fasta_file,options, contigs_f: nil)
|
303
304
|
if aln.identity > min_identity
|
304
305
|
exo_f.puts aln.line
|
305
306
|
unless found_contigs.include?(aln.target_id) #We only add once each contig. Should reduce the size of the output file.
|
@@ -317,11 +318,11 @@ def do_align(aln, exo_f, found_contigs, min_identity,fasta_file,options)
|
|
317
318
|
end
|
318
319
|
|
319
320
|
Bio::DB::Blast.align({:query=>temp_fasta_query, :target=>options[:database], :model=>model, :max_hits=>options[:max_hits]}) do |aln|
|
320
|
-
do_align(aln, exo_f, found_contigs,min_identity, fasta_file,options)
|
321
|
+
do_align(aln, exo_f, found_contigs,min_identity, fasta_file,options, contigs_f: contigs_f)
|
321
322
|
end if options[:aligner] == :blast
|
322
323
|
|
323
324
|
Bio::DB::Exonerate.align({:query=>temp_fasta_query, :target=>target, :model=>model}) do |aln|
|
324
|
-
do_align(aln, exo_f, found_contigs, min_identity,fasta_file,options)
|
325
|
+
do_align(aln, exo_f, found_contigs, min_identity,fasta_file,options, contigs_f: contigs_f)
|
325
326
|
end if options[:aligner] == :exonerate
|
326
327
|
|
327
328
|
exo_f.close()
|
data/bin/polymarker_capillary.rb
CHANGED
@@ -53,7 +53,7 @@ OptionParser.new do |opts|
|
|
53
53
|
options[:markers] = o
|
54
54
|
end
|
55
55
|
|
56
|
-
opts.on("-o", "--
|
56
|
+
opts.on("-o", "--output FOLDER", "Path to a folder where the outputs are going to be stored") do |o|
|
57
57
|
options[:output_folder] = o
|
58
58
|
end
|
59
59
|
opts.on("-g", "--genomes_count INT", "Number of genomes (default 3, for hexaploid)") do |o|
|
data/bio-polyploid-tools.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: bio-polyploid-tools 1.2.
|
5
|
+
# stub: bio-polyploid-tools 1.2.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "bio-polyploid-tools".freeze
|
9
|
-
s.version = "1.2.
|
9
|
+
s.version = "1.2.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Ricardo H. Ramirez-Gonzalez".freeze]
|
14
|
-
s.date = "
|
14
|
+
s.date = "2021-05-10"
|
15
15
|
s.description = "Repository of tools developed at Crop Genetics in JIC to work with polyploid wheat".freeze
|
16
16
|
s.email = "ricardo.ramirez-gonzalez@jic.ac.uk".freeze
|
17
17
|
s.executables = ["bfr.rb".freeze, "blast_triads.rb".freeze, "blast_triads_promoters.rb".freeze, "count_variations.rb".freeze, "filter_blat_by_target_coverage.rb".freeze, "filter_exonerate_by_identity.rb".freeze, "find_best_blat_hit.rb".freeze, "find_best_exonerate.rb".freeze, "get_longest_hsp_blastx_triads.rb".freeze, "hexaploid_primers.rb".freeze, "homokaryot_primers.rb".freeze, "mafft_triads.rb".freeze, "mafft_triads_promoters.rb".freeze, "map_markers_to_contigs.rb".freeze, "marker_to_vcf.rb".freeze, "markers_in_region.rb".freeze, "mask_triads.rb".freeze, "polymarker.rb".freeze, "polymarker_capillary.rb".freeze, "polymarker_deletions.rb".freeze, "snp_position_to_polymarker.rb".freeze, "snps_between_bams.rb".freeze, "tag_stats.rb".freeze, "vcfLineToTable.rb".freeze, "vcfToPolyMarker.rb".freeze]
|
@@ -105,13 +105,7 @@ Gem::Specification.new do |s|
|
|
105
105
|
"test/data/7B_amplicon_test.fa.fai",
|
106
106
|
"test/data/7B_amplicon_test_reference.fa",
|
107
107
|
"test/data/7B_amplicon_test_reference.fa.fai",
|
108
|
-
"test/data/
|
109
|
-
"test/data/7B_amplicon_test_reference.fa.nhr",
|
110
|
-
"test/data/7B_amplicon_test_reference.fa.nin",
|
111
|
-
"test/data/7B_amplicon_test_reference.fa.not",
|
112
|
-
"test/data/7B_amplicon_test_reference.fa.nsq",
|
113
|
-
"test/data/7B_amplicon_test_reference.fa.ntf",
|
114
|
-
"test/data/7B_amplicon_test_reference.fa.nto",
|
108
|
+
"test/data/7B_marker_test.txt",
|
115
109
|
"test/data/BS00068396_51.fa",
|
116
110
|
"test/data/BS00068396_51_blast.tab",
|
117
111
|
"test/data/BS00068396_51_contigs.aln",
|
@@ -141,6 +135,13 @@ Gem::Specification.new do |s|
|
|
141
135
|
"test/data/PST130_7067.csv",
|
142
136
|
"test/data/PST130_7067.fa",
|
143
137
|
"test/data/PST130_7067.fa.fai",
|
138
|
+
"test/data/PST130_7067.fa.ndb",
|
139
|
+
"test/data/PST130_7067.fa.nhr",
|
140
|
+
"test/data/PST130_7067.fa.nin",
|
141
|
+
"test/data/PST130_7067.fa.not",
|
142
|
+
"test/data/PST130_7067.fa.nsq",
|
143
|
+
"test/data/PST130_7067.fa.ntf",
|
144
|
+
"test/data/PST130_7067.fa.nto",
|
144
145
|
"test/data/PST130_reverse_primer.csv",
|
145
146
|
"test/data/S22380157.fa",
|
146
147
|
"test/data/S22380157.fa.fai",
|
@@ -190,12 +191,13 @@ Gem::Specification.new do |s|
|
|
190
191
|
"test/test_blast.rb",
|
191
192
|
"test/test_exon_container.rb",
|
192
193
|
"test/test_exonearate.rb",
|
194
|
+
"test/test_integration.rb",
|
193
195
|
"test/test_snp_parsing.rb",
|
194
196
|
"test/test_wrong_selection.sh"
|
195
197
|
]
|
196
198
|
s.homepage = "http://github.com/tgac/bioruby-polyploid-tools".freeze
|
197
199
|
s.licenses = ["MIT".freeze]
|
198
|
-
s.rubygems_version = "3.1.
|
200
|
+
s.rubygems_version = "3.1.4".freeze
|
199
201
|
s.summary = "Tool to work with polyploids, NGS and molecular biology".freeze
|
200
202
|
|
201
203
|
if s.respond_to? :specification_version then
|
data/lib/bio/BFRTools.rb
CHANGED
@@ -31,7 +31,7 @@ module Bio::BFRTools
|
|
31
31
|
BASES = [:A, :C, :G, :T]
|
32
32
|
#Sets the reference file
|
33
33
|
def reference(path)
|
34
|
-
@reference_db = Bio::DB::Fasta::FastaFile.new(
|
34
|
+
@reference_db = Bio::DB::Fasta::FastaFile.new(fasta: path)
|
35
35
|
@reference_path = path
|
36
36
|
end
|
37
37
|
|
@@ -49,7 +49,7 @@ module Bio::BFRTools
|
|
49
49
|
raise BFRToolsException.new("Unable to open #{path}") unless path.readable? or path.directory?
|
50
50
|
|
51
51
|
@parental_1_name = opts[:name] ? opts[:name] : path.basename(".bam").to_s
|
52
|
-
@parental_1_sam = Bio::DB::Sam.new(
|
52
|
+
@parental_1_sam = Bio::DB::Sam.new(fasta: @reference_path, :bam=>path.realpath.to_s)
|
53
53
|
@parental_1_path = path
|
54
54
|
|
55
55
|
end
|
@@ -61,7 +61,7 @@ module Bio::BFRTools
|
|
61
61
|
raise BFRToolsException.new("Unable to open #{path}") unless path.readable? or path.directory?
|
62
62
|
|
63
63
|
@parental_2_name = @name = opts[:name] ? opts[:name] : path.basename(".bam").to_s
|
64
|
-
@parental_2_sam = Bio::DB::Sam.new(
|
64
|
+
@parental_2_sam = Bio::DB::Sam.new(fasta: @reference_path, :bam=>path.realpath.to_s)
|
65
65
|
@parental_2_path = path
|
66
66
|
end
|
67
67
|
|
@@ -72,7 +72,7 @@ module Bio::BFRTools
|
|
72
72
|
raise BFRToolsException.new("Unable to open #{path}") unless path.readable? or path.directory?
|
73
73
|
|
74
74
|
@bulk_1_name = opts[:name] ? opts[:name] : path.basename(".bam").to_s
|
75
|
-
@bulk_1_sam = Bio::DB::Sam.new(
|
75
|
+
@bulk_1_sam = Bio::DB::Sam.new(fasta: @reference_path, :bam=>path.realpath.to_s)
|
76
76
|
@bulk_1_path = path
|
77
77
|
end
|
78
78
|
|
@@ -83,7 +83,7 @@ module Bio::BFRTools
|
|
83
83
|
raise BFRToolsException.new("Unable to open #{path}") unless path.readable? or path.directory?
|
84
84
|
|
85
85
|
@bulk_2_name = opts[:name] ? opts[:name] : path.basename(".bam").to_s
|
86
|
-
@bulk_2_sam = Bio::DB::Sam.new(
|
86
|
+
@bulk_2_sam = Bio::DB::Sam.new(fasta: @reference_path, :bam=>path.realpath.to_s)
|
87
87
|
@bulk_2_path = path
|
88
88
|
end
|
89
89
|
|
@@ -409,7 +409,7 @@ module Bio::PolyploidTools
|
|
409
409
|
total_candidates += pr.almost_crhomosome_specific_intron.size
|
410
410
|
|
411
411
|
skip_specific = total_candidates > max_specific_primers
|
412
|
-
|
412
|
+
#puts "skip_specific: #{skip_specific}: #{total_candidates} > #{max_specific_primers}"
|
413
413
|
pr.chromosome_specific.each do |pos|
|
414
414
|
break if skip_specific
|
415
415
|
args = {:name =>"#{gene}:#{original}#{position}#{snp} #{original_name} chromosome_specific exon #{@snp_type} #{chromosome}", :left_pos => pr.snp_pos, :right_pos => pos, :sequence=>seq_original}
|
data/lib/bio/db/primer3.rb
CHANGED
@@ -34,13 +34,17 @@ module Bio::DB::Primer3
|
|
34
34
|
|
35
35
|
def self.run(opts={})
|
36
36
|
puts "Primer3.run running..."
|
37
|
-
|
37
|
+
timeout = 600
|
38
38
|
f_in=opts[:in]
|
39
39
|
f_out=opts[:out]
|
40
|
+
timeout = opts[:timeout] if opts[:timeout]
|
40
41
|
opts.delete(:in)
|
41
42
|
opts.delete(:out)
|
42
43
|
primer_3_in = File.read(f_in)
|
43
|
-
status = systemu "primer3_core", 0=>primer_3_in, 1=>stdout='', 2=>stderr=''
|
44
|
+
status = systemu "primer3_core", 0=>primer_3_in, 1=>stdout='', 2=>stderr='' do |cid|
|
45
|
+
sleep timeout
|
46
|
+
Process.kill 9, cid
|
47
|
+
end
|
44
48
|
# $stderr.puts cmdline
|
45
49
|
if status.exitstatus == 0
|
46
50
|
File.open(f_out, 'w') { |f| f.write(stdout) }
|
@@ -0,0 +1 @@
|
|
1
|
+
RAC875_c8221_649,7B,CGTACAATTTACCTGCAGAGGTTGAGAATGTCCTTTCTAGCTGCTTTGAG[T/C]ACGACTTTCGGGATCGCCCCTTGATGTCAGATATCTTACAAGCATTTGAA
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
File without changes
|
Binary file
|
data/test/test_bfr.rb
CHANGED
@@ -26,12 +26,12 @@ class TestPolyploidTools < Test::Unit::TestCase
|
|
26
26
|
@f2_b=data_path + "/LIB1719.bam"
|
27
27
|
|
28
28
|
@bfr_path=data_path + "/bfr_out_test.csv"
|
29
|
-
@fasta_db = Bio::DB::Fasta::FastaFile.new(
|
29
|
+
@fasta_db = Bio::DB::Fasta::FastaFile.new(fasta: @ref)
|
30
30
|
@fasta_db.load_fai_entries
|
31
|
-
@bam_a = Bio::DB::Sam.new(
|
32
|
-
@bam_b = Bio::DB::Sam.new(
|
33
|
-
@bam_f2_a = Bio::DB::Sam.new(
|
34
|
-
@bam_f2_b = Bio::DB::Sam.new(
|
31
|
+
@bam_a = Bio::DB::Sam.new(fasta: @ref, bam: @a)
|
32
|
+
@bam_b = Bio::DB::Sam.new(fasta: @ref, bam: @b)
|
33
|
+
@bam_f2_a = Bio::DB::Sam.new(fasta: @ref, bam: @f2_a)
|
34
|
+
@bam_f2_b = Bio::DB::Sam.new(fasta: @ref, bam: @f2_b)
|
35
35
|
# puts "SETUP"
|
36
36
|
end
|
37
37
|
|
@@ -49,8 +49,8 @@ class TestPolyploidTools < Test::Unit::TestCase
|
|
49
49
|
|
50
50
|
#puts @bam_a.methods
|
51
51
|
ref_seq=@fasta_db.fetch_sequence(region)
|
52
|
-
reg_a = @bam_a.fetch_region(
|
53
|
-
reg_b = @bam_b.fetch_region(
|
52
|
+
reg_a = @bam_a.fetch_region(region: region, min_cov: min_cov, A: 1)
|
53
|
+
reg_b = @bam_b.fetch_region(region: region, min_cov: min_cov, A: 1)
|
54
54
|
cons_1 = reg_a.consensus
|
55
55
|
cons_2 = reg_b.consensus
|
56
56
|
|
@@ -85,10 +85,10 @@ class TestPolyploidTools < Test::Unit::TestCase
|
|
85
85
|
container = Bio::BFRTools::BFRContainer.new
|
86
86
|
|
87
87
|
container.reference @ref
|
88
|
-
container.parental_1
|
89
|
-
container.parental_2
|
90
|
-
container.bulk_1
|
91
|
-
container.bulk_2
|
88
|
+
container.parental_1( path: @a )
|
89
|
+
container.parental_2( path: @b )
|
90
|
+
container.bulk_1( path: @f2_a )
|
91
|
+
container.bulk_2( path: @f2_b )
|
92
92
|
|
93
93
|
i = -1
|
94
94
|
|
@@ -0,0 +1,76 @@
|
|
1
|
+
$: << File.expand_path(File.dirname(__FILE__) + '/../lib')
|
2
|
+
$: << File.expand_path('.')
|
3
|
+
path= File.expand_path(File.dirname(__FILE__) + '/../lib/bioruby-polyploid-tools.rb')
|
4
|
+
|
5
|
+
tmp_verb = $VERBOSE
|
6
|
+
$VERBOSE=nil
|
7
|
+
#puts path
|
8
|
+
require path
|
9
|
+
require 'bio-samtools'
|
10
|
+
require "test/unit"
|
11
|
+
$VERBOSE=tmp_verb
|
12
|
+
|
13
|
+
|
14
|
+
class TestInregration < Test::Unit::TestCase
|
15
|
+
|
16
|
+
|
17
|
+
#Set up the paths
|
18
|
+
def setup
|
19
|
+
@data_path= File.expand_path(File.dirname(__FILE__) + '/data/' )
|
20
|
+
|
21
|
+
@ref="#{@data_path}/7B_amplicon_test_reference.fa"
|
22
|
+
@amplicon = "#{@data_path}/7B_amplicon_test.fa"
|
23
|
+
@genomes_count = 3
|
24
|
+
@output_folder="#{@data_path}/test_out"
|
25
|
+
@bin=File.expand_path(File.dirname(__FILE__) + '/../bin')
|
26
|
+
@marker = "#{@data_path}/7B_marker_test.txt"
|
27
|
+
FileUtils.rm_r(@output_folder, force: true) if Dir.exist? @output_folder
|
28
|
+
|
29
|
+
cmd = "makeblastdb -in #{@ref} -dbtype nucl "
|
30
|
+
#status, stdout, stderr =
|
31
|
+
systemu cmd
|
32
|
+
# @ref=data_path + '/S22380157.fa'
|
33
|
+
# @a=data_path + "/LIB1721.bam"
|
34
|
+
# @b=data_path + "/LIB1722.bam"
|
35
|
+
# @f2_a=data_path + "/LIB1716.bam"
|
36
|
+
# @f2_b=data_path + "/LIB1719.bam"
|
37
|
+
|
38
|
+
# @bfr_path=data_path + "/bfr_out_test.csv"
|
39
|
+
# @fasta_db = Bio::DB::Fasta::FastaFile.new({:fasta=>@ref})
|
40
|
+
# @fasta_db.load_fai_entries
|
41
|
+
# @bam_a = Bio::DB::Sam.new({:fasta=>@ref, :bam=>@a})
|
42
|
+
# @bam_b = Bio::DB::Sam.new({:fasta=>@ref, :bam=>@b})
|
43
|
+
# @bam_f2_a = Bio::DB::Sam.new({:fasta=>@ref, :bam=>@f2_a})
|
44
|
+
# @bam_f2_b = Bio::DB::Sam.new({:fasta=>@ref, :bam=>@f2_b})
|
45
|
+
# puts "SETUP"
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
def teardown
|
50
|
+
FileUtils.rm_r(@output_folder, force: true) if Dir.exist? @output_folder
|
51
|
+
Dir.glob("#{@ref}.n*").each do |file|
|
52
|
+
#puts file
|
53
|
+
File.delete(file)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def test_amplicon_primers
|
58
|
+
cmd = "ruby #{@bin}/polymarker_capillary.rb --reference #{@ref} --sequences #{@amplicon} --genomes_count #{@genomes_count} --output #{@output_folder} --database #{@ref}"
|
59
|
+
status, stdout, stderr = systemu cmd
|
60
|
+
assert_equal(status.exitstatus, 0, "Failed running '#{cmd}'\nSTDOUT:\n#{stdout}\nSTDERR\n#{stderr}")
|
61
|
+
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_deletion_primers
|
65
|
+
cmd = "ruby #{@bin}/polymarker_deletions.rb --reference #{@ref} --sequences #{@amplicon} --genomes_count #{@genomes_count} --output #{@output_folder} --database #{@ref}"
|
66
|
+
status, stdout, stderr = systemu cmd
|
67
|
+
assert_equal(status.exitstatus, 0, "Failed running '#{cmd}'\nSTDOUT:\n#{stdout}\nSTDERR\n#{stderr}")
|
68
|
+
end
|
69
|
+
|
70
|
+
def test_polymerker
|
71
|
+
cmd = "ruby ./bin/polymarker.rb -m #{@marker} -c #{@ref} --extract_found_contigs -A blast -a nrgene --output #{@output_folder}"
|
72
|
+
status, stdout, stderr = systemu cmd
|
73
|
+
assert_equal(status.exitstatus, 0, "Failed running '#{cmd}'\nSTDOUT:\n#{stdout}\nSTDERR\n#{stderr}")
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
data/test/test_snp_parsing.rb
CHANGED
@@ -27,7 +27,7 @@ class TestSNPparsing < Test::Unit::TestCase
|
|
27
27
|
def test_mutant_snp
|
28
28
|
|
29
29
|
ref=@data + "/IWGSC_CSS_1AL_scaff_1455974_aln_contigs.fa"
|
30
|
-
fasta_reference_db = Bio::DB::Fasta::FastaFile.new(
|
30
|
+
fasta_reference_db = Bio::DB::Fasta::FastaFile.new(fasta: ref)
|
31
31
|
fasta_reference_db.index
|
32
32
|
fasta_reference_db.load_fai_entries
|
33
33
|
|
@@ -49,7 +49,7 @@ class TestSNPparsing < Test::Unit::TestCase
|
|
49
49
|
|
50
50
|
def test_vcf_line
|
51
51
|
ref=@data + "/IWGSC_CSS_1AL_scaff_1455974_aln_contigs.fa"
|
52
|
-
fasta_reference_db = Bio::DB::Fasta::FastaFile.new(
|
52
|
+
fasta_reference_db = Bio::DB::Fasta::FastaFile.new(fasta: ref)
|
53
53
|
|
54
54
|
fasta_reference_db.load_fai_entries
|
55
55
|
vcf="IWGSC_CSS_1AL_scaff_1455974 127 test_snp C T 135.03 . "
|
@@ -85,7 +85,7 @@ class TestSNPparsing < Test::Unit::TestCase
|
|
85
85
|
def test_reference_snp
|
86
86
|
|
87
87
|
ref=@data + "/IWGSC_CSS_1AL_scaff_1455974_aln_contigs.fa"
|
88
|
-
fasta_reference_db = Bio::DB::Fasta::FastaFile.new(
|
88
|
+
fasta_reference_db = Bio::DB::Fasta::FastaFile.new(fasta: ref)
|
89
89
|
|
90
90
|
fasta_reference_db.load_fai_entries
|
91
91
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bio-polyploid-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo H. Ramirez-Gonzalez
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bio
|
@@ -227,13 +227,7 @@ files:
|
|
227
227
|
- test/data/7B_amplicon_test.fa.fai
|
228
228
|
- test/data/7B_amplicon_test_reference.fa
|
229
229
|
- test/data/7B_amplicon_test_reference.fa.fai
|
230
|
-
- test/data/
|
231
|
-
- test/data/7B_amplicon_test_reference.fa.nhr
|
232
|
-
- test/data/7B_amplicon_test_reference.fa.nin
|
233
|
-
- test/data/7B_amplicon_test_reference.fa.not
|
234
|
-
- test/data/7B_amplicon_test_reference.fa.nsq
|
235
|
-
- test/data/7B_amplicon_test_reference.fa.ntf
|
236
|
-
- test/data/7B_amplicon_test_reference.fa.nto
|
230
|
+
- test/data/7B_marker_test.txt
|
237
231
|
- test/data/BS00068396_51.fa
|
238
232
|
- test/data/BS00068396_51_blast.tab
|
239
233
|
- test/data/BS00068396_51_contigs.aln
|
@@ -263,6 +257,13 @@ files:
|
|
263
257
|
- test/data/PST130_7067.csv
|
264
258
|
- test/data/PST130_7067.fa
|
265
259
|
- test/data/PST130_7067.fa.fai
|
260
|
+
- test/data/PST130_7067.fa.ndb
|
261
|
+
- test/data/PST130_7067.fa.nhr
|
262
|
+
- test/data/PST130_7067.fa.nin
|
263
|
+
- test/data/PST130_7067.fa.not
|
264
|
+
- test/data/PST130_7067.fa.nsq
|
265
|
+
- test/data/PST130_7067.fa.ntf
|
266
|
+
- test/data/PST130_7067.fa.nto
|
266
267
|
- test/data/PST130_reverse_primer.csv
|
267
268
|
- test/data/S22380157.fa
|
268
269
|
- test/data/S22380157.fa.fai
|
@@ -312,13 +313,14 @@ files:
|
|
312
313
|
- test/test_blast.rb
|
313
314
|
- test/test_exon_container.rb
|
314
315
|
- test/test_exonearate.rb
|
316
|
+
- test/test_integration.rb
|
315
317
|
- test/test_snp_parsing.rb
|
316
318
|
- test/test_wrong_selection.sh
|
317
319
|
homepage: http://github.com/tgac/bioruby-polyploid-tools
|
318
320
|
licenses:
|
319
321
|
- MIT
|
320
322
|
metadata: {}
|
321
|
-
post_install_message:
|
323
|
+
post_install_message:
|
322
324
|
rdoc_options: []
|
323
325
|
require_paths:
|
324
326
|
- lib
|
@@ -333,8 +335,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
333
335
|
- !ruby/object:Gem::Version
|
334
336
|
version: '0'
|
335
337
|
requirements: []
|
336
|
-
rubygems_version: 3.1.
|
337
|
-
signing_key:
|
338
|
+
rubygems_version: 3.1.4
|
339
|
+
signing_key:
|
338
340
|
specification_version: 4
|
339
341
|
summary: Tool to work with polyploids, NGS and molecular biology
|
340
342
|
test_files: []
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|