bio-polyploid-tools 0.8.6 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7119d8a9ed1f4b73077a420a1d67ef3de381a256
4
- data.tar.gz: b9f74e1d597b0d5dbbd53758f5c7b2f4a22e7308
2
+ SHA256:
3
+ metadata.gz: 4d9b4a477900c5cc8e587dbc3257daa7d8db50cf0e3e22ed10d6ca9ad76fec25
4
+ data.tar.gz: 4a3bd8793e963890086f9a6394bb83adf19669ad9f89f8be24c89a6b0bdbd27b
5
5
  SHA512:
6
- metadata.gz: b8c8ec899b07c2b32b17fb2c3313dd57eab1fffa44cf4e4cad57fd985637e310b80a10a9d2f5a326c3493cf584bb2f7485280a3112672d064f4c9a89189bb244
7
- data.tar.gz: 79ffb338f75150e140219e3f16068af9b8401a02336b97398daa1ad7181dfb59d30fc4e61a39ec1435722f362b77e4c338b359ccd28bb384d73f94bc936fb398
6
+ metadata.gz: c92453e975359a130337a46fb752be6e41862e0a78fc3bbc9786ab78f7419b544edd185be828f016c33f5eb9bdcf53ce251c312706f43382679ccd8206ba8f0d
7
+ data.tar.gz: 2a8bf17cb57e117f35642f3447191744768cf2210e5f75ce0f6d82b855b18e6d7434e89179d654d6a6eaccee025e8741b3c8d088a605e52b6e36c78c6fbd9646
data/README.md CHANGED
@@ -128,6 +128,9 @@ To use blast instead of exonerate, use the following command:
128
128
 
129
129
  ## Release Notes
130
130
 
131
+ ### 0.8.7
132
+ * FEATURE: ```polymarker.rb``` now also prints the total number of hits found.
133
+
131
134
  ### 0.8.6
132
135
 
133
136
  * BUGFIX: ```priemr3.rb``` had a regression when adding the repetitive flag to the ```@values``` array. This lead to the wrong order of the columns in the output and possibly other secondary effects.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.6
1
+ 0.8.7
data/bin/polymarker.rb CHANGED
@@ -392,7 +392,7 @@ snps.each do |snp|
392
392
  end
393
393
 
394
394
  kasp_container.add_primers_file(primer_3_output) if added_exons > 0
395
- header = "Marker,SNP,RegionSize,chromosome,total_contigs,contig_regions,SNP_type,#{original_name},#{snp_in},common,primer_type,orientation,#{original_name}_TM,#{snp_in}_TM,common_TM,selected_from,product_size,errors,is_repetitive"
395
+ header = "Marker,SNP,RegionSize,chromosome,total_contigs,contig_regions,SNP_type,#{original_name},#{snp_in},common,primer_type,orientation,#{original_name}_TM,#{snp_in}_TM,common_TM,selected_from,product_size,errors,is_repetitive,hit_count"
396
396
  File.open(output_primers, 'w') { |f| f.write("#{header}\n#{kasp_container.print_primers}") }
397
397
 
398
398
  File.open(output_to_order, "w") { |io| io.write(kasp_container.print_primers_with_tails()) }
@@ -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 0.8.6 ruby lib
5
+ # stub: bio-polyploid-tools 0.8.7 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "bio-polyploid-tools".freeze
9
- s.version = "0.8.6"
9
+ s.version = "0.8.7"
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 = "2018-08-03"
14
+ s.date = "2018-08-07"
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, "find_homoeologue_variations.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, "markers_in_region.rb".freeze, "mask_triads.rb".freeze, "polymarker.rb".freeze, "polymarker_capillary.rb".freeze, "snp_position_to_polymarker.rb".freeze, "snps_between_bams.rb".freeze, "tag_stats.rb".freeze, "vcfLineToTable.rb".freeze]
@@ -179,7 +179,7 @@ Gem::Specification.new do |s|
179
179
  ]
180
180
  s.homepage = "http://github.com/tgac/bioruby-polyploid-tools".freeze
181
181
  s.licenses = ["MIT".freeze]
182
- s.rubygems_version = "2.6.14".freeze
182
+ s.rubygems_version = "2.7.4".freeze
183
183
  s.summary = "Tool to work with polyploids, NGS and molecular biology".freeze
184
184
 
185
185
  if s.respond_to? :specification_version then
@@ -221,6 +221,7 @@ module Bio::PolyploidTools
221
221
  snp_array.each do |snp|
222
222
  if snp.exon_list.size > max_hits
223
223
  total_hits = snp.exon_list.size
224
+ snp.hit_count = total_hits
224
225
  snp.exon_list = {}
225
226
  snp.repetitive = true
226
227
  snp.errors << "The marker is in a repetitive region (#{total_hits} hits to reference)"
@@ -18,6 +18,7 @@ module Bio::PolyploidTools
18
18
  attr_accessor :max_hits
19
19
  attr_accessor :errors
20
20
  attr_accessor :repetitive
21
+ attr_accessor :hit_count
21
22
 
22
23
 
23
24
 
@@ -69,6 +70,7 @@ module Bio::PolyploidTools
69
70
  @exon_list = Hash.new {|hsh, key| hsh[key] = [] }
70
71
  @errors = Array.new
71
72
  @repetitive = false
73
+ @hit_count = 0
72
74
  end
73
75
 
74
76
  def to_polymarker_coordinates(flanking_size, total:nil)
@@ -340,8 +342,9 @@ module Bio::PolyploidTools
340
342
  errors << "The sequence (#{seq_original.size}) is shorter than #{primer_3_min_seq_length}"
341
343
  return primer_3_propertes
342
344
  end
343
-
344
- if exon_list.size > max_hits
345
+ hit_count = exon_list.size
346
+ puts exon_list.inspect
347
+ if hit_count > max_hits
345
348
  errors << "The marker maps to #{exon_list.size} positions (max_hits: #{max_hits}). "
346
349
  repetitive = true
347
350
  return primer_3_propertes
data/lib/bio/db/blast.rb CHANGED
@@ -80,7 +80,7 @@ module Bio::DB::Blast
80
80
  target=opts[:target]
81
81
  query=opts[:query]
82
82
  max_target_seqs = 15
83
- max_target_seqs = opts[:max_hits] + 1 if opts[:max_hits]
83
+ max_target_seqs = opts[:max_hits] * 2 if opts[:max_hits]
84
84
  cmdline = "blastn -max_target_seqs #{max_target_seqs} -query #{query} -db #{target} -outfmt '6 qseqid qstart qend qframe sseqid sstart send sframe score pident qlen slen qseq sseq'"
85
85
 
86
86
  status, stdout, stderr = systemu cmdline
@@ -60,6 +60,7 @@ module Bio::DB::Primer3
60
60
  attr_accessor :regions
61
61
  attr_accessor :primer3_errors
62
62
  attr_accessor :repetitive
63
+ attr_accessor :hit_count
63
64
 
64
65
  def line_1_name
65
66
  "#{gene}:#{position}#{original}>#{snp} #{line_1}}"
@@ -249,6 +250,7 @@ module Bio::DB::Primer3
249
250
  def print_primers
250
251
  to_print = values.dup
251
252
  to_print << @repetitive
253
+ to_print << hit_count
252
254
  to_print.join(",")
253
255
  end
254
256
 
@@ -765,7 +767,8 @@ module Bio::DB::Primer3
765
767
  snp.position = snp_in.position
766
768
  snp.snp = snp_in.snp
767
769
  snp.repetitive = snp_in.repetitive
768
-
770
+ #puts snp_in.inspect
771
+ snp.hit_count = snp_in.hit_count
769
772
  snp.line_1 = @line_1
770
773
  snp.line_2 = @line_2
771
774
  snp.snp_from = snp_in
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: 0.8.6
4
+ version: 0.8.7
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: 2018-08-03 00:00:00.000000000 Z
11
+ date: 2018-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bio
@@ -316,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
316
316
  version: '0'
317
317
  requirements: []
318
318
  rubyforge_project:
319
- rubygems_version: 2.6.14
319
+ rubygems_version: 2.7.4
320
320
  signing_key:
321
321
  specification_version: 4
322
322
  summary: Tool to work with polyploids, NGS and molecular biology