youandme 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/youandme/raw_data_file_loader.rb +13 -3
- data/lib/youandme/report.md.erb +4 -4
- data/lib/youandme/xhtml-toc.xslt +2 -2
- data/youandme.gemspec +1 -1
- metadata +16 -16
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.4
|
@@ -7,7 +7,14 @@ module YouAndMe
|
|
7
7
|
|
8
8
|
# Returns Markdown-formatted URLs for the given SNP hash.
|
9
9
|
def markdown_links(snp)
|
10
|
-
|
10
|
+
s = ""
|
11
|
+
if(!(snp[:rsid][0] == 'i')) #how to break a string across rows?
|
12
|
+
s = "[dbSNP](http://www.ncbi.nlm.nih.gov/projects/SNP/snp_ref.cgi?rs=#{snp[:rsid]}) " +
|
13
|
+
" [HapMap](http://hapmap.ncbi.nlm.nih.gov/cgi-perl/gbrowse/hapmap27_B36/?name=SNP%3A#{snp[:rsid]})" +
|
14
|
+
" [NextBio](http://www.nextbio.com/b/search/details/#{snp[:rsid]}?type=snp&q0=#{snp[:rsid]}&t0=snp#tab=populations)" +
|
15
|
+
" [Ensembl](http://uswest.ensembl.org/Homo_sapiens/Variation/Summary?v=#{snp[:rsid]};vdb=variation)"
|
16
|
+
end
|
17
|
+
s
|
11
18
|
end
|
12
19
|
|
13
20
|
# Returns true if and only if the given file exists and is readable.
|
@@ -35,8 +42,11 @@ module YouAndMe
|
|
35
42
|
:rsid => row[0],
|
36
43
|
:chromosome => row[1],
|
37
44
|
:position => row[2],
|
38
|
-
:genotype => row[3]
|
39
|
-
}
|
45
|
+
:genotype => row[3]
|
46
|
+
}
|
47
|
+
if snp[:genotype].match(/[A-Z]/) == nil
|
48
|
+
snp[:genotype] = '-'
|
49
|
+
end
|
40
50
|
# y snp
|
41
51
|
snps << snp
|
42
52
|
end
|
data/lib/youandme/report.md.erb
CHANGED
@@ -3,7 +3,7 @@ Subtitle: A side-by-side comparison
|
|
3
3
|
Format: complete
|
4
4
|
CSS: report.css
|
5
5
|
|
6
|
-
# SNV Comparison Report
|
6
|
+
# SNV Comparison Report
|
7
7
|
|
8
8
|
<% loader = YouAndMe::RawDataFileLoader.new %>
|
9
9
|
|
@@ -14,7 +14,7 @@ CSS: report.css
|
|
14
14
|
- Differing genotypes when SNV in both profiles: <%= @rsid_diff.length %> (<%= "%.3f" % (100.0 * @rsid_diff.length / @left.length) %>% of left and <%= "%.3f" % (100.0 * @rsid_diff.length / @right.length) %>% of right.))
|
15
15
|
- Generated <%= Time.now.strftime("%m/%d/%Y at %I:%M%p") %>.
|
16
16
|
|
17
|
-
## Same Genotype
|
17
|
+
## Same Genotype
|
18
18
|
|
19
19
|
The following <%= @rsid_same.length %> SNVs are the *same* in both profiles. Click the links in the last column for access to scientific literature.
|
20
20
|
|
@@ -25,11 +25,11 @@ The following <%= @rsid_same.length %> SNVs are the *same* in both profiles. Cli
|
|
25
25
|
<% end %>
|
26
26
|
|
27
27
|
|
28
|
-
## Different Genotype
|
28
|
+
## Different Genotype
|
29
29
|
|
30
30
|
The follow <%= @rsid_diff.length %> SNVs *differ* between the profiles. Click the links in the last column for access to scientific literature.
|
31
31
|
|
32
|
-
[
|
32
|
+
[Different Genotype]
|
33
33
|
| rsID | Left Genotype | Right Genotype | Reference Position | Links ||
|
34
34
|
-------- |
|
35
35
|
<% @rsid_diff.each do |n| %><%= n[0][:rsid] %> | <%= n[0][:genotype] %> | <%= n[1][:genotype] %> | <%= n[0][:position] %> | <%= loader.markdown_links(n[0]) %>
|
data/lib/youandme/xhtml-toc.xslt
CHANGED
@@ -117,7 +117,7 @@
|
|
117
117
|
</xsl:variable>
|
118
118
|
<xsl:copy>
|
119
119
|
<xsl:apply-templates select="@*|node()"/>
|
120
|
-
<a href="#ToC-{$link}"
|
120
|
+
<a href="#ToC-{$link}">[top]</a>
|
121
121
|
</xsl:copy>
|
122
122
|
</xsl:template>
|
123
123
|
|
@@ -127,7 +127,7 @@
|
|
127
127
|
</xsl:variable>
|
128
128
|
<xsl:copy>
|
129
129
|
<xsl:apply-templates select="@*|node()"/>
|
130
|
-
<a href="#ToC-{$link}"
|
130
|
+
<a href="#ToC-{$link}">[top]</a>
|
131
131
|
</xsl:copy>
|
132
132
|
</xsl:template>
|
133
133
|
|
data/youandme.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: youandme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-11-05 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: getopt
|
16
|
-
requirement: &
|
16
|
+
requirement: &70240445149260 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.4.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70240445149260
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rpeg-multimarkdown
|
27
|
-
requirement: &
|
27
|
+
requirement: &70240445148220 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.1.1
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70240445148220
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: libxslt-ruby
|
38
|
-
requirement: &
|
38
|
+
requirement: &70240445146820 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.0.8
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70240445146820
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: shoulda
|
49
|
-
requirement: &
|
49
|
+
requirement: &70240445145980 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70240445145980
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: bundler
|
60
|
-
requirement: &
|
60
|
+
requirement: &70240445144820 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 1.0.0
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70240445144820
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: jeweler
|
71
|
-
requirement: &
|
71
|
+
requirement: &70240445143760 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 1.6.4
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70240445143760
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: rcov
|
82
|
-
requirement: &
|
82
|
+
requirement: &70240445142760 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,7 +87,7 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70240445142760
|
91
91
|
description: An unofficial ruby library for quickly parsing 23andme raw data files
|
92
92
|
into a plain Ruby structures for quick processing and analysis.
|
93
93
|
email: conmotto@gmail.com
|
@@ -131,7 +131,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
131
131
|
version: '0'
|
132
132
|
segments:
|
133
133
|
- 0
|
134
|
-
hash: -
|
134
|
+
hash: -1964140714609864698
|
135
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
136
|
none: false
|
137
137
|
requirements:
|