mirror of
https://github.com/chenasraf/snpr.git
synced 2026-05-18 01:39:01 +00:00
changed everything to reflect change of foreign key from @user_snp.snp_id to user_snp.snp_name and modified disclaimer-stuff. as now the automatic plos/mendeley-parsing is broken
This commit is contained in:
@@ -17,7 +17,7 @@ class SnpsController < ApplicationController
|
||||
@users = User.find(:all, :conditions => { :user_snp => { :snps => { :id => @snp.id }}}, :joins => [ :user_snps => :snp])
|
||||
|
||||
if current_user != nil
|
||||
@user_snp = UserSnp.find_by_user_id_and_snp_id(current_user,@snp.id)
|
||||
@user_snp = UserSnp.find_by_user_id_and_snp_name(current_user,@snp.name)
|
||||
end
|
||||
|
||||
@total_genotypes = 0
|
||||
|
||||
@@ -74,7 +74,7 @@ class Parsing
|
||||
end
|
||||
Rails.logger.info "Importing new Snps"
|
||||
Snp.import new_snps
|
||||
Rails.logger.info "Updating knonw Snps"
|
||||
Rails.logger.info "Updating known Snps"
|
||||
ActiveRecord::Base.transaction do
|
||||
known_snps.each_value(&:save)
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<div class="row">
|
||||
<div class="span8 columns">
|
||||
<%= form_for(@genotype,:html => {:class => "form-stacked", :multipart => true}) do |f| %>
|
||||
<%= render 'shared/error_messages', :target => @genotype %>
|
||||
<div class="well">
|
||||
@@ -21,12 +23,6 @@
|
||||
<span>deCODEme-format</span>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label>
|
||||
<%= f.radio_button :filetype, "other" %>
|
||||
<span>other format</span>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -35,3 +31,26 @@
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span8 columns">
|
||||
<div class="well">
|
||||
<p><strong>By signing up for openSNP you declare that you have understood the possible risks and side-effects that can occur by making your genetical and medical information available on this platform. In short:</strong><br/><br/></p>
|
||||
<p><ul>
|
||||
<li>Data uploaded to the internet can not be fully deleted, there may always be a backup somewhere</li>
|
||||
<li>By publishing data you expose information about you and your next of kin worldwide</li>
|
||||
<li>Genetic and medical information can be used by employers, insurance companies and the government to know more about you than you would like</li>
|
||||
<li>new findings about your genotypes can be negative</li>
|
||||
</ul></p>
|
||||
<center><h6>What has been seen can not be unseen</h6></center>
|
||||
<p>You agree that all data you upload to openSNP will be freely available online (well, except your mail-address and password) under a <a href="http://creativecommons.org/about/cc0">Creative Commons Zero</a> license. The data can be viewed and downloaded through this webpage, an API and via FTP. Although you can delete your data from openSNP this does not guarantee that no one else did already create a backup of the data (who may re-publish the data somewhere else).</p>
|
||||
<center><h6>There is zero privacy anyway, get over it</h6></center>
|
||||
<p>Although you can upload your data using a pseudonym, there is no way to anonymously submit data. Statistically speaking it is really unlikely that your medical and genetic information matches that of someone else. By uploading you do not only disclose information about yourself, but also about your next kinship (parents and siblings), that shares half of a genome with you. Before uploading any genetical data you should make sure that those people approve of you doing so.</p>
|
||||
<center><h6>Jobs, insurance, the government</h6></center>
|
||||
<p>Medical and genetic data can be used to discriminate people. Due to medical or genetic information an employer may not give you a job, an insurance company may request higher payments and who knows what any <em>evil™</em> government will do with your data? Although some countries have laws against genetic discrimination, these laws certainly will not cover possible discrimination scenarios and could change in the future. Again: These are side effects and risks which also can apply to your kinship, if you chose to upload this information.</p>
|
||||
<center><h6>Knowledge about genes and SNPs is not static</h6></center>
|
||||
<p>Nearly every week there are new scientific publications that find new associations between certain traits (like diseases) with existing genetic information. Because of this you should not publish your data just because it currently looks harmless and unsuspicious. It may be true that your genotyping data is of no greater interest for your employer, your insurance company or the government right now, but this can easily change (<strong>Remember: One of the reasons to upload your data here in the first place is, to enable everyone to find such new associations</strong>).</p>
|
||||
<p>Think of the hypothetical <em><a href="http://www.snpedia.com/index.php/Rs666">SNP rs666</a></em>. One day after you upload your genotyping-data to this website, a new publication finds that your genotype at <em>rs666</em> will give you, your siblings and your parents a fatal disease that will most certainly strike all of you. Due to this disease you (and you kin) may lose your jobs and your insurance. Chances for a association of this kind may be small, but by uploading the data you are nonetheless taking this risk!</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<!-- IE6-8 support of HTML elements -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<title>OpenSNP <% if @title %>| <%= @title %><% end %></title>
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<%= stylesheet_link_tag :all %>
|
||||
<%= javascript_include_tag :defaults, "nested_form","jquery-1.6.2.min.js","jquery.tablesorter.min.js", "jquery.ba-hashchange.min.js","jquery.easytabs.js","jquery-ui-1.8.16.custom.min.js"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<td><%= link_to(s.name, s) %></td>
|
||||
<td><%= s.position %></td>
|
||||
<td><%= s.chromosome %></td>
|
||||
<%if current_user != nil and UserSnp.find_by_user_id_and_snp_id(current_user.id,s.id) != nil%>
|
||||
<td><%=UserSnp.find_by_user_id_and_snp_id(current_user.id,s.id).local_genotype%></td>
|
||||
<%if current_user != nil and UserSnp.find_by_user_id_and_snp_name(current_user.id,s.name) != nil%>
|
||||
<td><%=UserSnp.find_by_user_id_and_snp_name(current_user.id,s.name).local_genotype%></td>
|
||||
<%else%>
|
||||
<td>-</td>
|
||||
<%end%>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
|
||||
<div class="span3 columns">
|
||||
<%if current_user != nil and UserSnp.find_by_user_id_and_snp_id(current_user.id,@snp.id) != nil%>
|
||||
<%if current_user != nil and UserSnp.find_by_user_id_and_snp_name(current_user.id,@snp.name) != nil%>
|
||||
|
||||
<div id="your_genotype" class="tooltip">
|
||||
Your genetic variation at <em><%=@snp.name%></em>.
|
||||
@@ -67,7 +67,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<%@snp.genotype_frequency.each do |key,value|%>
|
||||
<%if current_user != nil and UserSnp.find_by_user_id_and_snp_id(current_user.id,@snp.id) != nil%>
|
||||
<%if current_user != nil and UserSnp.find_by_user_id_and_snp_name(current_user.id,@snp.name) != nil%>
|
||||
<%if key == @user_snp.local_genotype%>
|
||||
<tr>
|
||||
<td><b><%=key%></b></td>
|
||||
@@ -197,7 +197,7 @@
|
||||
<th>Summary</th>
|
||||
</tr>
|
||||
<% @snp.snpedia_paper.each do |p| %>
|
||||
<%if current_user != nil and UserSnp.find_by_user_id_and_snp_id(current_user.id,@snp.id) != nil and p.url[-2].to_s+p.url[-4].to_s == @user_snp.local_genotype or current_user != nil and UserSnp.find_by_user_id_and_snp_id(current_user.id,@snp.id) != nil and p.url[-4].to_s+p.url[-2].to_s == @user_snp.local_genotype%>
|
||||
<%if current_user != nil and UserSnp.find_by_user_id_and_snp_name(current_user.id,@snp.name) != nil and p.url[-2].to_s+p.url[-4].to_s == @user_snp.local_genotype or current_user != nil and UserSnp.find_by_user_id_and_snp_name(current_user.id,@snp.name) != nil and p.url[-4].to_s+p.url[-2].to_s == @user_snp.local_genotype%>
|
||||
<tr>
|
||||
<td><b><%= link_to @snp.name+" "+p.url[-4]+"/"+p.url[-2], p.url %></b></td>
|
||||
<td><b><%= p.summary.capitalize %></b></td>
|
||||
@@ -224,12 +224,12 @@
|
||||
</tr>
|
||||
<% @users.each do |u| %>
|
||||
<tr>
|
||||
<%if current_user != nil and current_user.has_sequence and u.user_snps.find_by_snp_id(@snp.id).local_genotype == @user_snp.local_genotype%>
|
||||
<%if current_user != nil and current_user.has_sequence and u.user_snps.find_by_snp_name(@snp.name).local_genotype == @user_snp.local_genotype%>
|
||||
<td><b><%= link_to( u.name, u ) %></b></td>
|
||||
<td><b><%= u.user_snps.find_by_snp_id(@snp.id).local_genotype%></b></td>
|
||||
<td><b><%= u.user_snps.find_by_snp_name(@snp.name).local_genotype%></b></td>
|
||||
<%else%>
|
||||
<td><%= link_to( u.name, u ) %></td>
|
||||
<td><%= u.user_snps.find_by_snp_id(@snp.id).local_genotype%></td>
|
||||
<td><%= u.user_snps.find_by_snp_name(@snp.name).local_genotype%></td>
|
||||
<%end%>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@@ -57,5 +57,5 @@
|
||||
<p>Think of the hypothetical <em><a href="http://www.snpedia.com/index.php/Rs666">SNP rs666</a></em>. One day after you upload your genotyping-data to this website, a new publication finds that your genotype at <em>rs666</em> will give you, your siblings and your parents a fatal disease that will most certainly strike all of you. Due to this disease you (and you kin) may lose your jobs and your insurance. Chances for a association of this kind may be small, but by uploading the data you are nonetheless taking this risk!</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<td><%= link_to s.name, s%></td>
|
||||
<td><%= s.position %></td>
|
||||
<td><%= s.chromosome %></td>
|
||||
<% if current_user and current_user.has_sequence %><td><%=UserSnp.find_by_user_id_and_snp_id(current_user.id,s.id).local_genotype%></td><% end %>
|
||||
<% if current_user and current_user.has_sequence %><td><%=UserSnp.find_by_user_id_and_snp_name(current_user.id,s.name).local_genotype%></td><% end %>
|
||||
<td><%= s.ranking %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@@ -117,9 +117,9 @@ ActiveRecord::Schema.define(:version => 20110914151105) do
|
||||
t.string "allele_frequency"
|
||||
t.integer "ranking"
|
||||
t.integer "number_of_users", :default => 0
|
||||
t.datetime "mendeley_updated", :default => '2011-08-12 13:03:56'
|
||||
t.datetime "plos_updated", :default => '2011-08-12 13:03:56'
|
||||
t.datetime "snpedia_updated", :default => '2011-08-12 13:03:56'
|
||||
t.datetime "mendeley_updated", :default => '2011-08-12 17:41:26'
|
||||
t.datetime "plos_updated", :default => '2011-08-12 17:41:26'
|
||||
t.datetime "snpedia_updated", :default => '2011-08-12 17:41:26'
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 1.4 KiB |
Reference in New Issue
Block a user