bio-samtools 0.4.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -0
- data/README.rdoc +1 -0
- data/VERSION +1 -1
- data/bio-samtools.gemspec +19 -19
- data/doc/Bio.html +71 -4
- data/doc/Bio/DB.html +6 -4
- data/doc/Bio/DB/Alignment.html +8 -8
- data/doc/Bio/DB/Pileup.html +515 -0
- data/doc/Bio/DB/SAM.html +37 -37
- data/doc/Bio/DB/SAM/Library.html +4 -4
- data/doc/Bio/DB/SAM/Tools.html +4 -4
- data/doc/Bio/DB/SAM/Tools/Bam1CoreT.html +4 -4
- data/doc/Bio/DB/SAM/Tools/Bam1T.html +4 -4
- data/doc/Bio/DB/SAM/Tools/BamHeaderT.html +4 -4
- data/doc/Bio/DB/SAM/Tools/BamPileup1T.html +4 -4
- data/doc/Bio/DB/SAM/Tools/SamfileT.html +4 -4
- data/doc/Bio/DB/SAM/Tools/SamfileTX.html +4 -4
- data/doc/Bio/DB/SAMException.html +5 -5
- data/doc/Bio/DB/Tag.html +5 -5
- data/doc/Bio/DB/Vcf.html +467 -0
- data/doc/LICENSE_txt.html +57 -60
- data/doc/LibC.html +6 -4
- data/doc/created.rid +7 -7
- data/doc/index.html +4 -4
- data/doc/js/search_index.js +1 -1
- data/doc/lib/bio-samtools_rb.html +4 -4
- data/doc/lib/bio/db/pileup_rb.html +171 -0
- data/doc/lib/bio/db/sam/bam_rb.html +4 -4
- data/doc/lib/bio/db/sam/faidx_rb.html +4 -4
- data/doc/lib/bio/db/sam/library_rb.html +4 -4
- data/doc/lib/bio/db/sam/sam_rb.html +4 -4
- data/doc/lib/bio/db/sam_rb.html +4 -4
- data/doc/lib/bio/db/vcf_rb.html +124 -0
- data/doc/table_of_contents.html +16 -26
- data/doc/tutorial.html +26 -1
- data/doc/tutorial.pdf +0 -0
- data/lib/bio/db/{sam/pileup.rb → pileup.rb} +6 -4
- data/lib/bio/db/sam.rb +13 -12
- data/lib/bio/db/{sam/vcf.rb → vcf.rb} +6 -2
- data/test/samples/small/sorted.bam.bai +0 -0
- data/test/test_basic.rb +7 -5
- data/test/test_vcf.rb +5 -5
- metadata +29 -26
- data/test/basictest.rb +0 -322
- data/test/pileup.rb +0 -68
data/test/pileup.rb
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
$: << File.expand_path(File.dirname(__FILE__) + '/../lib')
|
2
|
-
$: << File.expand_path('.')
|
3
|
-
|
4
|
-
require "bio/db/sam/pileup"
|
5
|
-
require "test/unit"
|
6
|
-
|
7
|
-
class TestPileup < Test::Unit::TestCase
|
8
|
-
|
9
|
-
def setup
|
10
|
-
@six_col = Pileup.new("seq1\t272\tT\t24\t,.$.....,,.,.,...,,,.,..^+.\t<<<+;<<<<<<<<<<<=<;<;7<&")
|
11
|
-
@ten_col = Pileup.new("seq2\t151\tG\tG\t36\t0\t99\t12\t...........A\t:9<;;7=<<<<<")
|
12
|
-
@snp = Pileup.new("seq1\t272\tT\t24\t,.$.....,,.gGgGgGgGgGgGg^+.\t<<<+;<<<<<<<<<<<=<;<;7<&")
|
13
|
-
@snp_2 = Pileup.new("seq1\t272\tT\t24\t......aaaaaaggggggcccccc$^+\t<<<+;<<<<<<<<<<<=<;<;7<&")
|
14
|
-
@snp_3 = Pileup.new("seq1\t272\tT\t24\t......aaaaaaaagggggccccc$^+\t<<<+;<<<<<<<<<<<=<;<;7<&")
|
15
|
-
end
|
16
|
-
|
17
|
-
def test_new_from_6_column
|
18
|
-
assert_equal("seq1", @six_col.ref_name)
|
19
|
-
assert_equal(272, @six_col.pos)
|
20
|
-
assert_equal("T", @six_col.ref_base)
|
21
|
-
assert_equal(24, @six_col.coverage)
|
22
|
-
assert_equal(",.$.....,,.,.,...,,,.,..^+.", @six_col.read_bases)
|
23
|
-
assert_equal("<<<+;<<<<<<<<<<<=<;<;7<&", @six_col.read_quals)
|
24
|
-
end
|
25
|
-
|
26
|
-
def test_new_from_10_column
|
27
|
-
assert_equal("seq2", @ten_col.ref_name)
|
28
|
-
assert_equal(151, @ten_col.pos)
|
29
|
-
assert_equal("G", @ten_col.ref_base)
|
30
|
-
assert_equal("G", @ten_col.consensus)
|
31
|
-
assert_equal(36, @ten_col.consensus_quality)
|
32
|
-
assert_equal(0, @ten_col.snp_quality)
|
33
|
-
assert_equal(99, @ten_col.rms_mapq)
|
34
|
-
assert_equal(12, @ten_col.coverage)
|
35
|
-
assert_equal("...........A", @ten_col.read_bases)
|
36
|
-
assert_equal(":9<;;7=<<<<<", @ten_col.read_quals)
|
37
|
-
end
|
38
|
-
|
39
|
-
def test_non_refs
|
40
|
-
assert_equal({:A => 1, :C => 0, :T => 0, :G => 0}, @ten_col.non_refs)
|
41
|
-
assert_equal({:A => 0, :C => 0, :T => 0, :G => 0}, @six_col.non_refs)
|
42
|
-
end
|
43
|
-
|
44
|
-
def test_consensus
|
45
|
-
assert_equal("G", @snp.consensus)
|
46
|
-
assert_equal("ACGT", @snp_2.consensus)
|
47
|
-
assert_equal("A", @snp_3.consensus)
|
48
|
-
end
|
49
|
-
|
50
|
-
def test_non_ref_count
|
51
|
-
assert_equal(13,@snp.non_ref_count)
|
52
|
-
assert_equal(18,@snp_2.non_ref_count)
|
53
|
-
assert_equal(18,@snp_3.non_ref_count)
|
54
|
-
end
|
55
|
-
|
56
|
-
def test_ref_count
|
57
|
-
assert_equal(11,@snp.ref_count)
|
58
|
-
assert_equal(6,@snp_2.ref_count)
|
59
|
-
assert_equal(6,@snp_3.ref_count)
|
60
|
-
end
|
61
|
-
|
62
|
-
def test_ref_plus_non_ref_equal_to_coverage
|
63
|
-
assert_equal(@snp.coverage,@snp.ref_count + @snp.non_ref_count)
|
64
|
-
assert_equal(@snp_2.coverage,@snp_2.ref_count + @snp_2.non_ref_count)
|
65
|
-
assert_equal(@snp_3.coverage,@snp_3.ref_count + @snp_3.non_ref_count)
|
66
|
-
end
|
67
|
-
|
68
|
-
end
|