sam 0.0.1 → 0.0.2
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.
- data/lib/sam.rb +11 -9
- metadata +2 -2
data/lib/sam.rb
CHANGED
@@ -7,14 +7,6 @@ public
|
|
7
7
|
parse_line(line) if line != nil
|
8
8
|
end
|
9
9
|
|
10
|
-
def int_or_neg1(x)
|
11
|
-
Integer(x) rescue -1
|
12
|
-
end
|
13
|
-
|
14
|
-
def int_or_raw(x)
|
15
|
-
Integer(x) rescue x
|
16
|
-
end
|
17
|
-
|
18
10
|
def parse_line(line)
|
19
11
|
return false if line[0] == "@"
|
20
12
|
|
@@ -24,7 +16,7 @@ public
|
|
24
16
|
# colnames = %w(1:name 2:flag 3:chr 4:pos 5:mapq 6:cigar 7:mchr 8:mpos 9:insrt 10:seq 11:qual)
|
25
17
|
|
26
18
|
@name = f[0]
|
27
|
-
@flag = f[1]
|
19
|
+
@flag = int_or_raw(f[1])
|
28
20
|
@chrom = f[2]
|
29
21
|
@pos = int_or_neg1(f[3])
|
30
22
|
@mapq = int_or_neg1(f[4])
|
@@ -50,4 +42,14 @@ public
|
|
50
42
|
return true;
|
51
43
|
end
|
52
44
|
|
45
|
+
private
|
46
|
+
|
47
|
+
def int_or_neg1(x)
|
48
|
+
Integer(x) rescue -1
|
49
|
+
end
|
50
|
+
|
51
|
+
def int_or_raw(x)
|
52
|
+
Integer(x) rescue x
|
53
|
+
end
|
54
|
+
|
53
55
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: sam
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jesse Rodriguez
|
@@ -23,7 +23,7 @@ extra_rdoc_files: []
|
|
23
23
|
|
24
24
|
files:
|
25
25
|
- lib/sam.rb
|
26
|
-
homepage:
|
26
|
+
homepage: https://github.com/jesserod/samruby
|
27
27
|
licenses: []
|
28
28
|
|
29
29
|
post_install_message:
|