bio-polyploid-tools 0.5.2 → 0.6.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 +44 -15
- data/bin/snp_position_to_polymarker.rb +1 -1
- data/bio-polyploid-tools.gemspec +7 -3
- data/lib/bio/PolyploidTools/SNP.rb +8 -2
- data/lib/bio/PolyploidTools/SNPMutant.rb +85 -0
- data/lib/bio/PolyploidTools/SNPSequence.rb +8 -8
- data/lib/bio/db/primer3.rb +139 -108
- data/test/data/IWGSC_CSS_1AL_scaff_1455974.fa +112 -0
- data/test/data/IWGSC_CSS_1AL_scaff_1455974_aln_contigs.fa +2304 -0
- data/test/data/test_from_mutant.csv +3 -0
- data/test/test_snp_parsing.rb +27 -0
- metadata +6 -2
data/test/test_snp_parsing.rb
CHANGED
@@ -10,6 +10,7 @@ class TestPolyploidTools < Test::Unit::TestCase
|
|
10
10
|
|
11
11
|
#Set up the paths
|
12
12
|
def setup
|
13
|
+
@data = File.expand_path(File.dirname(__FILE__) + "/data")
|
13
14
|
|
14
15
|
end
|
15
16
|
|
@@ -37,5 +38,31 @@ class TestPolyploidTools < Test::Unit::TestCase
|
|
37
38
|
assert(snp.template_sequence == "CGAAGCGATCCTACTACATTGCGTTCCTTTCCCACTCCCAGGTCCCCCTAYATGCAGGATCTTGATTAGTCGTGTGAACAACTGAAATTTGAGCGCCACAA", "#{snp.template_sequence}!=CGAAGCGATCCTACTACATTGCGTTCCTTTCCCACTCCCAGGTCCCCCTAYATGCAGGATCTTGATTAGTCGTGTGAACAACTGAAATTTGAGCGCCACAA")
|
38
39
|
#true
|
39
40
|
end
|
41
|
+
|
42
|
+
def test_mutant_snp
|
43
|
+
|
44
|
+
ref=@data + "/IWGSC_CSS_1AL_scaff_1455974_aln_contigs.fa"
|
45
|
+
|
46
|
+
fasta_reference_db = Bio::DB::Fasta::FastaFile.new({:fasta=>ref})
|
47
|
+
fasta_reference_db.load_fai_entries
|
48
|
+
|
49
|
+
snp = Bio::PolyploidTools::SNPMutant.parse("IWGSC_CSS_1AL_scaff_1455974,Kronos2281,127,C,T")
|
50
|
+
assert_equal(snp.gene , "1AL_1455974_Kronos2281_127", "The original name was not parsed: #{snp.gene}")
|
51
|
+
assert_equal(snp.contig, "IWGSC_CSS_1AL_scaff_1455974")
|
52
|
+
assert_equal(snp.chromosome, "1A", "The chromosome wasnt parsed: #{snp.chromosome}")
|
53
|
+
assert_equal(snp.position, 127, "The position is not parsed: #{snp.position}")
|
54
|
+
|
55
|
+
region = fasta_reference_db.index.region_for_entry(snp.contig).get_full_region
|
56
|
+
snp.full_sequence = fasta_reference_db.fetch_sequence(region)
|
57
|
+
|
58
|
+
assert_equal(snp.template_sequence, "actcgatcgtcagcacccgctggaacttggggaacgtcttgaacgccgcaagcaccggggcgtcctctgactgtatgagcacgcgctgcttacaggtctcYttgtcgtacccggacttgacaagcgctttggagaccgcatccaccacgtcaaggcttctggctataaggtacgtagcatgctgcactcggtaggtacaaga")
|
59
|
+
assert_equal(snp.sequence_original, "actcgatcgtcagcacccgctggaacttggggaacgtcttgaacgccgcaagcaccggggcgtcctctgactgtatgagcacgcgctgcttacaggtctc[C/T]ttgtcgtacccggacttgacaagcgctttggagaccgcatccaccacgtcaaggcttctggctataaggtacgtagcatgctgcactcggtaggtacaaga")
|
60
|
+
assert_equal(snp.position, 101)
|
61
|
+
assert_equal(snp.original, "C")
|
62
|
+
assert_equal(snp.snp, "T")
|
63
|
+
|
64
|
+
|
65
|
+
end
|
66
|
+
|
40
67
|
|
41
68
|
end
|
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
|
+
version: 0.6.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:
|
11
|
+
date: 2015-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bio
|
@@ -162,6 +162,7 @@ files:
|
|
162
162
|
- lib/bio/PolyploidTools/Marker.rb
|
163
163
|
- lib/bio/PolyploidTools/PrimerRegion.rb
|
164
164
|
- lib/bio/PolyploidTools/SNP.rb
|
165
|
+
- lib/bio/PolyploidTools/SNPMutant.rb
|
165
166
|
- lib/bio/PolyploidTools/SNPSequence.rb
|
166
167
|
- lib/bio/db/exonerate.rb
|
167
168
|
- lib/bio/db/primer3.rb
|
@@ -172,6 +173,8 @@ files:
|
|
172
173
|
- test/data/BS00068396_51_contigs.fa
|
173
174
|
- test/data/BS00068396_51_exonerate.tab
|
174
175
|
- test/data/BS00068396_51_genes.txt
|
176
|
+
- test/data/IWGSC_CSS_1AL_scaff_1455974.fa
|
177
|
+
- test/data/IWGSC_CSS_1AL_scaff_1455974_aln_contigs.fa
|
175
178
|
- test/data/LIB1716.bam
|
176
179
|
- test/data/LIB1716.bam.bai
|
177
180
|
- test/data/LIB1719.bam
|
@@ -192,6 +195,7 @@ files:
|
|
192
195
|
- test/data/patological_cases5D.csv
|
193
196
|
- test/data/primer_3_input_header_test
|
194
197
|
- test/data/short_primer_design_test.csv
|
198
|
+
- test/data/test_from_mutant.csv
|
195
199
|
- test/data/test_iselect.csv
|
196
200
|
- test/data/test_iselect_reference.fa
|
197
201
|
- test/data/test_iselect_reference.fa.fai
|