mirror of
https://github.com/chenasraf/snpr.git
synced 2026-05-18 01:39:01 +00:00
Merge branch 'master' of github.com:gedankenstuecke/snpr
This commit is contained in:
11
README.rdoc
11
README.rdoc
@@ -1,10 +1,12 @@
|
||||
{<img src="http://travis-ci.org/gedankenstuecke/snpr.png" />}[http://travis-ci.org/gedankenstuecke/snpr]
|
||||
|
||||
= SNPr
|
||||
= openSNP
|
||||
|
||||
a repository to which users can upload their SNP-sets from 23andme and deCODEme. On upload, SNPs are annotated using the PLoS and Mendeley-APIs to show users the newest scientific research results on their SNPs. Each SNP is also linked to the relevant page on SNPedia. SNPs are ranked according to how many results could be gathered for SNPedia, PLoS and Mendeley (in that order). Users can send each other private messages as well as comment on SNPs and Phenotypes.
|
||||
a repository to which users can upload their SNP-sets (and exome-VCFs) from 23andme, deCODEme and FamilyTreeDNA. On upload, SNPs are annotated using the PLoS and Mendeley-APIs to show users the newest scientific research results on their SNPs. Each SNP is also linked to the relevant page on SNPedia. SNPs are ranked according to how many results could be gathered for SNPedia, PLoS and Mendeley (in that order). Users can send each other private messages as well as comment on SNPs and Phenotypes.
|
||||
|
||||
A RSS-feed is provided which is re-newed once a user uploads a genotyping. Users can enter phenotypes to assist future research. Right now, a search looks at every String I could think of :)
|
||||
Users can enter phenotypes to assist future research. Search is implemented via the Solr-server.
|
||||
|
||||
RSS-feeds are provided for uploaded genotypes and new publications.
|
||||
|
||||
Reminder: When new search-indexes are defined on models please run
|
||||
|
||||
@@ -30,5 +32,6 @@ You need to have the following running to ensure that everything works:
|
||||
|
||||
Note: "serverscript" starts all these in detached screen-sessions.
|
||||
|
||||
= to-do
|
||||
= To do
|
||||
|
||||
Check the issues-page for things to fix/finish/do.
|
||||
|
||||
@@ -7,6 +7,10 @@ class ApplicationController < ActionController::Base
|
||||
ssl_allowed :all
|
||||
end
|
||||
|
||||
def not_found
|
||||
raise ActionController::RoutingError.new("Not found")
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def current_user_session
|
||||
|
||||
@@ -102,7 +102,7 @@ class PhenotypesController < ApplicationController
|
||||
def show
|
||||
#@phenotypes = Phenotype.where(:user_id => current_user.id).all
|
||||
#@title = "Phenotypes"
|
||||
@phenotype = Phenotype.find(params[:id])
|
||||
@phenotype = Phenotype.find(params[:id]) || not_found
|
||||
@comments = PhenotypeComment.where(:phenotype_id => params[:id]).all(:order => "created_at ASC")
|
||||
@phenotype_comment = PhenotypeComment.new
|
||||
@user_phenotype = UserPhenotype.new
|
||||
|
||||
@@ -13,7 +13,7 @@ class SnpsController < ApplicationController
|
||||
end
|
||||
|
||||
def show
|
||||
@snp = Snp.find_by_name(params[:id].downcase)
|
||||
@snp = Snp.find_by_name(params[:id].downcase) || not_found
|
||||
@title = @snp.name
|
||||
@comments = SnpComment.where(:snp_id => @snp.id).all(:order => "created_at ASC")
|
||||
@users = User.find(:all, :conditions => { :user_snp => { :snps => { :id => @snp.id }}}, :joins => [ :user_snps => :snp])
|
||||
@@ -133,7 +133,7 @@ class SnpsController < ApplicationController
|
||||
end
|
||||
|
||||
def find_snp
|
||||
@snp = Snp.find(params[:id].downcase)
|
||||
@snp = Snp.find(params[:id].downcase) || not_found
|
||||
|
||||
# If an old id or a numeric id was used to find the record, then
|
||||
# the request path will not match the post_path, and we should do
|
||||
|
||||
@@ -75,7 +75,7 @@ class UsersController < ApplicationController
|
||||
|
||||
def show
|
||||
# showing a single user's page
|
||||
@user = User.find_by_id(params[:id])
|
||||
@user = User.find_by_id(params[:id]) || not_found
|
||||
@title = @user.name + "'s page"
|
||||
@first_name = @user.name.split.first
|
||||
@user_phenotypes = @user.user_phenotypes
|
||||
|
||||
@@ -47,6 +47,7 @@ Snpr::Application.routes.draw do
|
||||
match '/paper/rss', :to => 'news#paper_rss'
|
||||
match '/recommend_phenotype/:id/', :to => 'phenotypes#recommend_phenotype'
|
||||
match '/press', :to => 'static#press'
|
||||
match '/blog' => redirect("http://opensnp.wordpress.com")
|
||||
|
||||
root :to => 'index#index' # change thisi, maybe
|
||||
# The priority is based upon order of creation:
|
||||
|
||||
@@ -1,26 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>The page you were looking for doesn't exist (404)</title>
|
||||
<style type="text/css">
|
||||
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
||||
div.dialog {
|
||||
width: 25em;
|
||||
padding: 0 4em;
|
||||
margin: 4em auto 0 auto;
|
||||
border: 1px solid #ccc;
|
||||
border-right-color: #999;
|
||||
border-bottom-color: #999;
|
||||
}
|
||||
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
||||
</style>
|
||||
<title>Page Not Found (404)</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- This file lives in public/404.html -->
|
||||
<div class="dialog">
|
||||
<h1>The page you were looking for doesn't exist.</h1>
|
||||
<p>You may have mistyped the address or the page may have moved.</p>
|
||||
</div>
|
||||
<style>
|
||||
a{
|
||||
text-decoration:none;
|
||||
color:#0069d6;
|
||||
}
|
||||
</style>
|
||||
<center>
|
||||
<h1><a href="http://www.opensnp.org">openSNP</a></h1>
|
||||
<h3>404: Nope.</h3>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,26 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>We're sorry, but something went wrong (500)</title>
|
||||
<style type="text/css">
|
||||
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
||||
div.dialog {
|
||||
width: 25em;
|
||||
padding: 0 4em;
|
||||
margin: 4em auto 0 auto;
|
||||
border: 1px solid #ccc;
|
||||
border-right-color: #999;
|
||||
border-bottom-color: #999;
|
||||
}
|
||||
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
||||
</style>
|
||||
<title>Internal Server Error (500)</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- This file lives in public/500.html -->
|
||||
<div class="dialog">
|
||||
<h1>We're sorry, but something went wrong.</h1>
|
||||
<p>We've been notified about this issue and we'll take a look at it shortly.</p>
|
||||
</div>
|
||||
<style>
|
||||
a{
|
||||
text-decoration:none;
|
||||
color:#0069d6;
|
||||
}
|
||||
</style>
|
||||
<center>
|
||||
<h1><a href="http://www.opensnp.org">openSNP</a></h1>
|
||||
<h3>500: Something broke.<br/> If it keeps on doing this, please send us an e-mail: {info at opensnp dot org}.</h3>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#/bin/bash
|
||||
|
||||
screen -d -m -S "Server" bundle exec rails s
|
||||
screen -d -m -S "Server" bundle exec rails s -e production
|
||||
screen -d -m -S "Solr" bundle exec rake sunspot:solr:run
|
||||
screen -d -m -S "Redis" redis-server
|
||||
screen -d -m -S "Resque-worker" bundle exec rake environment resque:work QUEUE=*
|
||||
|
||||
Reference in New Issue
Block a user