bio-polyploid-tools 1.0.0 → 1.1.0
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/VERSION +1 -1
- data/bin/polymarker.rb +7 -2
- data/bio-polyploid-tools.gemspec +3 -3
- data/lib/bio/PolyploidTools/ExonContainer.rb +2 -2
- data/lib/bio/PolyploidTools/SNP.rb +18 -17
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a5d146ea101ef0f742e6e058708c01b938f2b296d4e8e2085577a2d9fc9f1d4c
|
|
4
|
+
data.tar.gz: f98358f44992285c58bf9be6c8774ee35da19066a96d3fe885901495129bb678
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d6d55c1f56bba647f010211cc7862ccd21faa012be8796babe58037ff7da6e434006d0184a9be6440f5a276c44b0699d30121b39ab42cc4cac62dd3ebc0f8d7b
|
|
7
|
+
data.tar.gz: 75af81e9a4f8207a4b47f414ff898dccd53c830a9d853dbe2a51bb86ecb074fe9ca29000ec99ce5a18e3ccfcf9be480eb92bdca392fa068168eba3824d6b5b71
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.1.0
|
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
|
-
|
|
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 ,
|
|
@@ -136,6 +136,11 @@ OptionParser.new do |opts|
|
|
|
136
136
|
opts.on("-H", "--max_hits INT", "Maximum number of hits to the reference. If there are more hits than this value, the marker is ignored") do |o|
|
|
137
137
|
options[:max_hits] = o.to_i
|
|
138
138
|
end
|
|
139
|
+
|
|
140
|
+
opts.on("-S", "--max_specific_primers INT", "Maximum number of candidate primers to attempt to design. Default: #{options[:max_specific_primers]} ") do |o|
|
|
141
|
+
options[:max_specific_primers] = o.to_i
|
|
142
|
+
end
|
|
143
|
+
|
|
139
144
|
end.parse!
|
|
140
145
|
|
|
141
146
|
|
|
@@ -362,7 +367,7 @@ write_status "Running primer3"
|
|
|
362
367
|
file = File.open(primer_3_input, "w")
|
|
363
368
|
|
|
364
369
|
Bio::DB::Primer3.prepare_input_file(file, options[:primer_3_preferences])
|
|
365
|
-
added_exons = container.print_primer_3_exons(file, nil, snp_in)
|
|
370
|
+
added_exons = container.print_primer_3_exons(file, nil, snp_in, max_specific_primers: options[:max_specific_primers] )
|
|
366
371
|
file.close
|
|
367
372
|
|
|
368
373
|
Bio::DB::Primer3.run({:in=>primer_3_input, :out=>primer_3_output}) if added_exons > 0
|
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.
|
|
5
|
+
# stub: bio-polyploid-tools 1.1.0 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "bio-polyploid-tools".freeze
|
|
9
|
-
s.version = "1.
|
|
9
|
+
s.version = "1.1.0"
|
|
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 = "2019-
|
|
14
|
+
s.date = "2019-10-21"
|
|
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]
|
|
@@ -151,7 +151,7 @@ module Bio::PolyploidTools
|
|
|
151
151
|
end
|
|
152
152
|
end
|
|
153
153
|
|
|
154
|
-
def print_primer_3_exons (file, target_chromosome , parental )
|
|
154
|
+
def print_primer_3_exons (file, target_chromosome , parental, max_specific_primers: 20 )
|
|
155
155
|
added = 0
|
|
156
156
|
|
|
157
157
|
@snp_map.each do | gene, snp_array|
|
|
@@ -159,7 +159,7 @@ module Bio::PolyploidTools
|
|
|
159
159
|
string = ""
|
|
160
160
|
begin
|
|
161
161
|
primer_3_min_seq_length
|
|
162
|
-
string = snp.primer_3_string( snp.chromosome, parental )
|
|
162
|
+
string = snp.primer_3_string( snp.chromosome, parental, max_specific_primers: max_specific_primers )
|
|
163
163
|
#TODO: add tan error to the SNP this snp has more than max_hits.
|
|
164
164
|
#Or maybe inside the SNP file.
|
|
165
165
|
if string.size > 0
|
|
@@ -371,7 +371,7 @@ module Bio::PolyploidTools
|
|
|
371
371
|
end
|
|
372
372
|
|
|
373
373
|
|
|
374
|
-
def primer_3_all_strings(target_chromosome, parental)
|
|
374
|
+
def primer_3_all_strings(target_chromosome, parental, max_specific_primers: 20 )
|
|
375
375
|
|
|
376
376
|
pr = primer_region(target_chromosome, parental )
|
|
377
377
|
primer_3_propertes = Array.new
|
|
@@ -402,51 +402,52 @@ module Bio::PolyploidTools
|
|
|
402
402
|
else
|
|
403
403
|
@snp_type = "non-homoeologous"
|
|
404
404
|
end
|
|
405
|
-
|
|
405
|
+
|
|
406
406
|
pr.chromosome_specific.each do |pos|
|
|
407
|
-
|
|
407
|
+
break if max_specific_primers <= 0
|
|
408
408
|
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}
|
|
409
409
|
primer_3_propertes << return_primer_3_string(args)
|
|
410
410
|
args[:name] = "#{gene}:#{original}#{position}#{snp} #{snp_in} chromosome_specific exon #{@snp_type} #{chromosome}"
|
|
411
411
|
args[:sequence] = seq_snp
|
|
412
412
|
primer_3_propertes << return_primer_3_string(args)
|
|
413
|
+
max_specific_primers -= 1
|
|
413
414
|
end
|
|
414
415
|
|
|
415
|
-
pr.
|
|
416
|
-
|
|
416
|
+
pr.crhomosome_specific_intron.each do |pos|
|
|
417
|
+
break if max_specific_primers <= 0
|
|
418
|
+
args = {:name =>"#{gene}:#{original}#{position}#{snp} #{original_name} chromosome_specific intron #{@snp_type} #{chromosome}", :left_pos => pr.snp_pos, :right_pos => pos, :sequence=>seq_original}
|
|
417
419
|
primer_3_propertes << return_primer_3_string(args)
|
|
418
|
-
args[:name] = "#{gene}:#{original}#{position}#{snp} #{snp_in}
|
|
420
|
+
args[:name] = "#{gene}:#{original}#{position}#{snp} #{snp_in} chromosome_specific exon #{@snp_type} #{chromosome}"
|
|
419
421
|
args[:sequence] = seq_snp
|
|
420
422
|
primer_3_propertes << return_primer_3_string(args)
|
|
421
|
-
|
|
423
|
+
max_specific_primers -= 1
|
|
422
424
|
end
|
|
423
425
|
|
|
424
|
-
pr.
|
|
425
|
-
|
|
426
|
-
args = {:name =>"#{gene}:#{original}#{position}#{snp} #{original_name}
|
|
426
|
+
pr.almost_chromosome_specific.each do |pos|
|
|
427
|
+
break if max_specific_primers <= 0
|
|
428
|
+
args = {:name =>"#{gene}:#{original}#{position}#{snp} #{original_name} chromosome_semispecific exon #{@snp_type} #{chromosome}", :left_pos => pr.snp_pos, :right_pos => pos, :sequence=>seq_original}
|
|
427
429
|
primer_3_propertes << return_primer_3_string(args)
|
|
428
|
-
args[:name] = "#{gene}:#{original}#{position}#{snp} #{snp_in}
|
|
430
|
+
args[:name] = "#{gene}:#{original}#{position}#{snp} #{snp_in} chromosome_semispecific exon #{@snp_type} #{chromosome}"
|
|
429
431
|
args[:sequence] = seq_snp
|
|
430
432
|
primer_3_propertes << return_primer_3_string(args)
|
|
433
|
+
max_specific_primers -= 1
|
|
431
434
|
end
|
|
432
435
|
|
|
433
436
|
pr.almost_crhomosome_specific_intron.each do |pos|
|
|
437
|
+
break if max_specific_primers <= 0
|
|
434
438
|
args = {:name =>"#{gene}:#{original}#{position}#{snp} #{original_name} chromosome_semispecific intron #{@snp_type} #{chromosome}", :left_pos => pr.snp_pos, :right_pos => pos, :sequence=>seq_original}
|
|
435
439
|
primer_3_propertes << return_primer_3_string(args)
|
|
436
440
|
args[:name] = "#{gene}:#{original}#{position}#{snp} #{snp_in} chromosome_semispecific exon #{@snp_type} #{chromosome}"
|
|
437
441
|
args[:sequence] = seq_snp
|
|
438
442
|
primer_3_propertes << return_primer_3_string(args)
|
|
439
|
-
|
|
443
|
+
max_specific_primers -= 1
|
|
440
444
|
end
|
|
441
445
|
|
|
442
|
-
|
|
443
446
|
args = {:name =>"#{gene}:#{original}#{position}#{snp} #{original_name} chromosome_nonspecific all #{@snp_type} #{chromosome}", :left_pos => pr.snp_pos, :sequence=>seq_original}
|
|
444
447
|
primer_3_propertes << return_primer_3_string(args)
|
|
445
448
|
args[:name] = "#{gene}:#{original}#{position}#{snp} #{snp_in} chromosome_nonspecific all #{@snp_type} #{chromosome}"
|
|
446
449
|
args[:sequence] = seq_snp
|
|
447
450
|
primer_3_propertes << return_primer_3_string(args)
|
|
448
|
-
|
|
449
|
-
|
|
450
451
|
primer_3_propertes
|
|
451
452
|
end
|
|
452
453
|
|
|
@@ -458,8 +459,8 @@ module Bio::PolyploidTools
|
|
|
458
459
|
"#{original}#{position}#{snp}".upcase
|
|
459
460
|
end
|
|
460
461
|
|
|
461
|
-
def primer_3_string(target_chromosome, parental)
|
|
462
|
-
strings = primer_3_all_strings(target_chromosome, parental)
|
|
462
|
+
def primer_3_string(target_chromosome, parental, max_specific_primers: 20)
|
|
463
|
+
strings = primer_3_all_strings(target_chromosome, parental, max_specific_primers: max_specific_primers)
|
|
463
464
|
strings.join
|
|
464
465
|
end
|
|
465
466
|
|
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.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ricardo H. Ramirez-Gonzalez
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-10-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bio
|