bio-polyploid-tools 0.8.4 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/VERSION +1 -1
- data/bin/blast_triads.rb +3 -3
- data/bin/polymarker.rb +57 -52
- data/bio-polyploid-tools.gemspec +5 -3
- data/lib/bio/PolyploidTools/ExonContainer.rb +20 -1
- data/lib/bio/PolyploidTools/SNP.rb +16 -4
- data/lib/bio/db/blast.rb +3 -1
- data/lib/bio/db/primer3.rb +7 -4
- data/test/data/chr4D_C14473543T/chr4D_C14473543T.csv +1 -0
- data/test/data/chr4D_C14473543T/chr4D_C14473543T.fa +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f13bb3db0a9396fa0468962dd23f34a771c6772a613f873dd3728cb47f66204
|
4
|
+
data.tar.gz: d5427afc0216c123131894858aeb8d8ddd0eed53c47b4e47d4b34e63d67af1f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '01730361649ede299bc462eda6e9f92c7882aa13ee98033f5276268971efd7a7c03d617ecd089276d2c296e0ff842bd51395839f9134626a6f2bfd7b31840b58'
|
7
|
+
data.tar.gz: 24c571c5a9318bdd56d8cac17ba008e5b3c22877042bba1198e2d0d9dcbe4b32e330f0963696eca7cd820620166a81a62b8cfa0c0dccb51a34e9370d11bd3bea
|
data/README.md
CHANGED
@@ -128,6 +128,12 @@ To use blast instead of exonerate, use the following command:
|
|
128
128
|
|
129
129
|
## Release Notes
|
130
130
|
|
131
|
+
### Next release
|
132
|
+
|
133
|
+
### 0.8.5
|
134
|
+
|
135
|
+
* Added the option ```--max_hits``` to ```polyamarker.rb``` to set a maximum number of bast hits to identify repetitive regions. This adds the column ```is_repetitve``` to the output. The mask is not calculated in repetitive regions and the primers are designed as non-specific.
|
136
|
+
|
131
137
|
### 0.8.4
|
132
138
|
|
133
139
|
* Added script ```tag_stats.rb`` That gets the descriptive statistics for a tag in a bam file for each reference.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.5
|
data/bin/blast_triads.rb
CHANGED
@@ -144,7 +144,7 @@ CSV.foreach(options[:triads], headers:true ) do |row|
|
|
144
144
|
FileUtils.cp(b_tmp, save_folder) if seq_b
|
145
145
|
FileUtils.cp(d_tmp, save_folder) if seq_d
|
146
146
|
end
|
147
|
-
|
147
|
+
#This had a bug where the columns where always "AB"
|
148
148
|
if seq_a and seq_b
|
149
149
|
to_print = [triad, a, b , "A","B","A->B"]
|
150
150
|
to_print << blast_pair_fast(a_tmp, b_tmp, out_tmp, program:options[:program])
|
@@ -152,13 +152,13 @@ CSV.foreach(options[:triads], headers:true ) do |row|
|
|
152
152
|
puts to_print.join("\t")
|
153
153
|
end
|
154
154
|
if seq_a and seq_d
|
155
|
-
to_print = [triad, a,
|
155
|
+
to_print = [triad, a, d , "A","D","A->D"]
|
156
156
|
to_print << blast_pair_fast(a_tmp, d_tmp, out_tmp, program:options[:program])
|
157
157
|
puts to_print.join("\t")
|
158
158
|
FileUtils.cp(out_tmp, "#{save_folder}/A_D.xml") if save
|
159
159
|
end
|
160
160
|
if seq_b and seq_d
|
161
|
-
to_print = [triad,
|
161
|
+
to_print = [triad, b, d , "B","D","B->D"]
|
162
162
|
to_print << blast_pair_fast(b_tmp, d_tmp, out_tmp, program:options[:program])
|
163
163
|
FileUtils.cp(out_tmp, "#{save_folder}/B_D.xml") if save
|
164
164
|
puts to_print.join("\t")
|
data/bin/polymarker.rb
CHANGED
@@ -39,6 +39,7 @@ options[:min_identity] = 90
|
|
39
39
|
options[:scoring] = :genome_specific
|
40
40
|
options[:database] = false
|
41
41
|
options[:filter_best] = false
|
42
|
+
options[:max_hits] = 10
|
42
43
|
options[:aligner] = :exonerate
|
43
44
|
|
44
45
|
|
@@ -57,68 +58,70 @@ options[:primer_3_preferences] = {
|
|
57
58
|
OptionParser.new do |opts|
|
58
59
|
opts.banner = "Usage: polymarker.rb [options]"
|
59
60
|
|
61
|
+
opts.on("-a", "--arm_selection #{Bio::PolyploidTools::ChromosomeArm.getValidFunctions.join('|')}", "Function to decide the chromome arm") do |o|
|
62
|
+
tmp_str = o
|
63
|
+
arr = o.split(",")
|
64
|
+
if arr.size == 2
|
65
|
+
options[:arm_selection] = lambda do |contig_name|
|
66
|
+
separator, field = arr
|
67
|
+
field = field.to_i
|
68
|
+
ret = contig_name.split(separator)[field]
|
69
|
+
return ret
|
70
|
+
end
|
71
|
+
else
|
72
|
+
options[:arm_selection] = Bio::PolyploidTools::ChromosomeArm.getArmSelection(o)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
opts.on("-b", "--filter_best", "If set, only keep the best alignment for each chromosome") do
|
77
|
+
options[:filter_best] = true
|
78
|
+
end
|
79
|
+
|
60
80
|
opts.on("-c", "--contigs FILE", "File with contigs to use as database") do |o|
|
61
81
|
options[:path_to_contigs] = o
|
62
82
|
end
|
63
83
|
|
64
|
-
opts.on("-
|
65
|
-
options[:
|
84
|
+
opts.on("-d", "--database PREFIX", "Path to the blast database. Only used if the aligner is blast. The default is the name of the contigs file without extension.") do |o|
|
85
|
+
options[:database] = o
|
86
|
+
end
|
87
|
+
|
88
|
+
opts.on("-e", "--exonerate_model MODEL", "Model to be used in exonerate to search for the contigs") do |o|
|
89
|
+
options[:model] = o
|
66
90
|
end
|
67
91
|
|
68
92
|
opts.on("-g", "--genomes_count INT", "Number of genomes (default 3, for hexaploid)") do |o|
|
69
93
|
options[:genomes_count] = o.to_i
|
70
94
|
end
|
71
|
-
|
72
|
-
opts.on("-b", "--filter_best", "If set, only keep the best alignment for each chromosome") do
|
73
|
-
options[:filter_best] = true
|
74
|
-
end
|
75
95
|
|
76
|
-
|
77
|
-
|
78
|
-
options[:snp_list] = o
|
96
|
+
opts.on("-i", "--min_identity INT", "Minimum identity to consider a hit (default 90)") do |o|
|
97
|
+
options[:min_identity] = o.to_i
|
79
98
|
end
|
80
99
|
|
81
|
-
opts.on("-
|
82
|
-
|
83
|
-
options[:mutant_list] = o
|
84
|
-
end
|
85
|
-
|
86
|
-
opts.on("-r", "--reference FILE", "Fasta file with the sequence for the markers (to complement --snp_list)") do |o|
|
87
|
-
options[:reference] = o
|
100
|
+
opts.on("-m", "--marker_list FILE", "File with the list of markers to search from") do |o|
|
101
|
+
options[:marker_list] = o
|
88
102
|
end
|
89
103
|
|
90
|
-
opts.on("-i", "--min_identity INT", "Minimum identity to consider a hit (default 90)") do |o|
|
91
|
-
options[:min_identity] = o.to_i
|
92
|
-
end
|
93
|
-
|
94
104
|
opts.on("-o", "--output FOLDER", "Output folder") do |o|
|
95
105
|
options[:output_folder] = o
|
96
106
|
end
|
97
|
-
|
98
|
-
opts.on("-e", "--exonerate_model MODEL", "Model to be used in exonerate to search for the contigs") do |o|
|
99
|
-
options[:model] = o
|
100
|
-
end
|
101
|
-
|
102
|
-
opts.on("-a", "--arm_selection #{Bio::PolyploidTools::ChromosomeArm.getValidFunctions.join('|')}", "Function to decide the chromome arm") do |o|
|
103
|
-
tmp_str = o
|
104
|
-
arr = o.split(",")
|
105
|
-
if arr.size == 2
|
106
|
-
options[:arm_selection] = lambda do |contig_name|
|
107
|
-
separator, field = arr
|
108
|
-
field = field.to_i
|
109
|
-
ret = contig_name.split(separator)[field]
|
110
|
-
return ret
|
111
|
-
end
|
112
|
-
else
|
113
|
-
options[:arm_selection] = Bio::PolyploidTools::ChromosomeArm.getArmSelection(o)
|
114
|
-
end
|
115
107
|
|
116
|
-
end
|
117
|
-
|
118
108
|
opts.on("-p", "--primer_3_preferences FILE", "file with preferences to be sent to primer3") do |o|
|
119
109
|
options[:primer_3_preferences] = Bio::DB::Primer3.read_primer_preferences(o, options[:primer_3_preferences] )
|
120
110
|
end
|
121
111
|
|
112
|
+
opts.on("-r", "--reference FILE", "Fasta file with the sequence for the markers (to complement --snp_list)") do |o|
|
113
|
+
options[:reference] = o
|
114
|
+
end
|
115
|
+
|
116
|
+
opts.on("-s", "--snp_list FILE", "File with the list of snps to search from, requires --reference to get the sequence using a position") do |o|
|
117
|
+
options[:snp_list] = o
|
118
|
+
end
|
119
|
+
|
120
|
+
opts.on("-t", "--mutant_list FILE", "File with the list of positions with mutation and the mutation line.\n\
|
121
|
+
requires --reference to get the sequence using a position") do |o|
|
122
|
+
options[:mutant_list] = o
|
123
|
+
end
|
124
|
+
|
122
125
|
opts.on("-v", "--variation_free_region INT", "If present, avoid generating the common primer if there are homoeologous SNPs within the specified distance") do |o|
|
123
126
|
options[:variation_free_region] = o.to_i
|
124
127
|
end
|
@@ -127,23 +130,24 @@ OptionParser.new do |opts|
|
|
127
130
|
options[:extract_found_contigs] = true
|
128
131
|
end
|
129
132
|
|
130
|
-
opts.on("-
|
131
|
-
|
132
|
-
options[:
|
133
|
+
opts.on("-A", "--aligner exonerate|blast", "Select the aligner to use. Default: exonerate") do |o|
|
134
|
+
raise "Invalid aligner" unless o == "exonerate" or o == "blast"
|
135
|
+
options[:aligner] = o.to_sym
|
133
136
|
end
|
134
137
|
|
135
138
|
opts.on("-H", "--het_dels", "If present, change the scoring to give priority to: semi-specific, specific, non-specific") do
|
136
139
|
options[:scoring] = :het_dels
|
137
140
|
end
|
138
141
|
|
139
|
-
opts.on("-
|
140
|
-
|
141
|
-
options[:aligner] = o.to_sym
|
142
|
+
opts.on("-M", "--max_hits INT", "Maximum number of hits to consider a region as non repetitive. Markers with more than this number of hits will be ignored. (default #{options[:max_hits]})") do |o|
|
143
|
+
options[:max_hits] = o.to_i
|
142
144
|
end
|
143
145
|
|
144
|
-
opts.on("-
|
145
|
-
|
146
|
+
opts.on("-P", "--primers_to_order", "If present, save a separate file with the primers with the KASP tails")do
|
147
|
+
#TODO: have a string with the tails, optional.
|
148
|
+
options[:primers_to_order] = true
|
146
149
|
end
|
150
|
+
|
147
151
|
end.parse!
|
148
152
|
|
149
153
|
|
@@ -308,7 +312,7 @@ def do_align(aln, exo_f, found_contigs, min_identity,fasta_file,options)
|
|
308
312
|
|
309
313
|
end
|
310
314
|
|
311
|
-
Bio::DB::Blast.align({:query=>temp_fasta_query, :target=>options[:database], :model=>model}) do |aln|
|
315
|
+
Bio::DB::Blast.align({:max_hits=>options[:max_hits], :query=>temp_fasta_query, :target=>options[:database], :model=>model}) do |aln|
|
312
316
|
do_align(aln, exo_f, found_contigs,min_identity, fasta_file,options)
|
313
317
|
end if options[:aligner] == :blast
|
314
318
|
|
@@ -329,8 +333,9 @@ contigs_f.close() if options[:extract_found_contigs]
|
|
329
333
|
write_status "Reading best alignment on each chromosome"
|
330
334
|
|
331
335
|
|
332
|
-
container= Bio::PolyploidTools::ExonContainer.new
|
333
|
-
container.flanking_size=options[:flanking_size]
|
336
|
+
container = Bio::PolyploidTools::ExonContainer.new
|
337
|
+
container.flanking_size = options[:flanking_size]
|
338
|
+
container.max_hits = options[:max_hits]
|
334
339
|
container.gene_models(temp_fasta_query)
|
335
340
|
container.chromosomes(target)
|
336
341
|
container.add_parental({:name=>snp_in})
|
@@ -387,7 +392,7 @@ snps.each do |snp|
|
|
387
392
|
end
|
388
393
|
|
389
394
|
kasp_container.add_primers_file(primer_3_output) if added_exons > 0
|
390
|
-
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"
|
395
|
+
header = "Marker,SNP,RegionSize,chromosome,total_contigs,contig_regions,is_repetitive,SNP_type,#{original_name},#{snp_in},common,primer_type,orientation,#{original_name}_TM,#{snp_in}_TM,common_TM,selected_from,product_size,errors"
|
391
396
|
File.open(output_primers, 'w') { |f| f.write("#{header}\n#{kasp_container.print_primers}") }
|
392
397
|
|
393
398
|
File.open(output_to_order, "w") { |io| io.write(kasp_container.print_primers_with_tails()) }
|
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 0.8.
|
5
|
+
# stub: bio-polyploid-tools 0.8.5 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "bio-polyploid-tools".freeze
|
9
|
-
s.version = "0.8.
|
9
|
+
s.version = "0.8.5"
|
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-
|
14
|
+
s.date = "2018-07-31"
|
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]
|
@@ -151,6 +151,8 @@ Gem::Specification.new do |s|
|
|
151
151
|
"test/data/Test3Aspecific.csv",
|
152
152
|
"test/data/Test3Aspecific_contigs.fa",
|
153
153
|
"test/data/bfr_out_test.csv",
|
154
|
+
"test/data/chr4D_C14473543T/chr4D_C14473543T.csv",
|
155
|
+
"test/data/chr4D_C14473543T/chr4D_C14473543T.fa",
|
154
156
|
"test/data/headerMergeed.txt",
|
155
157
|
"test/data/headerS2238015",
|
156
158
|
"test/data/mergedLibs.bam",
|
@@ -5,7 +5,7 @@ module Bio::PolyploidTools
|
|
5
5
|
attr_reader :parental_1_name, :parental_2_name, :gene_models_db
|
6
6
|
attr_reader :chromosomes, :snp_map
|
7
7
|
attr_reader :parents
|
8
|
-
attr_accessor :flanking_size , :primer_3_min_seq_length
|
8
|
+
attr_accessor :flanking_size , :primer_3_min_seq_length, :max_hits
|
9
9
|
|
10
10
|
BASES = [:A, :C, :G, :T]
|
11
11
|
#Sets the reference file for the gene models
|
@@ -15,6 +15,7 @@ module Bio::PolyploidTools
|
|
15
15
|
@snp_map = Hash.new
|
16
16
|
@snp_contigs
|
17
17
|
@primer_3_min_seq_length = 50
|
18
|
+
@max_hits = 10
|
18
19
|
end
|
19
20
|
|
20
21
|
def gene_models(path)
|
@@ -76,8 +77,11 @@ module Bio::PolyploidTools
|
|
76
77
|
end
|
77
78
|
|
78
79
|
def add_snp(snp)
|
80
|
+
#TODO: add to the snp the maximum number of hits?
|
81
|
+
snp.max_hits = self.max_hits
|
79
82
|
@snp_map[snp.gene] = Array.new unless @snp_map[snp.gene]
|
80
83
|
@snp_map[snp.gene] << snp
|
84
|
+
|
81
85
|
end
|
82
86
|
|
83
87
|
def add_snp_file(filename, chromosome, snp_in, original_name)
|
@@ -157,6 +161,7 @@ module Bio::PolyploidTools
|
|
157
161
|
begin
|
158
162
|
primer_3_min_seq_length
|
159
163
|
string = snp.primer_3_string( snp.chromosome, parental )
|
164
|
+
#TODO: add tan error to the SNP this snp has more than max_hits. Or maybe inside the SNP file.
|
160
165
|
#puts "print_primer_3_exons: #{string.size}"
|
161
166
|
if string.size > 0
|
162
167
|
file.puts string
|
@@ -208,6 +213,20 @@ module Bio::PolyploidTools
|
|
208
213
|
end
|
209
214
|
end
|
210
215
|
end
|
216
|
+
remove_alignments_over_max_hits
|
217
|
+
end
|
218
|
+
|
219
|
+
def remove_alignments_over_max_hits
|
220
|
+
@snp_map.each_pair do | gene, snp_array|
|
221
|
+
snp_array.each do |snp|
|
222
|
+
if snp.exon_list.size > max_hits
|
223
|
+
total_hits = snp.exon_list.size
|
224
|
+
snp.exon_list = {}
|
225
|
+
snp.repetitive = true
|
226
|
+
snp.errors << "The marker is in a repetitive region (#{total_hits} hits to reference)"
|
227
|
+
end
|
228
|
+
end
|
229
|
+
end
|
211
230
|
end
|
212
231
|
|
213
232
|
def add_parental(opts=Hash.new)
|
@@ -15,6 +15,9 @@ module Bio::PolyploidTools
|
|
15
15
|
attr_accessor :primer_3_min_seq_length
|
16
16
|
attr_accessor :chromosome
|
17
17
|
attr_accessor :variation_free_region
|
18
|
+
attr_accessor :max_hits
|
19
|
+
attr_accessor :errors
|
20
|
+
attr_accessor :repetitive
|
18
21
|
|
19
22
|
|
20
23
|
|
@@ -62,7 +65,10 @@ module Bio::PolyploidTools
|
|
62
65
|
@primer_3_min_seq_length = 50
|
63
66
|
@variation_free_region = 0
|
64
67
|
@contig = false
|
68
|
+
@max_hits = 10
|
65
69
|
@exon_list = Hash.new {|hsh, key| hsh[key] = [] }
|
70
|
+
@errors = Array.new
|
71
|
+
@repetitive = false
|
66
72
|
end
|
67
73
|
|
68
74
|
def to_polymarker_coordinates(flanking_size, total:nil)
|
@@ -329,11 +335,17 @@ module Bio::PolyploidTools
|
|
329
335
|
primer_3_propertes = Array.new
|
330
336
|
|
331
337
|
seq_original = String.new(pr.sequence)
|
332
|
-
#puts seq_original.size.to_s << "-" << primer_3_min_seq_length.to_s
|
333
|
-
return primer_3_propertes if seq_original.size < primer_3_min_seq_length
|
334
|
-
#puts self.inspect
|
335
|
-
#puts pr.snp_pos.to_s << "(" << seq_original.length.to_s << ")"
|
336
338
|
|
339
|
+
if seq_original.size < primer_3_min_seq_length
|
340
|
+
errors << "The sequence (#{seq_original.size}) is shorter than #{primer_3_min_seq_length}"
|
341
|
+
return primer_3_propertes
|
342
|
+
end
|
343
|
+
|
344
|
+
if exon_list.size > max_hits
|
345
|
+
errors << "The marker maps to #{exon_list.size} positions (max_hits: #{max_hits}). "
|
346
|
+
repetitive = true
|
347
|
+
return primer_3_propertes
|
348
|
+
end
|
337
349
|
seq_original[pr.snp_pos] = self.original
|
338
350
|
seq_original_reverse = reverse_complement_string(seq_original)
|
339
351
|
|
data/lib/bio/db/blast.rb
CHANGED
@@ -79,7 +79,9 @@ module Bio::DB::Blast
|
|
79
79
|
def self.align(opts={})
|
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]
|
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'"
|
83
85
|
|
84
86
|
status, stdout, stderr = systemu cmdline
|
85
87
|
if status.exitstatus == 0
|
data/lib/bio/db/primer3.rb
CHANGED
@@ -59,6 +59,7 @@ module Bio::DB::Primer3
|
|
59
59
|
attr_accessor :snp_from
|
60
60
|
attr_accessor :regions
|
61
61
|
attr_accessor :primer3_errors
|
62
|
+
attr_accessor :repetitive
|
62
63
|
|
63
64
|
def line_1_name
|
64
65
|
"#{gene}:#{position}#{original}>#{snp} #{line_1}}"
|
@@ -112,7 +113,7 @@ module Bio::DB::Primer3
|
|
112
113
|
left_end = 0
|
113
114
|
right_start = 0
|
114
115
|
right_end = 0
|
115
|
-
total_columns_before_messages=
|
116
|
+
total_columns_before_messages=18
|
116
117
|
#puts "Values in primer3"
|
117
118
|
#puts snp_from.inspect
|
118
119
|
@values = Array.new
|
@@ -123,6 +124,7 @@ module Bio::DB::Primer3
|
|
123
124
|
@values << snp_from.chromosome
|
124
125
|
@values << regions.size
|
125
126
|
@values << regions.join("|")
|
127
|
+
@values << repetitive
|
126
128
|
if primer3_line_1 and primer3_line_2
|
127
129
|
@values << primer3_line_1.polymorphism
|
128
130
|
|
@@ -655,8 +657,7 @@ module Bio::DB::Primer3
|
|
655
657
|
@values = Hash.new
|
656
658
|
end
|
657
659
|
|
658
|
-
def method_missing(m, *args, &block)
|
659
|
-
|
660
|
+
def method_missing(m, *args, &block)
|
660
661
|
return @values[m.to_s] if @values[m.to_s] != nil
|
661
662
|
raise NoMethodError.new(), "There's no method called #{m}, available: #{@values.keys.to_s}."
|
662
663
|
end
|
@@ -754,13 +755,15 @@ module Bio::DB::Primer3
|
|
754
755
|
end
|
755
756
|
|
756
757
|
def add_snp(snp_in)
|
758
|
+
#TODO: Here we need to also copy the errors that will be printed.
|
757
759
|
@snp_hash=Hash.new unless @snp_hash
|
758
760
|
snp = SNP.new
|
759
761
|
snp.gene = snp_in.gene
|
760
762
|
snp.original = snp_in.original
|
761
|
-
|
763
|
+
snp.primer3_errors = Set.new snp_in.errors
|
762
764
|
snp.position = snp_in.position
|
763
765
|
snp.snp = snp_in.snp
|
766
|
+
snp.repetitive = snp_in.repetitive
|
764
767
|
|
765
768
|
snp.line_1 = @line_1
|
766
769
|
snp.line_2 = @line_2
|
@@ -0,0 +1 @@
|
|
1
|
+
Chr4D_C14473543T,4D,AACCAGTGTAAACCTTGTGTCCCTTGTTCTTCGGGCTCGACGCGCTAAGCCTTGAGATCGCGGTTTGGGCGTGAGTTAGGGAAGAGAGAGATCTTCGTGC[C/T]CACCCCAGAGTTCGAACCTTAAGGGTTTTGCCGAAACCCGAAATCCGACAATTGTGATGAAAGTTGAGCTCCTCGGTAGCCTTGACTCCGGGAACAAGCT
|
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.
|
4
|
+
version: 0.8.5
|
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-
|
11
|
+
date: 2018-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bio
|
@@ -271,6 +271,8 @@ files:
|
|
271
271
|
- test/data/Test3Aspecific.csv
|
272
272
|
- test/data/Test3Aspecific_contigs.fa
|
273
273
|
- test/data/bfr_out_test.csv
|
274
|
+
- test/data/chr4D_C14473543T/chr4D_C14473543T.csv
|
275
|
+
- test/data/chr4D_C14473543T/chr4D_C14473543T.fa
|
274
276
|
- test/data/headerMergeed.txt
|
275
277
|
- test/data/headerS2238015
|
276
278
|
- test/data/mergedLibs.bam
|