-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/broadinstitute/dig-diabet…
- Loading branch information
Showing
21 changed files
with
461 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
grails-app/controllers/org/broadinstitute/mpg/GaitController.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package org.broadinstitute.mpg | ||
|
||
|
||
import groovy.json.JsonSlurper | ||
import org.broadinstitute.mpg.diabetes.util.PortalConstants | ||
import org.broadinstitute.mpg.meta.UserQueryContext | ||
import org.codehaus.groovy.grails.web.json.JSONObject | ||
|
||
class GaitController { | ||
RestServerService restServerService | ||
WidgetService widgetService | ||
|
||
def index() { | ||
forward gaitInfo() | ||
} | ||
|
||
def gaitInfo(){ | ||
String uncharacterizedString = params.id | ||
UserQueryContext userQueryContext = widgetService.generateUserQueryContext(uncharacterizedString) | ||
if (userQueryContext.gene){ | ||
render (view: 'gaitInfo', model:[geneName: userQueryContext.originalRequest,allowExperimentChoice: false, allowPhenotypeChoice: true, allowStratificationChoice: true ]) | ||
} | ||
if (userQueryContext.variant){ | ||
render (view: 'gaitInfo', model:[variantIdentifier: userQueryContext.originalRequest, variantSetId: userQueryContext.originalRequest,allowExperimentChoice: true, allowPhenotypeChoice: true, allowStratificationChoice: false]) | ||
} | ||
|
||
|
||
} | ||
|
||
def getGRSListOfVariantsAjax() { | ||
String grsName = params.grsName | ||
|
||
// TODO - eventually create new bean to hold all the options and have smarts for double checking validity | ||
List <String> variantList = restServerService.getGrsVariants()//grsName should be passed in | ||
|
||
if (variantList == null) { | ||
render(status: 200, contentType: "application/json"){variantInfo:{results:[]}} | ||
return | ||
} | ||
|
||
StringBuilder sb = new StringBuilder() | ||
List <String> recordPerVariants = [] | ||
for (String varId in variantList){ | ||
List <String> idPieces = varId.split("_") | ||
recordPerVariants << "{\"d\":1,\"dataset\":1,\"pVals\":[{\"count\":\"${idPieces[0]}\",\"level\":\"CHROM\"},"+ | ||
"{\"count\":\"${idPieces[1]}\",\"level\":\"POS\"},"+ | ||
"{\"count\":\"${idPieces[2]}\",\"level\":\"Reference_Allele\"},"+ | ||
"{\"count\":\"${varId}\",\"level\":\"VAR_ID\"},"+ | ||
"{\"count\":\"${idPieces[3]}\",\"level\":\"Effect_Allele\"}]}".toString() | ||
} | ||
|
||
JsonSlurper slurper = new JsonSlurper() | ||
String codedVariantList = """{"results":[${recordPerVariants.join(",")}]}""".toString() | ||
JSONObject sampleCallSpecifics = slurper.parseText(codedVariantList) | ||
|
||
// send json response back | ||
render(status: 200, contentType: "application/json") {sampleCallSpecifics} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1532,7 +1532,7 @@ informational.dataSubmission.section4=<li>See your data in the context of hundre | |
Analysis Team at the AMP Data Coordinating Center (AMP-DCC).</li><li>Get access \ | ||
to cutting edge analysis tools that can be used for your research.</li><li>Share your data with the wider diabetes research community.</li> | ||
informational.dataSubmission.section5title=What if your data can’t come to the United States? | ||
informational.dataSubmission.section5=<li>A Federated Node at EMBL-EBI will allow data to be stored there and be accessed by the Portal. In the future, we plan to \ | ||
informational.dataSubmission.section5=<li>A Federated Node at EMBL-EBI stores data for secure access via the Portal. In the future, we plan to \ | ||
release technology that will support additional federated nodes in other locations.</li> | ||
informational.dataSubmission.section5atitle=Is funding available for projects to generate new data for the Portal? | ||
informational.dataSubmission.section5a=<li>Yes! The Foundation for the NIH offers funding opportunities. <a href="http://fnih.org/what-we-do/current-research-programs/amp-t2d-project" target="_blank"> \ | ||
|
@@ -1541,11 +1541,13 @@ informational.dataSubmission.section6=Find complete information on data submissi | |
<a href="https://s3.amazonaws.com/broad-portal-resources/AMP_T2DKP_Submitter_Guide.pdf" target="_blank">AMP T2D Knowledge Portal Submitter and Analysis \ | ||
Guide for Data at the DCC</a>. | ||
informational.dataSubmission.section7header=Data Submission | ||
informational.dataSubmission.section7=contact our data intake team at: <br><a href="mailto:[email protected]">[email protected]</a> | ||
informational.dataSubmission.section7=Submit data using our <a href="http://www.kp4cd.org/dataintake" target="_blank">Data Intake Tracker</a> | ||
informational.dataSubmission.section7aheader=Data Submission Help | ||
informational.dataSubmission.section7a=Contact our data intake team at: <br><a href="mailto:[email protected]">[email protected]</a> | ||
informational.dataSubmission.section8header=General Questions | ||
informational.dataSubmission.section8=contact us at: <br><a href="mailto:[email protected]">[email protected]</a> | ||
informational.dataSubmission.section8=Contact us at: <br><a href="mailto:[email protected]">[email protected]</a> | ||
informational.dataSubmission.section9title=What compliance/regulatory documents are needed to submit my data to the AMP T2D Knowledge Portal? | ||
informational.dataSubmission.section9=<li>In order to include your data in the AMP T2D Knowledge Portal, you will need to obtain permission from your institution's your IRB review \ | ||
informational.dataSubmission.section9=<li>In order to include your data in the AMP T2D Knowledge Portal, you will need to obtain permission from your institution's IRB review \ | ||
board (or your country's equivalent) to share the data with us and make summary level metrics available on the Portal.</li><li>We also ask that you sign a \ | ||
<a href="https://s3.amazonaws.com/broad-portal-resources/AMP-T2D_DTA_and_policies.pdf" target="_blank">Data Transfer Agreement</a>.</li> | ||
informational.about_t2d.title=About the Accelerating Medicines Partnership and the Type 2 Diabetes Knowledge Portal project | ||
|
@@ -2717,8 +2719,12 @@ informational.modules.LDClumping.description2=LD (linkage disequilibrium) clumpi | |
informational.modules.VariantFinder.title=Variant Finder | ||
informational.modules.VariantFinder.description=<p>This versatile tool lets you specify multiple search criteria to find genetic variants \ | ||
whose associations meet those criteria. | ||
informational.modules.GAIT.title=GAIT | ||
informational.modules.GAIT.description=<p>The Genetic Association Interactive Tool allows you to compute custom association statistics by specifying the phenotype to test for association, a subset of samples to analyze based on specific phenotypic criteria, and a set of covariates to control for in the analysis. In order to protect patient privacy, GAIT will only allow visualization or analysis of data from more than 100 individuals.</p><div style="float: left; margin-top: 5px;" class="btn dk-t2d-green dk-reference-button dk-right-column-buttons-compact "><a href="https://s3.amazonaws.com/broad-portal-resources/tutorials/KP_GAIT_guide.pdf" target="_blank">GAIT guide</a></div> | ||
informational.modules.GAIT.title=Custom Association Analysis | ||
informational.modules.geneGAIT.title=Gene GAIT | ||
informational.modules.GAIT.description=<p>Custom association analysis, powered by the Genetic Association Interactive Tool (GAIT) software, \ | ||
allows you to filter samples and specify other parameters before running real-time association analysis. Enter a variant ID to perform \ | ||
single-variant analysis, or a gene name to perform a gene burden test. In order to protect patient privacy, visualization or analysis of data \ | ||
from fewer than 100 individuals is not supported.</p> | ||
informational.modules.GRS.title=Genetic Risk Score | ||
informational.modules.GRS.description=The Genetic Risk Score (GRS) tool takes a defined set of T2D risk-associated variants and allows you \ | ||
to calculate the p-value for association of this set with different phenotypes, potentially revealing genetic relationships between phenotypes. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
<%-- | ||
Created by IntelliJ IDEA. | ||
User: psingh | ||
Date: 5/21/19 | ||
Time: 1:44 AM | ||
--%> | ||
|
||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta name="layout" content="t2dGenesCore"/> | ||
<r:require modules="core"/> | ||
<r:require modules="datatables"/> | ||
<r:require modules="gaitInfo"/> | ||
<r:require modules="geneInfo"/> | ||
<r:require modules="burdenTest"/> | ||
<r:layoutResources/> | ||
|
||
|
||
<link type="application/font-woff"> | ||
<link type="application/vnd.ms-fontobject"> | ||
<link type="application/x-font-ttf"> | ||
<link type="font/opentype"> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<div id="rSpinner" class="dk-loading-wheel center-block" style="display:none"> | ||
<img src="${resource(dir: 'images', file: 'ajax-loader.gif')}" alt="Loading"/> | ||
</div> | ||
<script> | ||
$( document ).ready(function() { | ||
"use strict"; | ||
var drivingVariables = { | ||
geneName: "${geneName}", | ||
variantIdentifier: "${variantIdentifier}", | ||
allowExperimentChoice:"${allowExperimentChoice}", | ||
allowPhenotypeChoice:"${allowPhenotypeChoice}", | ||
allowStratificationChoice:"${allowStratificationChoice}" | ||
}; | ||
mpgSoftware.gaitInfo.setGaitInfoData(drivingVariables); | ||
mpgSoftware.gaitInfo.buildGaitDisplay(); | ||
var pageTitle = $(".accordion-toggle").find("h2").text(); | ||
var textUnderTitle = $(".accordion-inner").find("h5").text(); | ||
$(".accordion-toggle").remove(); | ||
$(".accordion-inner").find("h5").remove(); | ||
var PageTitleDiv = '<div class="row">\n'+ | ||
'<div class="col-md-12">\n'+ | ||
'<h1 class="dk-page-title">' + pageTitle + '</h1>\n'+ | ||
'<div class="col-md-12">\n'+ | ||
'<h5 class="dk-under-header">' + textUnderTitle + '</h5>\n'+ | ||
'</div></div>'; | ||
$(PageTitleDiv).insertBefore(".gene-info-container"); | ||
$(".user-interaction").addClass("col-md-12"); | ||
/* end of DK's script */ | ||
}); | ||
</script> | ||
|
||
<style> | ||
ul.nav-tabs > li > a { background: none !important; } | ||
ul.nav-tabs > li.active > a { background-color: #fff !important; } | ||
#modeledPhenotypeTabs li.active > a { background-color: #9fd3df !important; } | ||
</style> | ||
|
||
<div id="main"> | ||
|
||
<div class="container"> | ||
|
||
<div class="gene-info-container row"> | ||
|
||
<h3><em style="font-weight: 900;"><%=geneName%></em></h3> | ||
|
||
|
||
<h3><em style="font-weight: 900;"><%=variantIdentifier%></em></h3> | ||
|
||
|
||
%{--If its gene Gait page then allowExperimentChoice = 0 and 'geneName':'geneName'--}% | ||
%{--<g:if test="${geneName?.equals('')}">--}% | ||
|
||
%{--<g:render template="/templates/burdenTestSharedTemplate" model="['variantIdentifier': variantIdentifier, 'accordionHeaderClass': 'accordion-heading']" />--}% | ||
|
||
%{--<g:render template="/widgets/burdenTestShared" model="['variantIdentifier': variantIdentifier,--}% | ||
%{--'accordionHeaderClass': 'accordion-heading',--}% | ||
%{--'modifiedTitle': 'Variant Interactive burden test',--}% | ||
%{--'modifiedGaitSummary': 'The Genetic Association Interactive Tool (GAIT) allows you to compute the disease or phenotype burden for this gene, using custom sets of variants, samples, and covariates. In order to protect patient privacy, GAIT will only allow visualization or analysis of data from more than 100 individuals.',--}% | ||
%{--'allowExperimentChoice': 1,--}% | ||
%{--'allowPhenotypeChoice': 1,--}% | ||
%{--'allowStratificationChoice': 0,--}% | ||
%{--'grsVariantSet':'',--}% | ||
%{--'geneName':'']"/>--}% | ||
%{--</g:if>--}% | ||
|
||
%{--<g:else>--}% | ||
%{--<g:render template="/templates/burdenTestSharedTemplate" model="['variantIdentifier': '', 'accordionHeaderClass': 'accordion-heading']" />--}% | ||
|
||
%{--<g:render template="/widgets/burdenTestShared" model="['variantIdentifier': '',--}% | ||
%{--'accordionHeaderClass': 'accordion-heading',--}% | ||
%{--'modifiedTitle': 'Gene Interactive burden test',--}% | ||
%{--'modifiedGaitSummary': 'The Genetic Association Interactive Tool (GAIT) allows you to compute the disease or phenotype burden for this gene, using custom sets of variants, samples, and covariates. In order to protect patient privacy, GAIT will only allow visualization or analysis of data from more than 100 individuals.',--}% | ||
%{--'allowExperimentChoice': 1,--}% | ||
%{--'allowPhenotypeChoice': 1,--}% | ||
%{--'allowStratificationChoice': 1,--}% | ||
%{--'grsVariantSet':'',--}% | ||
%{--'geneName':geneName]"/>--}% | ||
|
||
%{--</g:else>--}% | ||
|
||
|
||
<g:render template="/templates/burdenTestSharedTemplate" model="['variantIdentifier': variantIdentifier, 'accordionHeaderClass': 'accordion-heading']" /> | ||
|
||
|
||
|
||
%{--If its gene Gait page then allowExperimentChoice = 0 and 'geneName':'geneName'--}% | ||
<g:render template="/widgets/burdenTestShared" model="['variantIdentifier': '', | ||
'accordionHeaderClass': 'accordion-heading', | ||
'modifiedTitle': 'Custom Association Analysis', | ||
'modifiedGaitSummary': 'This interface allows you to perform single-variant association analysis or a gene-level burden test using custom parameters. Results for the T2D phenotype are powered by the AMP T2D-GENES exome sequence analysis dataset; results for other traits are powered by the 19k exome sequence analysis subset. In order to protect patient privacy, visualization or analysis of data from fewer than 100 individuals is not supported.', | ||
'allowExperimentChoice': allowExperimentChoice, | ||
'allowPhenotypeChoice': allowPhenotypeChoice, | ||
'allowStratificationChoice': allowStratificationChoice, | ||
'grsVariantSet':'', | ||
'geneName':geneName]"/> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.