bio-polyploid-tools 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/bin/filter_blat_by_target_coverage.rb +59 -5
- data/bin/find_best_blat_hit.rb +2 -1
- data/bio-polyploid-tools.gemspec +3 -3
- data/lib/bio/PolyploidTools/ExonContainer.rb +3 -1
- data/lib/bio/PolyploidTools/SNP.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e18c33d6f59147dfc491ff461b64d29a8633f1d2
|
4
|
+
data.tar.gz: 715a7c85a2543040aac59aa877df1af68fb9eac9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1fffb8d0e4a70d30632f9db81a51c5292f7867d3e64f66f468a9875b3336885b3952bb3fbb701ba4470d9e5bab66fd43638565c0f83540d7937f0e1100f5bb7
|
7
|
+
data.tar.gz: 4938c8487632b74f53778b695cc896d3bcf542e1a9e92eca24076b2d6b6fbe3744c18df1258bee751a0d5491d7d6cc99120b2429d0c597fe53c7cec387dbf288
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.3
|
@@ -1,15 +1,69 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'bio'
|
3
|
+
require 'optparse'
|
3
4
|
$: << File.expand_path(File.dirname(__FILE__) + '/../lib')
|
4
5
|
$: << File.expand_path('.')
|
5
6
|
path= File.expand_path(File.dirname(__FILE__) + '/../lib/bioruby-polyploid-tools.rb')
|
6
7
|
require path
|
8
|
+
module Bio
|
9
|
+
class Blat
|
10
|
+
class StreamedReport < Report
|
7
11
|
|
8
|
-
|
12
|
+
def self.each_hit(text = '')
|
13
|
+
flag = false
|
14
|
+
head = []
|
9
15
|
|
10
|
-
|
11
|
-
|
12
|
-
|
16
|
+
text.each_line do |line|
|
17
|
+
if flag then
|
18
|
+
yield Hit.new(line)
|
19
|
+
else
|
20
|
+
# for headerless data
|
21
|
+
if /^\d/ =~ line then
|
22
|
+
flag = true
|
23
|
+
redo
|
24
|
+
end
|
25
|
+
line = line.chomp
|
26
|
+
if /\A\-+\s*\z/ =~ line
|
27
|
+
flag = true
|
28
|
+
else
|
29
|
+
head << line
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
#blat_file=ARGV[0]
|
40
|
+
|
41
|
+
options = {}
|
42
|
+
options[:identity] = 95
|
43
|
+
options[:covered] = 60
|
44
|
+
OptionParser.new do |opts|
|
45
|
+
|
46
|
+
opts.banner = "Usage: polymarker.rb [options]"
|
47
|
+
|
48
|
+
opts.on("-p", "--psl FILE", "PSL file") do |o|
|
49
|
+
options[:blat_file] = o.upcase
|
50
|
+
end
|
51
|
+
opts.on("-i", "--identity FLOAT", "Minimum percentage identity") do |o|
|
52
|
+
options[:identity] = o.to_f
|
53
|
+
end
|
54
|
+
opts.on("-c", "--covered FLOAT", "Minimum percentage coverage") do |o|
|
55
|
+
options[:covered] = o.to_f
|
56
|
+
end
|
57
|
+
|
58
|
+
end.parse!
|
59
|
+
|
60
|
+
|
61
|
+
blat_file = options[:blat_file]
|
62
|
+
|
63
|
+
Bio::Blat::StreamedReport.each_hit(Bio::FlatFile.open(blat_file).to_io) do |hit|
|
64
|
+
if hit.percentage_covered >= options[:covered] and hit.percent_identity >= options[:identity]
|
13
65
|
puts hit.data.join("\t")
|
14
66
|
end
|
15
|
-
end
|
67
|
+
end
|
68
|
+
|
69
|
+
|
data/bin/find_best_blat_hit.rb
CHANGED
data/bio-polyploid-tools.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: bio-polyploid-tools 0.4.
|
5
|
+
# stub: bio-polyploid-tools 0.4.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "bio-polyploid-tools"
|
9
|
-
s.version = "0.4.
|
9
|
+
s.version = "0.4.3"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Ricardo H. Ramirez-Gonzalez"]
|
14
|
-
s.date = "2014-
|
14
|
+
s.date = "2014-10-04"
|
15
15
|
s.description = "Repository of tools developed in TGAC and Crop Genetics in JIC to work with polyploid wheat"
|
16
16
|
s.email = "ricardo.ramirez-gonzalez@tgac.ac.uk"
|
17
17
|
s.executables = ["bfr.rb", "count_variations.rb", "filter_blat_by_target_coverage.rb", "find_best_blat_hit.rb", "find_best_exonerate.rb", "hexaploid_primers.rb", "homokaryot_primers.rb", "map_markers_to_contigs.rb", "markers_in_region.rb", "polymarker.rb", "snp_position_to_polymarker.rb", "snps_between_bams.rb"]
|
@@ -128,6 +128,7 @@ module Bio::PolyploidTools
|
|
128
128
|
|
129
129
|
def print_primer_3_exons (file, target_chromosome , parental )
|
130
130
|
added = 0
|
131
|
+
|
131
132
|
@snp_map.each do | gene, snp_array|
|
132
133
|
snp_array.each do |snp|
|
133
134
|
string = ""
|
@@ -140,7 +141,8 @@ module Bio::PolyploidTools
|
|
140
141
|
end
|
141
142
|
rescue Exception=>e
|
142
143
|
@missing_exons << snp.to_s
|
143
|
-
|
144
|
+
|
145
|
+
$stderr.puts e.to_s
|
144
146
|
end
|
145
147
|
end
|
146
148
|
end
|
@@ -288,7 +288,7 @@ module Bio::PolyploidTools
|
|
288
288
|
primer_3_propertes = Array.new
|
289
289
|
|
290
290
|
seq_original = String.new(pr.sequence)
|
291
|
-
|
291
|
+
#puts seq_original.size.to_s << "-" << primer_3_min_seq_length.to_s
|
292
292
|
return primer_3_propertes if seq_original.size < primer_3_min_seq_length
|
293
293
|
seq_original[pr.snp_pos] = self.original
|
294
294
|
seq_original_reverse = reverse_complement_string(seq_original)
|
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.4.
|
4
|
+
version: 0.4.3
|
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: 2014-
|
11
|
+
date: 2014-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bio
|